CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: uebayasi Date: Wed Dec 2 08:31:57 UTC 2009 Modified Files: src/sys/rump/librump/rumpkern: rump_private.h Log Message: Declare global pointers as extern, otherwise they become common symbols. Fix mips build in lib/librumpnet. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/rump/librump/rumpkern/rump_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/rumpkern/rump_private.h diff -u src/sys/rump/librump/rumpkern/rump_private.h:1.37 src/sys/rump/librump/rumpkern/rump_private.h:1.38 --- src/sys/rump/librump/rumpkern/rump_private.h:1.37 Tue Dec 1 09:50:51 2009 +++ src/sys/rump/librump/rumpkern/rump_private.h Wed Dec 2 08:31:56 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rump_private.h,v 1.37 2009/12/01 09:50:51 pooka Exp $ */ +/* $NetBSD: rump_private.h,v 1.38 2009/12/02 08:31:56 uebayasi Exp $ */ /* * Copyright (c) 2007 Antti Kantee. All Rights Reserved. @@ -76,8 +76,8 @@ typedef void (*rump_proc_vfs_init_fn)(struct proc *); typedef void (*rump_proc_vfs_release_fn)(struct proc *); -rump_proc_vfs_init_fn rump_proc_vfs_init; -rump_proc_vfs_release_fn rump_proc_vfs_release; +extern rump_proc_vfs_init_fn rump_proc_vfs_init; +extern rump_proc_vfs_release_fn rump_proc_vfs_release; extern struct cpu_info *rump_cpu;
CVS commit: src/lib/libc
Module Name:src Committed By: roy Date: Wed Dec 2 08:46:34 UTC 2009 Modified Files: src/lib/libc/include: namespace.h src/lib/libc/stdio: getline.c Log Message: Protect getline. To generate a diff of this commit: cvs rdiff -u -r1.139 -r1.140 src/lib/libc/include/namespace.h cvs rdiff -u -r1.2 -r1.3 src/lib/libc/stdio/getline.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/include/namespace.h diff -u src/lib/libc/include/namespace.h:1.139 src/lib/libc/include/namespace.h:1.140 --- src/lib/libc/include/namespace.h:1.139 Tue Dec 1 00:52:13 2009 +++ src/lib/libc/include/namespace.h Wed Dec 2 08:46:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: namespace.h,v 1.139 2009/12/01 00:52:13 roy Exp $ */ +/* $NetBSD: namespace.h,v 1.140 2009/12/02 08:46:33 roy Exp $ */ /*- * Copyright (c) 1997-2004 The NetBSD Foundation, Inc. @@ -295,6 +295,7 @@ #define gethostent _gethostent #define gethostname _gethostname #define getifaddrs _getifaddrs +#define getline _getline #define getloadavg _getloadavg #define getlogin _getlogin #define getlogin_r _getlogin_r Index: src/lib/libc/stdio/getline.c diff -u src/lib/libc/stdio/getline.c:1.2 src/lib/libc/stdio/getline.c:1.3 --- src/lib/libc/stdio/getline.c:1.2 Tue Dec 1 00:52:13 2009 +++ src/lib/libc/stdio/getline.c Wed Dec 2 08:46:33 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: getline.c,v 1.2 2009/12/01 00:52:13 roy Exp $ */ +/* $NetBSD: getline.c,v 1.3 2009/12/02 08:46:33 roy Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,12 +28,16 @@ */ #include -__RCSID("$NetBSD: getline.c,v 1.2 2009/12/01 00:52:13 roy Exp $"); +__RCSID("$NetBSD: getline.c,v 1.3 2009/12/02 08:46:33 roy Exp $"); #include "namespace.h" #include +#ifdef __weak_alias +__weak_alias(getline, _getline) +#endif + ssize_t getline(char **__restrict buf, size_t *__restrict buflen, FILE *__restrict fp) {
CVS commit: src/lib/libc/locale
Module Name:src Committed By: uebayasi Date: Wed Dec 2 08:53:03 UTC 2009 Modified Files: src/lib/libc/locale: setlocale_local.h Log Message: struct _locale_time_t _global_locale is a datum. Declare it as extern. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/lib/libc/locale/setlocale_local.h 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/locale/setlocale_local.h diff -u src/lib/libc/locale/setlocale_local.h:1.2 src/lib/libc/locale/setlocale_local.h:1.3 --- src/lib/libc/locale/setlocale_local.h:1.2 Sun Jan 11 02:46:29 2009 +++ src/lib/libc/locale/setlocale_local.h Wed Dec 2 08:53:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: setlocale_local.h,v 1.2 2009/01/11 02:46:29 christos Exp $ */ +/* $NetBSD: setlocale_local.h,v 1.3 2009/12/02 08:53:03 uebayasi Exp $ */ /*- * Copyright (c)2008 Citrus Project, @@ -67,7 +67,7 @@ __BEGIN_DECLS _locale_category_t *_find_category(int); const char *_get_locale_env(const char *); -struct _locale_impl_t _global_locale; +extern struct _locale_impl_t _global_locale; struct _locale_impl_t **_current_locale(void); __END_DECLS
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: roy Date: Wed Dec 2 09:03:13 UTC 2009 Modified Files: src/lib/libc/stdio: fgetln.c fgetstr.c getdelim.c local.h Log Message: Reinstate __getdelim which does no locking. Callers are now required to FLOCKFILE so they can operate on fp as well. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/lib/libc/stdio/fgetln.c cvs rdiff -u -r1.9 -r1.10 src/lib/libc/stdio/fgetstr.c \ src/lib/libc/stdio/getdelim.c cvs rdiff -u -r1.22 -r1.23 src/lib/libc/stdio/local.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/fgetln.c diff -u src/lib/libc/stdio/fgetln.c:1.15 src/lib/libc/stdio/fgetln.c:1.16 --- src/lib/libc/stdio/fgetln.c:1.15 Thu Sep 24 20:38:53 2009 +++ src/lib/libc/stdio/fgetln.c Wed Dec 2 09:03:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: fgetln.c,v 1.15 2009/09/24 20:38:53 roy Exp $ */ +/* $NetBSD: fgetln.c,v 1.16 2009/12/02 09:03:13 roy Exp $ */ /*- * Copyright (c) 1990, 1993 @@ -33,13 +33,7 @@ */ #include -#if defined(LIBC_SCCS) && !defined(lint) -#if 0 -static char sccsid[] = "@(#)fgetline.c 8.1 (Berkeley) 6/4/93"; -#else -__RCSID("$NetBSD: fgetln.c,v 1.15 2009/09/24 20:38:53 roy Exp $"); -#endif -#endif /* LIBC_SCCS and not lint */ +__RCSID("$NetBSD: fgetln.c,v 1.16 2009/12/02 09:03:13 roy Exp $"); #include "namespace.h" @@ -53,17 +47,18 @@ #endif /* - * Get an input line. The returned pointer often (but not always) - * points into a stdio buffer. Fgetline does not alter the text of - * the returned line (which is thus not a C string because it will - * not necessarily end with '\0'), but does allow callers to modify - * it if they wish. Thus, we set __SMOD in case the caller does. + * Get an input line. + * This now uses getdelim(3) for a code reduction. + * The upside is that strings are now always NULL terminated, but relying + * on this is non portable - better to use the POSIX getdelim(3) function. */ char * -fgetln(fp, lenp) - FILE *fp; - size_t *lenp; +fgetln(FILE *fp, size_t *lenp) { + char *p; - return __fgetstr(fp, lenp, '\n'); + FLOCKFILE(fp); + p = __fgetstr(fp, lenp, '\n'); + FUNLOCKFILE(fp); + return p; } Index: src/lib/libc/stdio/fgetstr.c diff -u src/lib/libc/stdio/fgetstr.c:1.9 src/lib/libc/stdio/fgetstr.c:1.10 --- src/lib/libc/stdio/fgetstr.c:1.9 Tue Dec 1 00:03:53 2009 +++ src/lib/libc/stdio/fgetstr.c Wed Dec 2 09:03:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: fgetstr.c,v 1.9 2009/12/01 00:03:53 roy Exp $ */ +/* $NetBSD: fgetstr.c,v 1.10 2009/12/02 09:03:13 roy Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include -__RCSID("$NetBSD: fgetstr.c,v 1.9 2009/12/01 00:03:53 roy Exp $"); +__RCSID("$NetBSD: fgetstr.c,v 1.10 2009/12/02 09:03:13 roy Exp $"); #include "namespace.h" @@ -58,7 +58,7 @@ p = (char *)fp->_lb._base; size = fp->_lb._size; - n = getdelim(&p, &size, sep, fp); + n = __getdelim(&p, &size, sep, fp); fp->_lb._base = (unsigned char *)p; /* The struct size variable is only an int . * This still works when exceeded, but the buffer could be @@ -69,7 +69,7 @@ fp->_lb._size = (int)size; if (n == -1) { *lenp = 0; - if (errno == EOVERFLOW) /* fixup errno */ + if (__sferror(fp) && errno == EOVERFLOW) /* fixup errno */ errno = EINVAL; return NULL; } Index: src/lib/libc/stdio/getdelim.c diff -u src/lib/libc/stdio/getdelim.c:1.9 src/lib/libc/stdio/getdelim.c:1.10 --- src/lib/libc/stdio/getdelim.c:1.9 Tue Dec 1 00:52:13 2009 +++ src/lib/libc/stdio/getdelim.c Wed Dec 2 09:03:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: getdelim.c,v 1.9 2009/12/01 00:52:13 roy Exp $ */ +/* $NetBSD: getdelim.c,v 1.10 2009/12/02 09:03:13 roy Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include -__RCSID("$NetBSD: getdelim.c,v 1.9 2009/12/01 00:52:13 roy Exp $"); +__RCSID("$NetBSD: getdelim.c,v 1.10 2009/12/02 09:03:13 roy Exp $"); #include "namespace.h" @@ -54,7 +54,7 @@ #define MINBUF 128 ssize_t -getdelim(char **__restrict buf, size_t *__restrict buflen, +__getdelim(char **__restrict buf, size_t *__restrict buflen, int sep, FILE *__restrict fp) { unsigned char *p; @@ -72,7 +72,6 @@ if (*buf == NULL) *buflen = 0; - FLOCKFILE(fp); _SET_ORIENTATION(fp, -1); off = 0; do { @@ -127,7 +126,6 @@ fp->_p += (int)len; off += len; } while (p == NULL); - FUNLOCKFILE(fp); /* POSIX demands we return -1 on EOF. */ if (off == 0) @@ -139,6 +137,17 @@ error: fp->_flags |= __SERR; - FUNLOCKFILE(fp); return -1; } + +ssize_t +getdelim(char **__restrict buf, size_t *__restrict buflen, +int sep, FILE *__restrict fp) +{ + ssize_t n; + + FLOCKFILE(fp); + n = __getdelim(buf, buflen, sep, fp); + FUNLOCKFILE(fp); + return n; +} Index: src/lib/libc/stdio/local.h diff -u src/lib/libc/stdio/local.h:1.22 src/lib/libc/stdio/local.h:1.23 --- src/lib/libc/st
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: enami Date: Wed Dec 2 09:34:51 UTC 2009 Modified Files: src/lib/libc/stdlib: setenv.c Log Message: Retain old variables when failed to allocate memory. To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/lib/libc/stdlib/setenv.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/stdlib/setenv.c diff -u src/lib/libc/stdlib/setenv.c:1.31 src/lib/libc/stdlib/setenv.c:1.32 --- src/lib/libc/stdlib/setenv.c:1.31 Sat Nov 1 00:54:47 2008 +++ src/lib/libc/stdlib/setenv.c Wed Dec 2 09:34:51 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: setenv.c,v 1.31 2008/11/01 00:54:47 christos Exp $ */ +/* $NetBSD: setenv.c,v 1.32 2009/12/02 09:34:51 enami Exp $ */ /* * Copyright (c) 1987, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)setenv.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: setenv.c,v 1.31 2008/11/01 00:54:47 christos Exp $"); +__RCSID("$NetBSD: setenv.c,v 1.32 2009/12/02 09:34:51 enami Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -103,9 +103,9 @@ continue; size = cc - name; /* name + `=' + value */ - if ((environ[offset] = malloc(size + l_value + 2)) == NULL) + if ((c = malloc(size + l_value + 2)) == NULL) goto bad; - c = environ[offset]; + environ[offset] = c; (void)memcpy(c, name, size); c += size; *c++ = '=';
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: nakayama Date: Wed Dec 2 10:18:42 UTC 2009 Modified Files: src/sys/arch/sparc64/sparc64: machdep.c Log Message: In calculating initial tstate, cast to 64-bit first to avoid sign extension. To generate a diff of this commit: cvs rdiff -u -r1.248 -r1.249 src/sys/arch/sparc64/sparc64/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/machdep.c diff -u src/sys/arch/sparc64/sparc64/machdep.c:1.248 src/sys/arch/sparc64/sparc64/machdep.c:1.249 --- src/sys/arch/sparc64/sparc64/machdep.c:1.248 Sat Nov 21 04:16:52 2009 +++ src/sys/arch/sparc64/sparc64/machdep.c Wed Dec 2 10:18:42 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.248 2009/11/21 04:16:52 rmind Exp $ */ +/* $NetBSD: machdep.c,v 1.249 2009/12/02 10:18:42 nakayama Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.248 2009/11/21 04:16:52 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.249 2009/12/02 10:18:42 nakayama Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -270,9 +270,8 @@ break; } #endif - tstate = (ASI_PRIMARY_NO_FAULTtf_tstate & TSTATE_CWP); if ((fs = l->l_md.md_fpstate) != NULL) { /* * We hold an FPU state. If we own *the* FPU chip state
CVS commit: src/lib/libc/stdio
Module Name:src Committed By: roy Date: Wed Dec 2 11:14:47 UTC 2009 Modified Files: src/lib/libc/stdio: getdelim.c Log Message: Pass lint. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/lib/libc/stdio/getdelim.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/stdio/getdelim.c diff -u src/lib/libc/stdio/getdelim.c:1.10 src/lib/libc/stdio/getdelim.c:1.11 --- src/lib/libc/stdio/getdelim.c:1.10 Wed Dec 2 09:03:13 2009 +++ src/lib/libc/stdio/getdelim.c Wed Dec 2 11:14:47 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: getdelim.c,v 1.10 2009/12/02 09:03:13 roy Exp $ */ +/* $NetBSD: getdelim.c,v 1.11 2009/12/02 11:14:47 roy Exp $ */ /* * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include -__RCSID("$NetBSD: getdelim.c,v 1.10 2009/12/02 09:03:13 roy Exp $"); +__RCSID("$NetBSD: getdelim.c,v 1.11 2009/12/02 11:14:47 roy Exp $"); #include "namespace.h" @@ -90,12 +90,13 @@ else len = (p - fp->_p) + 1; - newlen = off + len + 1; + newlen = off + len; /* Ensure we can handle it */ - if (newlen < off || newlen > (size_t)SSIZE_MAX + 1) { + if (newlen < off || newlen > SIZE_MAX) { errno = EOVERFLOW; goto error; } + newlen++; /* reserve space for the NULL terminator */ if (newlen > *buflen) { if (newlen < MINBUF) newlen = MINBUF;
CVS commit: src/sys/sys
Module Name:src Committed By: stacktic Date: Wed Dec 2 12:40:12 UTC 2009 Modified Files: src/sys/sys: device_if.h Log Message: Added RCS id. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/sys/device_if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/device_if.h diff -u src/sys/sys/device_if.h:1.2 src/sys/sys/device_if.h:1.3 --- src/sys/sys/device_if.h:1.2 Thu Nov 5 00:34:05 2009 +++ src/sys/sys/device_if.h Wed Dec 2 12:40:12 2009 @@ -1,3 +1,4 @@ +/* $NetBSD: device_if.h,v 1.3 2009/12/02 12:40:12 stacktic Exp $ */ #ifndef _SYS_DEVICE_IF_H #define _SYS_DEVICE_IF_H
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: pooka Date: Wed Dec 2 12:45:35 UTC 2009 Modified Files: src/lib/libc/stdlib: strtoul.3 Log Message: Document that strtouq can return UQUAD_MAX. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/lib/libc/stdlib/strtoul.3 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/stdlib/strtoul.3 diff -u src/lib/libc/stdlib/strtoul.3:1.23 src/lib/libc/stdlib/strtoul.3:1.24 --- src/lib/libc/stdlib/strtoul.3:1.23 Thu Jul 23 13:38:57 2009 +++ src/lib/libc/stdlib/strtoul.3 Wed Dec 2 12:45:35 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: strtoul.3,v 1.23 2009/07/23 13:38:57 wiz Exp $ +.\" $NetBSD: strtoul.3,v 1.24 2009/12/02 12:45:35 pooka Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -33,7 +33,7 @@ .\" .\" from: @(#)strtoul.3 8.1 (Berkeley) 6/4/93 .\" -.Dd July 23, 2009 +.Dd December 2, 2009 .Dt STRTOUL 3 .Os .Sh NAME @@ -173,6 +173,9 @@ .Fn strtoumax returns .Dv UINTMAX_MAX , +.Fn strtouq +return +.Dv UQUAD_MAX , and the global variable .Va errno is set to
CVS commit: src/lib/libc/stdlib
Module Name:src Committed By: pooka Date: Wed Dec 2 12:50:27 UTC 2009 Modified Files: src/lib/libc/stdlib: strtoul.3 Log Message: tyop de fix To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/lib/libc/stdlib/strtoul.3 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/stdlib/strtoul.3 diff -u src/lib/libc/stdlib/strtoul.3:1.24 src/lib/libc/stdlib/strtoul.3:1.25 --- src/lib/libc/stdlib/strtoul.3:1.24 Wed Dec 2 12:45:35 2009 +++ src/lib/libc/stdlib/strtoul.3 Wed Dec 2 12:50:27 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: strtoul.3,v 1.24 2009/12/02 12:45:35 pooka Exp $ +.\" $NetBSD: strtoul.3,v 1.25 2009/12/02 12:50:27 pooka Exp $ .\" .\" Copyright (c) 1990, 1991, 1993 .\" The Regents of the University of California. All rights reserved. @@ -174,7 +174,7 @@ returns .Dv UINTMAX_MAX , .Fn strtouq -return +returns .Dv UQUAD_MAX , and the global variable .Va errno
CVS commit: src/sys/dev/ic
Module Name:src Committed By: kiyohara Date: Wed Dec 2 12:51:50 UTC 2009 Modified Files: src/sys/dev/ic: lan9118.c lan9118reg.h Log Message: Maybe supported LAN9218 Family. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/dev/ic/lan9118.c cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/lan9118reg.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/lan9118.c diff -u src/sys/dev/ic/lan9118.c:1.9 src/sys/dev/ic/lan9118.c:1.10 --- src/sys/dev/ic/lan9118.c:1.9 Sun Nov 29 10:17:01 2009 +++ src/sys/dev/ic/lan9118.c Wed Dec 2 12:51:50 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lan9118.c,v 1.9 2009/11/29 10:17:01 kiyohara Exp $ */ +/* $NetBSD: lan9118.c,v 1.10 2009/12/02 12:51:50 kiyohara Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -25,11 +25,10 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.9 2009/11/29 10:17:01 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lan9118.c,v 1.10 2009/12/02 12:51:50 kiyohara Exp $"); /* * The LAN9118 Family - * * * The LAN9118 is targeted for 32-bit applications requiring high * performance, and provides the highest level of performance possible for * a non-PCI 10/100 Ethernet controller. @@ -43,6 +42,9 @@ * is for 32-bit host processors, while the LAN9115 is for 16-bit * applications, which may also require an external PHY. Both devices * deliver superior levels of performance. + * + * The LAN9218 Family + * Also support HP Auto-MDIX. */ #include "bpfilter.h" @@ -178,8 +180,8 @@ sc->sc_id = LAN9118_ID_REV_ID(val); sc->sc_rev = LAN9118_ID_REV_REV(val); -#define LAN9xxx_ID(id) ((id) >= 0x9000 ? (id) & 0xfff : \ - ((id) >= 0x1000 ? ((id) >> 4) + 0x100 : (id))) +#define LAN9xxx_ID(id) \ + (IS_LAN9118(id) ? (id) : (IS_LAN9218(id) ? ((id) >> 4) + 0x100 : (id) & 0xfff)) aprint_normal(": SMSC LAN9%03x Rev %d\n", LAN9xxx_ID(sc->sc_id), sc->sc_rev); @@ -236,7 +238,8 @@ * number that above. */ sc->sc_mii.mii_instance++; - if (sc->sc_id == LAN9118_ID_9115 || sc->sc_id == LAN9118_ID_9117) { + if (sc->sc_id == LAN9118_ID_9115 || sc->sc_id == LAN9118_ID_9117 || + sc->sc_id == LAN9218_ID_9215 || sc->sc_id == LAN9218_ID_9217) { if (bus_space_read_4(sc->sc_iot, sc->sc_ioh, LAN9118_HW_CFG) & LAN9118_HW_CFG_EXT_PHY_DET) { /* Index: src/sys/dev/ic/lan9118reg.h diff -u src/sys/dev/ic/lan9118reg.h:1.1 src/sys/dev/ic/lan9118reg.h:1.2 --- src/sys/dev/ic/lan9118reg.h:1.1 Sun Aug 9 06:40:10 2009 +++ src/sys/dev/ic/lan9118reg.h Wed Dec 2 12:51:50 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: lan9118reg.h,v 1.1 2009/08/09 06:40:10 kiyohara Exp $ */ +/* $NetBSD: lan9118reg.h,v 1.2 2009/12/02 12:51:50 kiyohara Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi * All rights reserved. @@ -30,10 +30,16 @@ #define LAN9118_IOSIZE 0x100 -#define LAN9118_ID_9115 0x115 -#define LAN9118_ID_9116 0x116 -#define LAN9118_ID_9117 0x117 -#define LAN9118_ID_9118 0x118 +#define LAN9118_ID_9115 0x0115 +#define LAN9118_ID_9116 0x0116 +#define LAN9118_ID_9117 0x0117 +#define LAN9118_ID_9118 0x0118 +#define LAN9218_ID_9215 0x115a +#define LAN9218_ID_9217 0x117a +#define LAN9218_ID_9218 0x118a + +#define IS_LAN9118(id) ((id) >= LAN9118_ID_9115 && (id) <= LAN9118_ID_9118) +#define IS_LAN9218(id) ((id) >= LAN9218_ID_9215 && (id) <= LAN9218_ID_9218) #define LAN9118_IPHY_ADDR 0x01 /* Internal PHY Address */
CVS commit: src/sys/sys
Module Name:src Committed By: stacktic Date: Wed Dec 2 12:52:28 UTC 2009 Modified Files: src/sys/sys: device_if.h Log Message: KNF To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/sys/device_if.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/sys/device_if.h diff -u src/sys/sys/device_if.h:1.3 src/sys/sys/device_if.h:1.4 --- src/sys/sys/device_if.h:1.3 Wed Dec 2 12:40:12 2009 +++ src/sys/sys/device_if.h Wed Dec 2 12:52:28 2009 @@ -1,4 +1,5 @@ -/* $NetBSD: device_if.h,v 1.3 2009/12/02 12:40:12 stacktic Exp $ */ +/* $NetBSD: device_if.h,v 1.4 2009/12/02 12:52:28 stacktic Exp $ */ + #ifndef _SYS_DEVICE_IF_H #define _SYS_DEVICE_IF_H
CVS commit: src/share/man/man4
Module Name:src Committed By: kiyohara Date: Wed Dec 2 12:54:15 UTC 2009 Modified Files: src/share/man/man4: smsh.4 Log Message: Maybe supported LAN9218 Family. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/smsh.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/smsh.4 diff -u src/share/man/man4/smsh.4:1.2 src/share/man/man4/smsh.4:1.3 --- src/share/man/man4/smsh.4:1.2 Sun Aug 9 07:40:46 2009 +++ src/share/man/man4/smsh.4 Wed Dec 2 12:54:15 2009 @@ -1,4 +1,4 @@ -.\" $NetBSD: smsh.4,v 1.2 2009/08/09 07:40:46 wiz Exp $ +.\" $NetBSD: smsh.4,v 1.3 2009/12/02 12:54:15 kiyohara Exp $ .\" .\" Copyright (c) 2009 KIYOHARA Takashi .\" All rights reserved. @@ -24,24 +24,26 @@ .\" ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 29, 2009 +.Dd December 2, 2009 .Dt SMSH 4 .Os .Sh NAME .Nm smsh -.Nd SMSC LAN9118 Family Ethernet interfaces device driver +.Nd SMSC LAN9118/LAN9218 Family Ethernet interfaces device driver .Sh SYNOPSIS .Cd "smsh0 at gxio? port 0x4300 gpirq 99" .Sh DESCRIPTION The .Nm -device driver supports SMSC LAN9118 Family Ethernet interfaces. +device driver supports SMSC LAN9118 and LAN9218 Family Ethernet interfaces. .Pp The ISA attachment of the .Nm driver supports any LAN9118 Family Ethernet interface on the ISA bus, the on-board LAN9118 Family Ethernet found in many embedded PCs. However, no ISA attachment has been written yet. +.Pp +LAN9218 Family supports also HP Auto-MDIX. .Sh MEDIA SELECTION Media selection done using .Xr ifconfig 8
CVS commit: src/sys/arch/evbarm/gumstix
Module Name:src Committed By: kiyohara Date: Wed Dec 2 13:05:09 UTC 2009 Modified Files: src/sys/arch/evbarm/gumstix: gxio.c Log Message: Enable latest bluetooth module (Infineon PBA31308). To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbarm/gumstix/gxio.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/evbarm/gumstix/gxio.c diff -u src/sys/arch/evbarm/gumstix/gxio.c:1.12 src/sys/arch/evbarm/gumstix/gxio.c:1.13 --- src/sys/arch/evbarm/gumstix/gxio.c:1.12 Sun Nov 22 12:00:56 2009 +++ src/sys/arch/evbarm/gumstix/gxio.c Wed Dec 2 13:05:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: gxio.c,v 1.12 2009/11/22 12:00:56 kiyohara Exp $ */ +/* $NetBSD: gxio.c,v 1.13 2009/12/02 13:05:09 kiyohara Exp $ */ /* * Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation. * All rights reserved. @@ -31,7 +31,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__KERNEL_RCSID(0, "$NetBSD: gxio.c,v 1.12 2009/11/22 12:00:56 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gxio.c,v 1.13 2009/12/02 13:05:09 kiyohara Exp $"); #include "opt_gxio.h" @@ -123,6 +123,7 @@ static struct pxa2x0_gpioconf verdexdep_gpioconf[] = { /* Bluetooth module configuration */ { 9, GPIO_ALT_FN_3_OUT }, /* CHOUT<0> */ + { 12, GPIO_OUT | GPIO_SET }, /* LCD configuration */ { 17, GPIO_IN }, /* backlight on */ @@ -278,7 +279,11 @@ #endif /* XXX: turn off for power of bluetooth module */ +#if defined(CPU_XSCALE_PXA250) pxa2x0_gpio_set_function(7, GPIO_OUT | GPIO_CLR); +#elif defined(CPU_XSCALE_PXA270) + pxa2x0_gpio_set_function(12, GPIO_OUT | GPIO_CLR); +#endif delay(100); #if defined(CPU_XSCALE_PXA270) && defined(CPU_XSCALE_PXA250)
CVS commit: src/sys/arch/evbarm/gumstix
Module Name:src Committed By: kiyohara Date: Wed Dec 2 13:10:09 UTC 2009 Modified Files: src/sys/arch/evbarm/gumstix: gumstix_machdep.c Log Message: Call pxa2x0_clkman_config() instead of ioreg_write(). To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/evbarm/gumstix/gumstix_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbarm/gumstix/gumstix_machdep.c diff -u src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.20 src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.21 --- src/sys/arch/evbarm/gumstix/gumstix_machdep.c:1.20 Fri Nov 27 03:23:06 2009 +++ src/sys/arch/evbarm/gumstix/gumstix_machdep.c Wed Dec 2 13:10:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: gumstix_machdep.c,v 1.20 2009/11/27 03:23:06 rmind Exp $ */ +/* $NetBSD: gumstix_machdep.c,v 1.21 2009/12/02 13:10:09 kiyohara Exp $ */ /* * Copyright (C) 2005, 2006, 2007 WIDE Project and SOUM Corporation. * All rights reserved. @@ -498,6 +498,8 @@ /* configure GPIOs. */ gxio_config_pin(); + pxa2x0_clkman_bootstrap(GUMSTIX_CLKMAN_VBASE); + consinit(); #ifdef KGDB kgdb_port_init(); @@ -1021,10 +1023,6 @@ consinit(void) { static int consinit_called = 0; -#if defined(FFUARTCONSOLE) || defined(STUARTCONSOLE) || \ -defined(BTUARTCONSOLE) || defined(HWUARTCONSOLE) - uint32_t ckenreg = ioreg_read(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN); -#endif if (consinit_called != 0) return; @@ -1042,9 +1040,7 @@ { if (0 == comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_FFUART_BASE, comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode)) { - ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN, - ckenreg|CKEN_FFUART); - + pxa2x0_clkman_config(CKEN_FFUART, 1); return; } } @@ -1059,8 +1055,7 @@ { if (0 == comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_STUART_BASE, comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode)) { - ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN, - ckenreg|CKEN_STUART); + pxa2x0_clkman_config(CKEN_STUART, 1); return; } } @@ -1075,8 +1070,7 @@ { if (0 == comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_BTUART_BASE, comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode)) { - ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN, - ckenreg|CKEN_BTUART); + pxa2x0_clkman_config(CKEN_BTUART, 1); return; } } @@ -1091,8 +1085,7 @@ { if (0 == comcnattach(&pxa2x0_a4x_bs_tag, PXA2X0_HWUART_BASE, comcnspeed, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comcnmode)) { - ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN, - ckenreg|CKEN_HWUART); + pxa2x0_clkman_config(CKEN_HWUART, 1); return; } } @@ -,28 +1104,27 @@ { #if (NCOM > 0) && defined(COM_PXA2X0) paddr_t paddr = 0; - uint32_t ckenreg = ioreg_read(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN); + int cken = 0; if (0 == strcmp(kgdb_devname, "ffuart")) { paddr = PXA2X0_FFUART_BASE; - ckenreg |= CKEN_FFUART; + cken = CKEN_FFUART; } else if (0 == strcmp(kgdb_devname, "stuart")) { paddr = PXA2X0_STUART_BASE; - ckenreg |= CKEN_STUART; + cken = CKEN_STUART; } else if (0 == strcmp(kgdb_devname, "btuart")) { paddr = PXA2X0_BTUART_BASE; - ckenreg |= CKEN_BTUART; + cken = CKEN_BTUART; } else if (0 == strcmp(kgdb_devname, "hwuart")) { paddr = PXA2X0_HWUART_BASE; - ckenreg |= CKEN_HWUART; + cken = CKEN_HWUART; } if (paddr && 0 == com_kgdb_attach(&pxa2x0_a4x_bs_tag, paddr, kgdb_devrate, PXA2X0_COM_FREQ, COM_TYPE_PXA2x0, comkgdbmode)) { - ioreg_write(GUMSTIX_CLKMAN_VBASE + CLKMAN_CKEN, ckenreg); - + pxa2x0_clkman_config(cken, 1); } #endif
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed Dec 2 13:45:13 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Whitespace. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/hp700/hp700/mainbus.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/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.56 src/sys/arch/hp700/hp700/mainbus.c:1.57 --- src/sys/arch/hp700/hp700/mainbus.c:1.56 Wed Nov 11 16:08:31 2009 +++ src/sys/arch/hp700/hp700/mainbus.c Wed Dec 2 13:45:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.56 2009/11/11 16:08:31 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.57 2009/12/02 13:45:13 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.56 2009/11/11 16:08:31 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.57 2009/12/02 13:45:13 skrll Exp $"); #include "locators.h" #include "power.h" @@ -396,7 +396,7 @@ * Allocate the region of I/O space. */ error = extent_alloc_subregion1(hp700_io_extent, rstart, rend, size, - align, 0, boundary, EX_NOWAIT, &bpa); + align, 0, boundary, EX_NOWAIT, &bpa); if (error) return (error);
CVS commit: src/sys/arch/hp700/hp700
Module Name:src Committed By: skrll Date: Wed Dec 2 13:49:32 UTC 2009 Modified Files: src/sys/arch/hp700/hp700: mainbus.c Log Message: Define DPRINTF and use it. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/arch/hp700/hp700/mainbus.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/hp700/hp700/mainbus.c diff -u src/sys/arch/hp700/hp700/mainbus.c:1.57 src/sys/arch/hp700/hp700/mainbus.c:1.58 --- src/sys/arch/hp700/hp700/mainbus.c:1.57 Wed Dec 2 13:45:13 2009 +++ src/sys/arch/hp700/hp700/mainbus.c Wed Dec 2 13:49:32 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.57 2009/12/02 13:45:13 skrll Exp $ */ +/* $NetBSD: mainbus.c,v 1.58 2009/12/02 13:49:32 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.57 2009/12/02 13:45:13 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.58 2009/12/02 13:49:32 skrll Exp $"); #include "locators.h" #include "power.h" @@ -83,6 +83,18 @@ static struct pdc_hpa pdc_hpa PDC_ALIGNMENT; +#ifdef MBUSDEBUG + +#define DPRINTF(s) do { \ + if (mbusdebug) \ + printf s; \ +} while(0) + +int mbusdebug = 1; +#else +#define DPRINTF(s) /* */ +#endif + struct mainbus_softc { device_t sc_dv; @@ -178,6 +190,9 @@ int error; #endif /* USE_BTLB */ + DPRINTF(("\n%s(%lx,%lx,%scachable,%p)\n", __func__, + bpa, size, flags? "" : "non", bshp)); + /* * We must be called with a page-aligned address in * I/O space, and with a multiple of the page size. @@ -330,9 +345,9 @@ error = mbus_add_mapping(bpa, size, flags, bshp); *bshp |= offset; if (error) { + DPRINTF(("bus_space_map: pa 0x%lx, size 0x%lx failed\n", + bpa, size)); if (extent_free(hp700_io_extent, bpa, size, EX_NOWAIT)) { - printf ("bus_space_map: pa 0x%lx, size 0x%lx\n", -bpa, size); printf ("bus_space_map: can't free region\n"); } } @@ -367,8 +382,8 @@ */ error = extent_free(hp700_io_extent, bpa, size, EX_NOWAIT); if (error) { - printf("bus_space_unmap: ps 0x%lx, size 0x%lx\n", - bpa, size); + DPRINTF(("bus_space_unmap: ps 0x%lx, size 0x%lx\n", + bpa, size)); panic("bus_space_unmap: can't free region (%d)", error); } } @@ -405,9 +420,9 @@ */ error = mbus_add_mapping(bpa, size, flags, bshp); if (error) { + DPRINTF(("bus_space_alloc: pa 0x%lx, size 0x%lx failed\n", + bpa, size)); if (extent_free(hp700_io_extent, bpa, size, EX_NOWAIT)) { - printf("bus_space_alloc: pa 0x%lx, size 0x%lx\n", -bpa, size); printf("bus_space_alloc: can't free region\n"); } }
CVS commit: src/share/mk
Module Name:src Committed By: uebayasi Date: Wed Dec 2 14:11:20 UTC 2009 Modified Files: src/share/mk: bsd.own.mk Log Message: Define lists of MK* variable names as _MKVARS.yes and _MKVARS.no. They're referred to by syspkg. To generate a diff of this commit: cvs rdiff -u -r1.599 -r1.600 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.599 src/share/mk/bsd.own.mk:1.600 --- src/share/mk/bsd.own.mk:1.599 Tue Dec 1 09:09:40 2009 +++ src/share/mk/bsd.own.mk Wed Dec 2 14:11:20 2009 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.599 2009/12/01 09:09:40 uebayasi Exp $ +# $NetBSD: bsd.own.mk,v 1.600 2009/12/02 14:11:20 uebayasi Exp $ .if !defined(_BSD_OWN_MK_) _BSD_OWN_MK_=1 @@ -665,7 +665,7 @@ # # MK* options which default to "yes". # -.for var in \ +_MKVARS.yes= \ MKATF \ MKBINUTILS \ MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS \ @@ -685,13 +685,14 @@ MKSHARE MKSKEY MKSTATICLIB \ MKX11FONTS \ MKYP +.for var in ${_MKVARS.yes} ${var}?= yes .endfor # # MK* options which default to "no". # -.for var in \ +_MKVARS.no= \ MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \ MKEXTSRC \ MKLVM \ @@ -699,6 +700,7 @@ MKPCC MKPCCCMDS \ MKSOFTFLOAT MKSTRIPIDENT \ MKUNPRIVED MKUPDATE MKX11 +.for var in ${_MKVARS.no} ${var}?=no .endfor
CVS commit: src/distrib/sets
Module Name:src Committed By: uebayasi Date: Wed Dec 2 14:13:12 UTC 2009 Modified Files: src/distrib/sets: sets.subr Log Message: Don't hardcode the list of MK* variables but use ${_MKVARS.yes} and ${_MKVARS.no} provided by bsd.own.mk. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/distrib/sets/sets.subr 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/sets.subr diff -u src/distrib/sets/sets.subr:1.93 src/distrib/sets/sets.subr:1.94 --- src/distrib/sets/sets.subr:1.93 Tue Dec 1 15:49:21 2009 +++ src/distrib/sets/sets.subr Wed Dec 2 14:13:12 2009 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.93 2009/12/01 15:49:21 apb Exp $ +# $NetBSD: sets.subr,v 1.94 2009/12/02 14:13:12 uebayasi Exp $ # # @@ -24,52 +24,6 @@ # as well as: # MKVARS="\ - MKBFD \ - MKBINUTILS \ - MKCATPAGES \ - MKCOMPAT \ - MKCRYPTO \ - MKCRYPTO_IDEA \ - MKCRYPTO_MDC2 \ - MKCRYPTO_RC5 \ - MKCVS \ - MKDEBUG \ - MKDEBUGLIB \ - MKDOC \ - MKDYNAMICROOT \ - MKEXTSRC \ - MKGCC \ - MKGCCCMDS \ - MKGDB \ - MKHESIOD \ - MKHTML \ - MKINET6 \ - MKINFO \ - MKIPFILTER \ - MKISCSI \ - MKKERBEROS \ - MKKMOD \ - MKLDAP \ - MKLINT \ - MKLVM \ - MKMAN \ - MKMANPAGES \ - MKMANZ \ - MKMDNS \ - MKNLS \ - MKNVI \ - MKPAM \ - MKPF \ - MKPIC \ - MKPOSTFIX \ - MKPROFILE \ - MKSHARE \ - MKSKEY \ - MKX11 \ - MKX11FONTS \ - MKXORG \ - MKYP \ - MKZFS \ USE_INET6 \ USE_KERBEROS \ USE_LDAP \ @@ -187,7 +141,7 @@ all: .for i in MACHINE MACHINE_ARCH MACHINE_CPU \ HAVE_BINUTILS HAVE_GCC HAVE_GDB OBJECT_FMT TOOLCHAIN_MISSING \ - ${MKVARS} + \${_MKVARS.yes} \${_MKVARS.no} @echo "export \$i=\${\$i}" .endfor @@ -241,7 +195,7 @@ # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.93 2009/12/01 15:49:21 apb Exp $ +# # $NetBSD: sets.subr,v 1.94 2009/12/02 14:13:12 uebayasi Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root
CVS commit: src/distrib/sets
Module Name:src Committed By: uebayasi Date: Wed Dec 2 14:28:24 UTC 2009 Modified Files: src/distrib/sets: sets.subr Log Message: Fix previous; don't forget extra vars other than MK*. To generate a diff of this commit: cvs rdiff -u -r1.94 -r1.95 src/distrib/sets/sets.subr 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/sets.subr diff -u src/distrib/sets/sets.subr:1.94 src/distrib/sets/sets.subr:1.95 --- src/distrib/sets/sets.subr:1.94 Wed Dec 2 14:13:12 2009 +++ src/distrib/sets/sets.subr Wed Dec 2 14:28:24 2009 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.94 2009/12/02 14:13:12 uebayasi Exp $ +# $NetBSD: sets.subr,v 1.95 2009/12/02 14:28:24 uebayasi Exp $ # # @@ -23,7 +23,9 @@ # OBJECT_FMT # as well as: # -MKVARS="\ + +# XXX don't hardcode +MKEXTRAVARS="\ USE_INET6 \ USE_KERBEROS \ USE_LDAP \ @@ -141,13 +143,13 @@ all: .for i in MACHINE MACHINE_ARCH MACHINE_CPU \ HAVE_BINUTILS HAVE_GCC HAVE_GDB OBJECT_FMT TOOLCHAIN_MISSING \ - \${_MKVARS.yes} \${_MKVARS.no} + ${MKEXTRAVARS} \${_MKVARS.yes} \${_MKVARS.no} @echo "export \$i=\${\$i}" .endfor EOMAKE ); do -# echo 1>&2 "DEBUG: read $x" + echo 1>&2 "DEBUG: read $x" eval $x done IFS=$oIFS @@ -195,7 +197,7 @@ # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.94 2009/12/02 14:13:12 uebayasi Exp $ +# # $NetBSD: sets.subr,v 1.95 2009/12/02 14:28:24 uebayasi Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root
CVS commit: src/distrib/sets
Module Name:src Committed By: uebayasi Date: Wed Dec 2 14:32:15 UTC 2009 Modified Files: src/distrib/sets: sets.subr Log Message: Quote variable values from make in case it has spaces. Remove debug print. To generate a diff of this commit: cvs rdiff -u -r1.95 -r1.96 src/distrib/sets/sets.subr 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/sets.subr diff -u src/distrib/sets/sets.subr:1.95 src/distrib/sets/sets.subr:1.96 --- src/distrib/sets/sets.subr:1.95 Wed Dec 2 14:28:24 2009 +++ src/distrib/sets/sets.subr Wed Dec 2 14:32:15 2009 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.95 2009/12/02 14:28:24 uebayasi Exp $ +# $NetBSD: sets.subr,v 1.96 2009/12/02 14:32:15 uebayasi Exp $ # # @@ -144,12 +144,12 @@ .for i in MACHINE MACHINE_ARCH MACHINE_CPU \ HAVE_BINUTILS HAVE_GCC HAVE_GDB OBJECT_FMT TOOLCHAIN_MISSING \ ${MKEXTRAVARS} \${_MKVARS.yes} \${_MKVARS.no} - @echo "export \$i=\${\$i}" + @echo "export \$i=\"\${\$i}\"" .endfor EOMAKE ); do - echo 1>&2 "DEBUG: read $x" +# echo 1>&2 "DEBUG: read $x" eval $x done IFS=$oIFS @@ -197,7 +197,7 @@ # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.95 2009/12/02 14:28:24 uebayasi Exp $ +# # $NetBSD: sets.subr,v 1.96 2009/12/02 14:32:15 uebayasi Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root
CVS commit: src/distrib/sets
Module Name:src Committed By: uebayasi Date: Wed Dec 2 15:05:55 UTC 2009 Modified Files: src/distrib/sets: sets.subr Log Message: Pass the correct ${MKVARS} equivalent value to list_set_files(). XXX list_set_files() needs to be rewritten. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/distrib/sets/sets.subr 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/sets.subr diff -u src/distrib/sets/sets.subr:1.96 src/distrib/sets/sets.subr:1.97 --- src/distrib/sets/sets.subr:1.96 Wed Dec 2 14:32:15 2009 +++ src/distrib/sets/sets.subr Wed Dec 2 15:05:55 2009 @@ -1,6 +1,8 @@ -# $NetBSD: sets.subr,v 1.96 2009/12/02 14:32:15 uebayasi Exp $ +# $NetBSD: sets.subr,v 1.97 2009/12/02 15:05:55 uebayasi Exp $ # +set -vx + # # The following variables contain defaults for sets.subr functions and callers: # setsdir path to src/distrib/sets @@ -124,6 +126,15 @@ oIFS=$IFS IFS=" " +for i in _MKVARS.yes _MKVARS.no; do + eval $( +${MAKE} -B -f- all < +all: + @echo "export _MKVARS_${i#*.}=\"\${$i}\"" +EOMAKE +) +done for x in $( ${MAKE} -B -f- all < @@ -197,7 +208,7 @@ # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.96 2009/12/02 14:32:15 uebayasi Exp $ +# # $NetBSD: sets.subr,v 1.97 2009/12/02 15:05:55 uebayasi Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root @@ -298,7 +309,7 @@ if (obsolete) wanted["obsolete"] = 1 - split("'"${MKVARS}"'", needvars) + split("'"${MKEXTRAVARS} ${_MKVARS_yes} ${_MKVARS_no}"'", needvars) for (vi in needvars) { nv = needvars[vi] kw = tolower(nv)
CVS commit: src/dist/pf
Module Name:src Committed By: martti Date: Wed Dec 2 15:07:09 UTC 2009 Added Files: src/dist/pf: README.NetBSD Log Message: Initial version. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/dist/pf/README.NetBSD Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/dist/pf/README.NetBSD diff -u /dev/null src/dist/pf/README.NetBSD:1.1 --- /dev/null Wed Dec 2 15:07:09 2009 +++ src/dist/pf/README.NetBSD Wed Dec 2 15:07:09 2009 @@ -0,0 +1,301 @@ +# +# $NetBSD: README.NetBSD,v 1.1 2009/12/02 15:07:09 martti Exp $ +# +# Author: Martti Kuparinen +# +# This file contains copy-pastable commands to import a new PF release +# into the NetBSD repository. Before importing the code into the official +# NetBSD repository, you'll import the code into your own local test +# repository, resolve the conflicts and make sure everything works as expected. +# +# Steps in this document: +# 1) Get the PF dist files and a copy of the CVS repository +# 2) Create a local test repository for the test imports +# 3) Import the new PF release into the test repository +# 4) Resolve conflicts and make other adjustments +# 5) Save the required modifications +# 6) Re-create a local test repository for the final test import +# 7) Import the new PF release into the test repository +# 8) Apply the fixes +# 9) Compile everything and make sure the new version really works +# 10) Update your /usr/src (cd /usr/src && cvs update -dPA) +# 11) Import the new PF release into the NetBSD repository +# 12) Apply the fixes +# 13) Update your /usr/src one more time (cd /usr/src && cvs update -dPA) +# 14) Compile and install everything +# 15) Update src/doc/3RDPARTY and src/doc/CHANGES +# 16) Send an announcement to current-users +# + +### +### +# COMMON SETTINGS FOR EVERYTHING BELOW +### +### + +export NETBSDUSERNAME="fixthis" +export VERSION="4.6" +export VERTAG="`echo ${VERSION} | sed 's+\.+_+g'`" +export VEROLD="v4_2" +export VERNEW="v4_6" +export ORIG="${HOME}/netbsd/orig" +export WORK="${HOME}/netbsd/work" +export FIXES="${HOME}/netbsd/fixes/${VERSION}" +export RSYNC_RSH="ssh -4" +export RSYNC="rsync -avzr --delete" + +### +### +# Fetch the official PF sources +### +### + +mkdir -p ${ORIG}/openbsd-${VERSION} +cd ${ORIG}/openbsd-${VERSION} +if [ ! -f src.tar.gz ]; then + ftp ftp://ftp.df.lth.se/pub/OpenBSD/${VERSION}/src.tar.gz +fi +if [ ! -f sys.tar.gz ]; then + ftp ftp://ftp.df.lth.se/pub/OpenBSD/${VERSION}/sys.tar.gz +fi + +### +### +# GET COPY OF THE CVS REPOSITORY FOR LOCAL TEST IMPORTS +### +### + +RSYNC_RSH="ssh -4" +RSYNC="rsync -avzr --delete -e ssh" +S="${netbsduserna...@cvs.netbsd.org::cvsroot" +D="${ORIG}/cvsroot" + +if [ "${NETBSDUSERNAME}" = "fixthis" ]; then + echo "You MUST use your real NetBSD user name..." + sleep 86400 +fi +${RSYNC} ${S}/src/ ${D}/src +${RSYNC} --exclude 'commitlog*' --exclude 'history*' ${S}/CVSROOT/ ${D}/CVSROOT + +### +### +# TEST IMPORT 1 +### +### + +# Get a new repository +mkdir -p ${WORK} +${RSYNC} ${ORIG}/cvsroot ${WORK} +rm -f ${WORK}/cvsroot/CVSROOT/commitinfo* +rm -f ${WORK}/cvsroot/CVSROOT/loginfo* +touch ${WORK}/cvsroot/CVSROOT/commitinfo +touch ${WORK}/cvsroot/CVSROOT/loginfo +chmod 644 ${WORK}/cvsroot/CVSROOT/config +sed 's+/cvslock+/tmp/cvslock+' < ${WORK}/cvsroot/CVSROOT/config \ + > ${WORK}/cvsroot/CVSROOT/config.1 +grep -v -e tag= -e AdminGroup= -e AdminOptions= \ + < ${WORK}/cvsroot/CVSROOT/config.1 > ${WORK}/cvsroot/CVSROOT/config +chmod 444 ${WORK}/cvsroot/CVSROOT/config +rm -f ${WORK}/cvsroot/CVSROOT/config.1 +mkdir -p /tmp/cvslock +export CVSROOT="${WORK}/cvsroot" + +# Checkout a working copy +cd ${WORK} +rm -rf src +cvs co -P src + +or + +cd ${WORK}/src +rm -
CVS commit: src/distrib/sets
Module Name:src Committed By: uebayasi Date: Wed Dec 2 15:18:06 UTC 2009 Modified Files: src/distrib/sets: sets.subr Log Message: Add EXTSRCS to the list of syspkgs aware variables. Remove debug code. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/distrib/sets/sets.subr 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/sets.subr diff -u src/distrib/sets/sets.subr:1.97 src/distrib/sets/sets.subr:1.98 --- src/distrib/sets/sets.subr:1.97 Wed Dec 2 15:05:55 2009 +++ src/distrib/sets/sets.subr Wed Dec 2 15:18:06 2009 @@ -1,8 +1,6 @@ -# $NetBSD: sets.subr,v 1.97 2009/12/02 15:05:55 uebayasi Exp $ +# $NetBSD: sets.subr,v 1.98 2009/12/02 15:18:06 uebayasi Exp $ # -set -vx - # # The following variables contain defaults for sets.subr functions and callers: # setsdir path to src/distrib/sets @@ -28,6 +26,7 @@ # XXX don't hardcode MKEXTRAVARS="\ + EXTSRCS \ USE_INET6 \ USE_KERBEROS \ USE_LDAP \ @@ -208,7 +207,7 @@ # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.97 2009/12/02 15:05:55 uebayasi Exp $ +# # $NetBSD: sets.subr,v 1.98 2009/12/02 15:18:06 uebayasi Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root
CVS commit: src/dist/pf
Module Name:src Committed By: martti Date: Wed Dec 2 15:21:37 UTC 2009 Modified Files: src/dist/pf: pf2netbsd Log Message: Removed obsolete files. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/dist/pf/pf2netbsd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/dist/pf/pf2netbsd diff -u src/dist/pf/pf2netbsd:1.1 src/dist/pf/pf2netbsd:1.2 --- src/dist/pf/pf2netbsd:1.1 Tue Dec 1 06:27:57 2009 +++ src/dist/pf/pf2netbsd Wed Dec 2 15:21:37 2009 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: pf2netbsd,v 1.1 2009/12/01 06:27:57 martti Exp $ +# $NetBSD: pf2netbsd,v 1.2 2009/12/02 15:21:37 martti Exp $ # # Copyright (c) 2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -93,16 +93,6 @@ share/man/man4/pfsync.4 share/man/man5/pf.conf.5 share/man/man5/pf.os.5 -share/pf/ackpri -share/pf/faq-example1 -share/pf/faq-example2 -share/pf/faq-example3 -share/pf/Makefile -share/pf/queue1 -share/pf/queue2 -share/pf/queue3 -share/pf/queue4 -share/pf/spamd usr.sbin/authpf/authpf.8 usr.sbin/authpf/authpf.c usr.sbin/authpf/Makefile
CVS commit: src/sys/arch/m68k
Module Name:src Committed By: tsutsui Date: Wed Dec 2 15:47:45 UTC 2009 Modified Files: src/sys/arch/m68k/include: pcb.h pmap_motorola.h src/sys/arch/m68k/m68k: pmap_motorola.c Log Message: Add a common pmap_bootstrap_finalize() function which initializes lwp0 uarea, curlwp, and curpcb after MMU is turned on, using lwp0uarea variable saved during pmap_bootstrap() (or equivalent functions) for pmap_motorola based ports. Discussed with rm...@. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/m68k/include/pcb.h cvs rdiff -u -r1.21 -r1.22 src/sys/arch/m68k/include/pmap_motorola.h cvs rdiff -u -r1.51 -r1.52 src/sys/arch/m68k/m68k/pmap_motorola.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/m68k/include/pcb.h diff -u src/sys/arch/m68k/include/pcb.h:1.7 src/sys/arch/m68k/include/pcb.h:1.8 --- src/sys/arch/m68k/include/pcb.h:1.7 Sun Mar 4 06:00:04 2007 +++ src/sys/arch/m68k/include/pcb.h Wed Dec 2 15:47:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pcb.h,v 1.7 2007/03/04 06:00:04 christos Exp $ */ +/* $NetBSD: pcb.h,v 1.8 2009/12/02 15:47:45 tsutsui Exp $ */ /* * Copyright (c) 1982, 1986, 1990, 1993 @@ -105,4 +105,7 @@ struct md_coredump { int md_exec[16]; /* exec structure for HP-UX core dumps */ }; + +extern struct pcb *curpcb; + #endif /* _M68K_PCB_H_ */ Index: src/sys/arch/m68k/include/pmap_motorola.h diff -u src/sys/arch/m68k/include/pmap_motorola.h:1.21 src/sys/arch/m68k/include/pmap_motorola.h:1.22 --- src/sys/arch/m68k/include/pmap_motorola.h:1.21 Wed Aug 26 00:30:02 2009 +++ src/sys/arch/m68k/include/pmap_motorola.h Wed Dec 2 15:47:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_motorola.h,v 1.21 2009/08/26 00:30:02 thorpej Exp $ */ +/* $NetBSD: pmap_motorola.h,v 1.22 2009/12/02 15:47:45 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -191,6 +191,10 @@ extern void *CADDR1, *CADDR2; extern void *msgbufaddr; +/* for lwp0 uarea initialization after MMU enabled */ +extern vaddr_t lwp0uarea; +void pmap_bootstrap_finalize(void); + vaddr_t pmap_map(vaddr_t, paddr_t, paddr_t, int); void pmap_procwr(struct proc *, vaddr_t, size_t); #define PMAP_NEED_PROCWR Index: src/sys/arch/m68k/m68k/pmap_motorola.c diff -u src/sys/arch/m68k/m68k/pmap_motorola.c:1.51 src/sys/arch/m68k/m68k/pmap_motorola.c:1.52 --- src/sys/arch/m68k/m68k/pmap_motorola.c:1.51 Mon Nov 23 00:11:44 2009 +++ src/sys/arch/m68k/m68k/pmap_motorola.c Wed Dec 2 15:47:45 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_motorola.c,v 1.51 2009/11/23 00:11:44 rmind Exp $*/ +/* $NetBSD: pmap_motorola.c,v 1.52 2009/12/02 15:47:45 tsutsui Exp $*/ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -117,7 +117,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_motorola.c,v 1.51 2009/11/23 00:11:44 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_motorola.c,v 1.52 2009/12/02 15:47:45 tsutsui Exp $"); #include #include @@ -240,6 +240,8 @@ struct vm_map *st_map, *pt_map; struct vm_map_kernel st_map_store, pt_map_store; +vaddr_t lwp0uarea; /* lwp0 u-area VA, initialized in bootstrap */ + paddr_t avail_start; /* PA of first available physical page */ paddr_t avail_end; /* PA of last available physical page */ vsize_t mem_size; /* memory size in bytes */ @@ -314,6 +316,22 @@ #define PRM_KEEPPTPAGE 0x04 /* + * pmap_bootstrap_finalize: [ INTERFACE ] + * + * Initialize lwp0 uarea, curlwp, and curpcb after MMU is turned on, + * using lwp0uarea variable saved during pmap_bootstrap(). + */ +void +pmap_bootstrap_finalize(void) +{ + + memset((void *)lwp0uarea, 0, USPACE); + uvm_lwp_setuarea(&lwp0, lwp0uarea); + curlwp = &lwp0; + curpcb = lwp_getpcb(&lwp0); +} + +/* * pmap_virtual_space: [ INTERFACE ] * * Report the range of available kernel virtual address
CVS commit: src/libexec/ld.elf_so
Module Name:src Committed By: christos Date: Wed Dec 2 15:50:13 UTC 2009 Modified Files: src/libexec/ld.elf_so: rtld.c Log Message: If the environment is corrupt, die. From FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.126 -r1.127 src/libexec/ld.elf_so/rtld.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/ld.elf_so/rtld.c diff -u src/libexec/ld.elf_so/rtld.c:1.126 src/libexec/ld.elf_so/rtld.c:1.127 --- src/libexec/ld.elf_so/rtld.c:1.126 Tue Nov 17 13:44:33 2009 +++ src/libexec/ld.elf_so/rtld.c Wed Dec 2 10:50:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rtld.c,v 1.126 2009/11/17 18:44:33 skrll Exp $ */ +/* $NetBSD: rtld.c,v 1.127 2009/12/02 15:50:13 christos Exp $ */ /* * Copyright 1996 John D. Polstra. @@ -40,7 +40,7 @@ #include #ifndef lint -__RCSID("$NetBSD: rtld.c,v 1.126 2009/11/17 18:44:33 skrll Exp $"); +__RCSID("$NetBSD: rtld.c,v 1.127 2009/12/02 15:50:13 christos Exp $"); #endif /* not lint */ #include @@ -439,8 +439,8 @@ getenv("LD_LIBRARY_PATH")); } else { execname = NULL; - unsetenv("LD_DEBUG"); - unsetenv("LD_LIBRARY_PATH"); + if (unsetenv("LD_DEBUG") || unsetenv("LD_LIBRARY_PATH")) + _rtld_die(); } _rtld_process_hints(execname, &_rtld_paths, &_rtld_xforms, _PATH_LD_HINTS); @@ -514,7 +514,8 @@ if (_rtld_preload(getenv("LD_PRELOAD")) == -1) _rtld_die(); } else - unsetenv("LD_PRELOAD"); + if (unsetenv("LD_PRELOAD")) + _rtld_die(); dbg(("loading needed objects")); if (_rtld_load_needed_objects(_rtld_objmain, RTLD_MAIN) == -1)
CVS commit: src/sys/arch/hp300/hp300
Module Name:src Committed By: tsutsui Date: Wed Dec 2 15:51:13 UTC 2009 Modified Files: src/sys/arch/hp300/hp300: locore.s pmap_bootstrap.c Log Message: Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc. Tested on HP9000/382. To generate a diff of this commit: cvs rdiff -u -r1.147 -r1.148 src/sys/arch/hp300/hp300/locore.s cvs rdiff -u -r1.39 -r1.40 src/sys/arch/hp300/hp300/pmap_bootstrap.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/hp300/hp300/locore.s diff -u src/sys/arch/hp300/hp300/locore.s:1.147 src/sys/arch/hp300/hp300/locore.s:1.148 --- src/sys/arch/hp300/hp300/locore.s:1.147 Thu Nov 26 00:19:17 2009 +++ src/sys/arch/hp300/hp300/locore.s Wed Dec 2 15:51:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.147 2009/11/26 00:19:17 matt Exp $ */ +/* $NetBSD: locore.s,v 1.148 2009/12/02 15:51:12 tsutsui Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -552,14 +552,13 @@ /* select the software page size now */ lea _ASM_LABEL(tmpstk),%sp | temporary stack jbsr _C_LABEL(uvm_setpagesize) | select software page size -/* set kernel stack, user SP, and initial pcb */ - lea _C_LABEL(lwp0),%a2 | grab lwp0.l_addr - movl %a2@(L_ADDR),%a1 | set kernel stack to end of area - lea %a1@(USPACE-4),%sp | and curlwp so that we don't - movl %a2,_C_LABEL(curlwp) | deref NULL in trap() +/* call final pmap setup which initialize lwp0, curlwp, and curpcb */ + jbsr _C_LABEL(pmap_bootstrap_finalize) +/* set kernel stack, user SP */ + movl _C_LABEL(lwp0uarea),%a1 | + lea %a1@(USPACE-4),%sp | set kernel stack to end of area movl #USRSTACK-4,%a2 movl %a2,%usp | init user SP - movl %a1,_C_LABEL(curpcb) | lwp0 is running tstl _C_LABEL(fputype) | Have an FPU? jeq Lenab2 | No, skip. Index: src/sys/arch/hp300/hp300/pmap_bootstrap.c diff -u src/sys/arch/hp300/hp300/pmap_bootstrap.c:1.39 src/sys/arch/hp300/hp300/pmap_bootstrap.c:1.40 --- src/sys/arch/hp300/hp300/pmap_bootstrap.c:1.39 Fri Nov 27 03:23:09 2009 +++ src/sys/arch/hp300/hp300/pmap_bootstrap.c Wed Dec 2 15:51:12 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.39 2009/11/27 03:23:09 rmind Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.40 2009/12/02 15:51:12 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -36,10 +36,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.39 2009/11/27 03:23:09 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.40 2009/12/02 15:51:12 tsutsui Exp $"); #include -#include #include #include @@ -94,7 +93,7 @@ void pmap_bootstrap(paddr_t nextpa, paddr_t firstpa) { - paddr_t kstpa, kptpa, kptmpa, lkptpa, p0upa; + paddr_t kstpa, kptpa, kptmpa, lkptpa, lwp0upa; u_int nptpages, kstsize; st_entry_t protoste, *ste; pt_entry_t protopte, *pte, *epte; @@ -116,7 +115,7 @@ * * lkptpa last kernel PT page 1 page * - * p0upa proc 0 u-area UPAGES pages + * lwp0upa lwp 0 u-area UPAGES pages * * The KVA corresponding to any of these PAs is: * (PA - firstpa + KERNBASE). @@ -131,7 +130,7 @@ nextpa += PAGE_SIZE; lkptpa = nextpa; nextpa += PAGE_SIZE; - p0upa = nextpa; + lwp0upa = nextpa; nextpa += USPACE; kptpa = nextpa; nptpages = RELOC(Sysptsize, int) + @@ -330,7 +329,7 @@ } /* * Validate PTEs for kernel data/bss, dynamic data allocated - * by us so far (nextpa - firstpa bytes), and pages for proc0 + * by us so far (nextpa - firstpa bytes), and pages for lwp0 * u-area and page table allocated below (RW). */ epte = &((u_int *)kptpa)[m68k_btop(nextpa - firstpa)]; @@ -395,21 +394,21 @@ (vaddr_t)RELOC(intiobase, char *) + MMUBASE; /* - * Setup u-area for process 0. + * Setup u-area for lwp 0. */ /* * Zero the u-area. * NOTE: `pte' and `epte' aren't PTEs here. */ - pte = (u_int *)p0upa; - epte = (u_int *)(p0upa + USPACE); + pte = (u_int *)lwp0upa; + epte = (u_int *)(lwp0upa + USPACE); while (pte < epte) *pte++ = 0; /* - * Remember the u-area address so it can be loaded in the - * proc struct p_addr field later. + * Remember the u-area address so it can be loaded in the lwp0 + * via uvm_lwp_setuarea() later in pmap_bootstrap_finalize(). */ - RELOC(lwp0.l_addr, struct user *) = (struct user *)(p0upa - firstpa); + RELOC(lwp0uarea, vaddr_t) = lwp0upa - firstpa; /* * VM data structures are now initialized, set up data for
CVS commit: src/distrib/sets
Module Name:src Committed By: apb Date: Wed Dec 2 15:52:14 UTC 2009 Modified Files: src/distrib/sets: makeplist regpkg sets.subr Log Message: Patches from Lloyd Parkes in PR 41684, plus my changes: * ${HOSTNAME} is special to bash, so rename the variable to HOSTNAME_CMD. * Don't use "cd -". * Don't use only comments in the else part of an if statement. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/distrib/sets/makeplist cvs rdiff -u -r1.18 -r1.19 src/distrib/sets/regpkg cvs rdiff -u -r1.98 -r1.99 src/distrib/sets/sets.subr 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/makeplist diff -u src/distrib/sets/makeplist:1.19 src/distrib/sets/makeplist:1.20 --- src/distrib/sets/makeplist:1.19 Wed Jan 4 13:57:04 2006 +++ src/distrib/sets/makeplist Wed Dec 2 15:52:14 2009 @@ -94,7 +94,9 @@ # to consult the metalog instead of the file system. # +( cd "${prefix}" + # # Match the directories. Use find(1) to avoid repeat calls to # 'test -d'. @@ -123,7 +125,7 @@ ${FIND} ${args} ${SELECTNONDIRS} done > "${ffilename}" -cd - +) echo "@cwd ${realprefix}" if [ -s "${ffilename}" ]; then Index: src/distrib/sets/regpkg diff -u src/distrib/sets/regpkg:1.18 src/distrib/sets/regpkg:1.19 --- src/distrib/sets/regpkg:1.18 Tue Dec 1 15:49:21 2009 +++ src/distrib/sets/regpkg Wed Dec 2 15:52:14 2009 @@ -1,6 +1,6 @@ #! /bin/sh # -# $NetBSD: regpkg,v 1.18 2009/12/01 15:49:21 apb Exp $ +# $NetBSD: regpkg,v 1.19 2009/12/02 15:52:14 apb Exp $ # # Copyright (c) 2003,2009 The NetBSD Foundation, Inc. # All rights reserved. @@ -628,11 +628,11 @@ # "@name" line and a lot of "@comment MD5:" lines. # { - rcsid='$NetBSD: regpkg,v 1.18 2009/12/01 15:49:21 apb Exp $' + rcsid='$NetBSD: regpkg,v 1.19 2009/12/02 15:52:14 apb Exp $' utcdate="$(${ENV_CMD} TZ=UTC LOCALE=C \ ${DATE} '+%Y-%m-%d %H:%M')" user="${USER:-root}" - host="$(${HOSTNAME})" + host="$(${HOSTNAME_CMD})" echo "@name ${pkg}-${t}" echo "@comment Packaged at ${utcdate} UTC by ${us...@${host}" echo "@comment Packaged using ${prog} ${rcsid}" @@ -981,6 +981,7 @@ # No files in the pkg? (This could happen # if a pkg contains only directories.) # Do nothing (keep the already-registered pkg). +: fi else bomb Index: src/distrib/sets/sets.subr diff -u src/distrib/sets/sets.subr:1.98 src/distrib/sets/sets.subr:1.99 --- src/distrib/sets/sets.subr:1.98 Wed Dec 2 15:18:06 2009 +++ src/distrib/sets/sets.subr Wed Dec 2 15:52:14 2009 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.98 2009/12/02 15:18:06 uebayasi Exp $ +# $NetBSD: sets.subr,v 1.99 2009/12/02 15:52:14 apb Exp $ # # @@ -48,7 +48,7 @@ : ${FIND:=find} : ${GREP:=grep} : ${GZIP_CMD:=gzip} # ${GZIP} is special to gzip(1) -: ${HOSTNAME:=hostname} +: ${HOSTNAME_CMD:=hostname} # ${HOSTNAME} is special to bash(1) : ${HOST_SH:=sh} : ${IDENT:=ident} : ${JOIN:=join} @@ -207,7 +207,7 @@ # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.98 2009/12/02 15:18:06 uebayasi Exp $ +# # $NetBSD: sets.subr,v 1.99 2009/12/02 15:52:14 apb Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root
CVS commit: src/sys/arch/atari/atari
Module Name:src Committed By: tsutsui Date: Wed Dec 2 15:53:34 UTC 2009 Modified Files: src/sys/arch/atari/atari: atari_init.c locore.s Log Message: Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc. Tested on TT030. To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/arch/atari/atari/atari_init.c cvs rdiff -u -r1.103 -r1.104 src/sys/arch/atari/atari/locore.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/atari/atari/atari_init.c diff -u src/sys/arch/atari/atari/atari_init.c:1.88 src/sys/arch/atari/atari/atari_init.c:1.89 --- src/sys/arch/atari/atari/atari_init.c:1.88 Fri Nov 27 03:23:05 2009 +++ src/sys/arch/atari/atari/atari_init.c Wed Dec 2 15:53:34 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: atari_init.c,v 1.88 2009/11/27 03:23:05 rmind Exp $ */ +/* $NetBSD: atari_init.c,v 1.89 2009/12/02 15:53:34 tsutsui Exp $ */ /* * Copyright (c) 1995 Leo Weppelman @@ -33,7 +33,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.88 2009/11/27 03:23:05 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.89 2009/12/02 15:53:34 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_mbtype.h" @@ -41,7 +41,6 @@ #include #include -#include #include #include #include @@ -275,7 +274,7 @@ /* * Save KVA of lwp0 uarea and allocate it. */ - uvm_lwp_setuarea(&lwp0, vstart); + lwp0uarea = vstart; pstart+= USPACE; vstart+= USPACE; avail -= USPACE; @@ -567,14 +566,9 @@ } /* - * Initialize the "u-area" pages. - * - * Must initialize uarea before autoconfig or the fault handler - * will get a NULL reference. + * Initialize the "u-area" pages etc. */ - memset((void*)uvm_lwp_getuarea(&lwp0), 0, USPACE); - curlwp = &lwp0; - curpcb = lwp_getpcb(&lwp0); + pmap_bootstrap_finalize(); /* * Get the hardware into a defined state Index: src/sys/arch/atari/atari/locore.s diff -u src/sys/arch/atari/atari/locore.s:1.103 src/sys/arch/atari/atari/locore.s:1.104 --- src/sys/arch/atari/atari/locore.s:1.103 Thu Nov 26 00:19:13 2009 +++ src/sys/arch/atari/atari/locore.s Wed Dec 2 15:53:34 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.103 2009/11/26 00:19:13 matt Exp $ */ +/* $NetBSD: locore.s,v 1.104 2009/12/02 15:53:34 tsutsui Exp $ */ /* * Copyright (c) 1980, 1990 The Regents of the University of California. @@ -1024,15 +1024,13 @@ jsr _C_LABEL(start_c) /* - * set kernel stack, user SP, and initial pcb + * set kernel stack, user SP */ - lea _C_LABEL(lwp0),%a0 | grab lwp0.p_addr - movl %a0@(L_ADDR),%a1 + movl _C_LABEL(lwp0uarea),%a1 | grab lwp0 uarea lea %a1@(USPACE-4),%sp | set kernel stack to end of area movl #USRSTACK-4,%a2 movl %a2,%usp | init user SP movl %a2,%a1@(PCB_USP) | and save it - movl %a1,_C_LABEL(curpcb) | lwp0 is running clrw %a1@(PCB_FLAGS) | clear flags /* flush TLB and turn on caches */ @@ -1077,7 +1075,7 @@ movw #PSL_USER,%...@- | in user mode clrl %...@- | stack adjust count lea %sp@(-64),%sp | construct space for D0-D7/A0-A7 - #lea _C_LABEL(lwp0),%a0 | lwp0 in a0 + lea _C_LABEL(lwp0),%a0 | lwp0 in a0 movl %sp,%a0@(L_MD_REGS) | save frame for lwp0 movl %usp,%a1 movl %a1,%sp@(FR_SP) | save user stack pointer in frame
CVS commit: src/sys/arch/news68k/news68k
Module Name:src Committed By: tsutsui Date: Wed Dec 2 15:54:19 UTC 2009 Modified Files: src/sys/arch/news68k/news68k: locore.s pmap_bootstrap.c Log Message: Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc. Tested on NWS-1750. To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/news68k/news68k/locore.s cvs rdiff -u -r1.23 -r1.24 src/sys/arch/news68k/news68k/pmap_bootstrap.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/news68k/news68k/locore.s diff -u src/sys/arch/news68k/news68k/locore.s:1.48 src/sys/arch/news68k/news68k/locore.s:1.49 --- src/sys/arch/news68k/news68k/locore.s:1.48 Thu Nov 26 00:19:19 2009 +++ src/sys/arch/news68k/news68k/locore.s Wed Dec 2 15:54:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.48 2009/11/26 00:19:19 matt Exp $ */ +/* $NetBSD: locore.s,v 1.49 2009/12/02 15:54:19 tsutsui Exp $ */ /* * Copyright (c) 1980, 1990, 1993 @@ -445,13 +445,13 @@ /* select the software page size now */ lea _ASM_LABEL(tmpstk),%sp | temporary stack jbsr _C_LABEL(uvm_setpagesize) | select software page size -/* set kernel stack, user SP, and initial pcb */ - lea _C_LABEL(lwp0),%a2 | get lwp0.l_addr - movl %a2@(L_ADDR),%a1 | set kernel stack to end of area - lea %a1@(USPACE-4),%sp | and curlwp so that we don't - movl %a2,_C_LABEL(curlwp) | deref NULL in trap() +/* call final pmap setup which initialize lwp0, curlwp, and curpcb */ + jbsr _C_LABEL(pmap_bootstrap_finalize) +/* set kernel stack, user SP */ + movl _C_LABEL(lwp0uarea),%a1 | get lwp0 uarea + lea %a1@(USPACE-4),%sp | set kernel stack to end of area + movl #USRSTACK-4,%a2 movl %a2,%usp | init user SP - movl %a1,_C_LABEL(curpcb) | lwp0 is running tstl _C_LABEL(fputype) | Have an FPU? jeq Lenab2 | No, skip. Index: src/sys/arch/news68k/news68k/pmap_bootstrap.c diff -u src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.23 src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.24 --- src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.23 Thu Nov 26 00:19:19 2009 +++ src/sys/arch/news68k/news68k/pmap_bootstrap.c Wed Dec 2 15:54:19 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap_bootstrap.c,v 1.23 2009/11/26 00:19:19 matt Exp $ */ +/* $NetBSD: pmap_bootstrap.c,v 1.24 2009/12/02 15:54:19 tsutsui Exp $ */ /* * Copyright (c) 1991, 1993 @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.23 2009/11/26 00:19:19 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.24 2009/12/02 15:54:19 tsutsui Exp $"); #include @@ -89,7 +89,7 @@ void pmap_bootstrap(paddr_t nextpa, paddr_t firstpa) { - paddr_t kstpa, kptpa, kptmpa, l0upa; + paddr_t kstpa, kptpa, kptmpa, lwp0upa; u_int nptpages, kstsize; st_entry_t protoste, *ste; pt_entry_t protopte, *pte, *epte; @@ -110,7 +110,7 @@ * * kptmpa kernel PT map 1 page * - * l0upa lwp 0 u-area UPAGES pages + * lwp0upa lwp 0 u-area UPAGES pages * * The KVA corresponding to any of these PAs is: * (PA - firstpa + KERNBASE). @@ -136,7 +136,7 @@ nextpa += kstsize * PAGE_SIZE; kptmpa = nextpa; nextpa += PAGE_SIZE; - l0upa = nextpa; + lwp0upa = nextpa; nextpa += USPACE; kptpa = nextpa; nptpages = RELOC(Sysptsize, int) + @@ -306,7 +306,7 @@ } /* * Validate PTEs for kernel data/bss, dynamic data allocated - * by us so far (nextpa - firstpa bytes), and pages for proc0 + * by us so far (nextpa - firstpa bytes), and pages for lwp0 * u-area and page table allocated below (RW). */ epte = &((u_int *)kptpa)[m68k_btop(nextpa - firstpa)]; @@ -361,21 +361,21 @@ (pt_entry_t *)m68k_ptob((NPTEPG - 1) * NPTEPG); /* - * Setup u-area for process 0. + * Setup u-area for lwp 0. */ /* * Zero the u-area. * NOTE: `pte' and `epte' aren't PTEs here. */ - pte = (u_int *)l0upa; - epte = (u_int *)(l0upa + USPACE); + pte = (u_int *)lwp0upa; + epte = (u_int *)(lwp0upa + USPACE); while (pte < epte) *pte++ = 0; /* - * Remember the u-area address so it can be loaded in the - * proc struct p_addr field later. + * Remember the u-area address so it can be loaded in the lwp0 + * via uvm_lwp_setuarea() later in pmap_bootstrap_finalize(). */ - RELOC(lwp0.l_addr, struct user *) = (struct user *)(l0upa - firstpa); + RELOC(lwp0uarea, vaddr_t) = lwp0upa - firstpa; /* * VM data structures are now initialized, set up data for
CVS commit: src/sys/rump/librump/rumpvfs
Module Name:src Committed By: pooka Date: Wed Dec 2 17:18:59 UTC 2009 Modified Files: src/sys/rump/librump/rumpvfs: rumpblk.c Log Message: fix inverted comparison To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/sys/rump/librump/rumpvfs/rumpblk.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/rumpvfs/rumpblk.c diff -u src/sys/rump/librump/rumpvfs/rumpblk.c:1.32 src/sys/rump/librump/rumpvfs/rumpblk.c:1.33 --- src/sys/rump/librump/rumpvfs/rumpblk.c:1.32 Wed Nov 25 15:01:28 2009 +++ src/sys/rump/librump/rumpvfs/rumpblk.c Wed Dec 2 17:18:59 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: rumpblk.c,v 1.32 2009/11/25 15:01:28 pooka Exp $ */ +/* $NetBSD: rumpblk.c,v 1.33 2009/12/02 17:18:59 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -52,7 +52,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.32 2009/11/25 15:01:28 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rumpblk.c,v 1.33 2009/12/02 17:18:59 pooka Exp $"); #include #include @@ -413,7 +413,7 @@ strcpy(rblk->rblk_path, path); rblk->rblk_fd = -1; rblk->rblk_hostoffset = offset; - if (size == RUMPBLK_SIZENOTSET) { + if (size != RUMPBLK_SIZENOTSET) { KASSERT(size + offset <= flen); rblk->rblk_size = size; } else {
CVS commit: [netbsd-5] src/sys/dev/sdmmc
Module Name:src Committed By: sborrill Date: Wed Dec 2 17:39:16 UTC 2009 Modified Files: src/sys/dev/sdmmc [netbsd-5]: ld_sdmmc.c sdmmc_mem.c sdmmcvar.h Log Message: Pull up the following revisions(s) (requested by nonaka in ticket #1167): sys/dev/sdmmc/ld_sdmmc.c: revision 1.4 sys/dev/sdmmc/sdmmc_mem.c: revision 1.3 sys/dev/sdmmc/sdmmcvar.h: revision 1.2 Always treat sector size as 512 bytes. To generate a diff of this commit: cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/sys/dev/sdmmc/ld_sdmmc.c cvs rdiff -u -r1.2.2.2 -r1.2.2.3 src/sys/dev/sdmmc/sdmmc_mem.c cvs rdiff -u -r1.1.8.2 -r1.1.8.3 src/sys/dev/sdmmc/sdmmcvar.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/sdmmc/ld_sdmmc.c diff -u src/sys/dev/sdmmc/ld_sdmmc.c:1.3.2.2 src/sys/dev/sdmmc/ld_sdmmc.c:1.3.2.3 --- src/sys/dev/sdmmc/ld_sdmmc.c:1.3.2.2 Wed Oct 7 15:41:13 2009 +++ src/sys/dev/sdmmc/ld_sdmmc.c Wed Dec 2 17:39:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: ld_sdmmc.c,v 1.3.2.2 2009/10/07 15:41:13 sborrill Exp $ */ +/* $NetBSD: ld_sdmmc.c,v 1.3.2.3 2009/12/02 17:39:16 sborrill Exp $ */ /* * Copyright (c) 2008 KIYOHARA Takashi @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.3.2.2 2009/10/07 15:41:13 sborrill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ld_sdmmc.c,v 1.3.2.3 2009/12/02 17:39:16 sborrill Exp $"); #include "rnd.h" @@ -125,7 +125,7 @@ ld->sc_flags = LDF_ENABLED; ld->sc_secperunit = sc->sc_sf->csd.capacity; - ld->sc_secsize = sc->sc_sf->csd.sector_size; + ld->sc_secsize = SDMMC_SECTOR_SIZE; ld->sc_maxxfer = MAXPHYS; ld->sc_maxqueuecnt = 1; ld->sc_dump = ld_sdmmc_dump; Index: src/sys/dev/sdmmc/sdmmc_mem.c diff -u src/sys/dev/sdmmc/sdmmc_mem.c:1.2.2.2 src/sys/dev/sdmmc/sdmmc_mem.c:1.2.2.3 --- src/sys/dev/sdmmc/sdmmc_mem.c:1.2.2.2 Wed Oct 7 15:41:13 2009 +++ src/sys/dev/sdmmc/sdmmc_mem.c Wed Dec 2 17:39:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: sdmmc_mem.c,v 1.2.2.2 2009/10/07 15:41:13 sborrill Exp $ */ +/* $NetBSD: sdmmc_mem.c,v 1.2.2.3 2009/12/02 17:39:16 sborrill Exp $ */ /* $OpenBSD: sdmmc_mem.c,v 1.10 2009/01/09 10:55:22 jsg Exp $ */ /* @@ -46,7 +46,7 @@ /* Routines for SD/MMC memory cards. */ #include -__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.2.2.2 2009/10/07 15:41:13 sborrill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdmmc_mem.c,v 1.2.2.3 2009/12/02 17:39:16 sborrill Exp $"); #include #include @@ -343,11 +343,8 @@ m = MMC_CSD_TRAN_SPEED_MANT(resp); csd->tran_speed = speed_exponent[e] * speed_mantissa[m] / 10; } - csd->sector_size = MIN((1 << csd->read_bl_len), - sdmmc_chip_host_maxblklen(sc->sc_sct, sc->sc_sch)); - if (csd->sector_size < (1 << csd->read_bl_len)) - csd->capacity *= (1 << csd->read_bl_len) / csd->sector_size; - csd->sector_size_sb = ffs(csd->sector_size) - 1; + if ((1 << csd->read_bl_len) > SDMMC_SECTOR_SIZE) + csd->capacity *= (1 << csd->read_bl_len) / SDMMC_SECTOR_SIZE; if (sc->sc_busclk > csd->tran_speed) sc->sc_busclk = csd->tran_speed; @@ -420,7 +417,6 @@ printf("write_cl_len = %d\n", csd->write_bl_len); printf("r2w_factor = %d\n", csd->r2w_factor); printf("tran_speed = %d\n", csd->tran_speed); - printf("sector_size = %d\n", csd->sector_size); } #endif @@ -526,13 +522,13 @@ memset(&cmd, 0, sizeof(cmd)); cmd.c_opcode = MMC_SET_BLOCKLEN; - cmd.c_arg = sf->csd.sector_size; + cmd.c_arg = SDMMC_SECTOR_SIZE; cmd.c_flags = SCF_CMD_AC | SCF_RSP_R1; error = sdmmc_mmc_command(sc, &cmd); DPRINTF(("%s: sdmmc_mem_set_blocklen: read_bl_len=%d sector_size=%d\n", - SDMMCDEVNAME(sc), 1 << sf->csd.read_bl_len, sf->csd.sector_size)); + SDMMCDEVNAME(sc), 1 << sf->csd.read_bl_len, SDMMC_SECTOR_SIZE)); return error; } @@ -552,12 +548,12 @@ memset(&cmd, 0, sizeof(cmd)); cmd.c_data = data; cmd.c_datalen = datalen; - cmd.c_blklen = sf->csd.sector_size; + cmd.c_blklen = SDMMC_SECTOR_SIZE; cmd.c_opcode = (cmd.c_datalen / cmd.c_blklen) > 1 ? MMC_READ_BLOCK_MULTIPLE : MMC_READ_BLOCK_SINGLE; cmd.c_arg = blkno; if (!ISSET(sf->flags, SFF_SDHC)) - cmd.c_arg <<= sf->csd.sector_size_sb; + cmd.c_arg <<= SDMMC_SECTOR_SIZE_SB; cmd.c_flags = SCF_CMD_ADTC | SCF_CMD_READ | SCF_RSP_R1; if (ISSET(sc->sc_caps, SMC_CAPS_DMA)) cmd.c_dmamap = sc->sc_dmap; @@ -646,12 +642,12 @@ memset(&cmd, 0, sizeof(cmd)); cmd.c_data = data; cmd.c_datalen = datalen; - cmd.c_blklen = sf->csd.sector_size; + cmd.c_blklen = SDMMC_SECTOR_SIZE; cmd.c_opcode = (cmd.c_datalen / cmd.c_blklen) > 1 ? MMC_WRITE_BLOCK_MULTIPLE : MMC_WRITE_BLOCK_SINGLE; cmd.c_arg = blkno; if (!ISSET(sf->flags, SFF_SDHC)) - cmd.c_arg <<= sf->csd.sector_size_sb; + cmd.c_arg <<= SDMMC_SECTOR_SIZE_SB; cmd.c_flags = SCF_CMD_ADTC | SCF_RSP_R1; if (ISSET(sc->sc_caps, SMC_CAPS_DMA)) cmd.c_dmamap = sc->sc_dmap; Index: src/sys/dev/sdmmc/sdmmcvar.h diff -u src/sys/dev/sdmmc/sdmmcvar.h:1.1.
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: sborrill Date: Wed Dec 2 17:41:02 UTC 2009 Modified Files: src/doc [netbsd-5]: CHANGES-5.1 Log Message: Ticket 1167 To generate a diff of this commit: cvs rdiff -u -r1.1.2.151 -r1.1.2.152 src/doc/CHANGES-5.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-5.1 diff -u src/doc/CHANGES-5.1:1.1.2.151 src/doc/CHANGES-5.1:1.1.2.152 --- src/doc/CHANGES-5.1:1.1.2.151 Wed Dec 2 02:04:36 2009 +++ src/doc/CHANGES-5.1 Wed Dec 2 17:41:02 2009 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.1,v 1.1.2.151 2009/12/02 02:04:36 snj Exp $ +# $NetBSD: CHANGES-5.1,v 1.1.2.152 2009/12/02 17:41:02 sborrill Exp $ A complete list of changes from the NetBSD 5.0 release to the NetBSD 5.1 release: @@ -15072,3 +15072,10 @@ - Update pixman to 0.16.2. [mrg, ticket #1177] +sys/dev/sdmmc/ld_sdmmc.c 1.4 +sys/dev/sdmmc/sdmmc_mem.c 1.3 +sys/dev/sdmmc/sdmmcvar.h 1.2 + + Always treat sector size as 512 bytes. + [nonaka, ticket #1167] +
CVS commit: src/distrib/sets
Module Name:src Committed By: uebayasi Date: Wed Dec 2 17:51:30 UTC 2009 Modified Files: src/distrib/sets: sets.subr Log Message: Convert make variables ${_MKVARS.yes} / ${_MKVARS.no} to environments ${_MKVARS_yes} / ${_MKVARS_no} to make sure assignments done right both in make and shell. Extract important make variables not listed in ${_MKVARS.*}. To generate a diff of this commit: cvs rdiff -u -r1.99 -r1.100 src/distrib/sets/sets.subr 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/sets.subr diff -u src/distrib/sets/sets.subr:1.99 src/distrib/sets/sets.subr:1.100 --- src/distrib/sets/sets.subr:1.99 Wed Dec 2 15:52:14 2009 +++ src/distrib/sets/sets.subr Wed Dec 2 17:51:30 2009 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.99 2009/12/02 15:52:14 apb Exp $ +# $NetBSD: sets.subr,v 1.100 2009/12/02 17:51:30 uebayasi Exp $ # # @@ -27,6 +27,10 @@ # XXX don't hardcode MKEXTRAVARS="\ EXTSRCS \ + MKBFD \ + MKCOMPAT \ + MKDYNAMICROOT \ + MKMANPAGES \ USE_INET6 \ USE_KERBEROS \ USE_LDAP \ @@ -125,15 +129,19 @@ oIFS=$IFS IFS=" " -for i in _MKVARS.yes _MKVARS.no; do - eval $( -${MAKE} -B -f- all < all: - @echo "export _MKVARS_${i#*.}=\"\${$i}\"" + @echo "export _MKVARS_yes=\"\${_MKVARS.yes}\"" + @echo "export _MKVARS_no=\"\${_MKVARS.no}\"" + EOMAKE -) +); do + eval $x done + for x in $( ${MAKE} -B -f- all < @@ -153,17 +161,20 @@ all: .for i in MACHINE MACHINE_ARCH MACHINE_CPU \ HAVE_BINUTILS HAVE_GCC HAVE_GDB OBJECT_FMT TOOLCHAIN_MISSING \ - ${MKEXTRAVARS} \${_MKVARS.yes} \${_MKVARS.no} + ${MKEXTRAVARS} ${_MKVARS_yes} ${_MKVARS_no} @echo "export \$i=\"\${\$i}\"" .endfor EOMAKE ); do -# echo 1>&2 "DEBUG: read $x" + echo 1>&2 "DEBUG: read $x" eval $x done + IFS=$oIFS +MKVARS="$MKEXTRAVARS $_MKVARS_yes $_MKVARS_no" + setsdir=${0%/*} obsolete=0 module=yes @@ -207,7 +218,7 @@ # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.99 2009/12/02 15:52:14 apb Exp $ +# # $NetBSD: sets.subr,v 1.100 2009/12/02 17:51:30 uebayasi Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root @@ -308,7 +319,7 @@ if (obsolete) wanted["obsolete"] = 1 - split("'"${MKEXTRAVARS} ${_MKVARS_yes} ${_MKVARS_no}"'", needvars) + split("'"${MKVARS}"'", needvars) for (vi in needvars) { nv = needvars[vi] kw = tolower(nv)
CVS commit: src/distrib/sets
Module Name:src Committed By: uebayasi Date: Wed Dec 2 17:56:14 UTC 2009 Modified Files: src/distrib/sets: sets.subr Log Message: Oops. Remove debug echo again. To generate a diff of this commit: cvs rdiff -u -r1.100 -r1.101 src/distrib/sets/sets.subr 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/sets.subr diff -u src/distrib/sets/sets.subr:1.100 src/distrib/sets/sets.subr:1.101 --- src/distrib/sets/sets.subr:1.100 Wed Dec 2 17:51:30 2009 +++ src/distrib/sets/sets.subr Wed Dec 2 17:56:14 2009 @@ -1,4 +1,4 @@ -# $NetBSD: sets.subr,v 1.100 2009/12/02 17:51:30 uebayasi Exp $ +# $NetBSD: sets.subr,v 1.101 2009/12/02 17:56:14 uebayasi Exp $ # # @@ -167,7 +167,7 @@ EOMAKE ); do - echo 1>&2 "DEBUG: read $x" +# echo 1>&2 "DEBUG: read $x" eval $x done @@ -218,7 +218,7 @@ # In each file, a record consists of a path and a System Package name, # separated by whitespace. E.g., # -# # $NetBSD: sets.subr,v 1.100 2009/12/02 17:51:30 uebayasi Exp $ +# # $NetBSD: sets.subr,v 1.101 2009/12/02 17:56:14 uebayasi Exp $ # . base-sys-root [keyword[,...]] # ./altroot base-sys-root # ./bin base-sys-root
CVS commit: src/sys/arch/sparc64/conf
Module Name:src Committed By: mrg Date: Thu Dec 3 03:30:03 UTC 2009 Modified Files: src/sys/arch/sparc64/conf: SCHIZO Log Message: base this on GENERIC.MP. seems just as stable. turn on esiop/siop now that their interrupts match. turn off admtemp, since we get a false match. XXX admtemp_match needs help. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sparc64/conf/SCHIZO 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/sparc64/conf/SCHIZO diff -u src/sys/arch/sparc64/conf/SCHIZO:1.1 src/sys/arch/sparc64/conf/SCHIZO:1.2 --- src/sys/arch/sparc64/conf/SCHIZO:1.1 Sat Nov 28 21:39:42 2009 +++ src/sys/arch/sparc64/conf/SCHIZO Thu Dec 3 03:30:02 2009 @@ -1,16 +1,15 @@ -# $NetBSD: SCHIZO,v 1.1 2009/11/28 21:39:42 mrg Exp $ +# $NetBSD: SCHIZO,v 1.2 2009/12/03 03:30:02 mrg Exp $ # # GENERIC with schizo support enabled, with the annoying schizo interupt # option # -#include "arch/sparc64/conf/GENERIC.MP" -include "arch/sparc64/conf/GENERIC" +include "arch/sparc64/conf/GENERIC.MP" +#include "arch/sparc64/conf/GENERIC" -#ident "SCHIZO.$Revision: 1.1 $" +#ident "SCHIZO.$Revision: 1.2 $" options SCHIZO_BUS_SPACE_BROKEN -#options SYSCALL_DEBUG makeoptions DEBUG="-g" options DEBUG @@ -21,8 +20,11 @@ schizo* at mainbus? pci* at schizo? +# this crashes when attaching. no machfb -no esiop -no siop +# this doesn't work yet bge* at pci? dev ? function ? + +# this matches when it isn't present. ugh. +no admtemp
CVS commit: xsrc/external/mit/xorg-server/dist/hw/xfree86/common
Module Name:xsrc Committed By: macallan Date: Thu Dec 3 04:24:22 UTC 2009 Modified Files: xsrc/external/mit/xorg-server/dist/hw/xfree86/common: xf86Bus.c Log Message: fix a segfault in xf86EnterServerState() which would fire whenever there is more than one graphics device This is a bandaid, we ( or the Xorg people ) need to fix it properly by getting rid of all the now useless RAC-related code. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Bus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Bus.c diff -u xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Bus.c:1.2 xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Bus.c:1.3 --- xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Bus.c:1.2 Fri Jun 12 01:53:24 2009 +++ xsrc/external/mit/xorg-server/dist/hw/xfree86/common/xf86Bus.c Thu Dec 3 04:24:22 2009 @@ -1517,8 +1517,11 @@ */ if (!pEnt->access->pAccess && (pEnt->entityProp & (state == SETUP ? NEED_VGA_ROUTED_SETUP : -NEED_VGA_ROUTED))) - ((BusAccPtr)pEnt->busAcc)->set_f(pEnt->busAcc); +NEED_VGA_ROUTED))) { + if (pEnt->busAcc != NULL) { + ((BusAccPtr)pEnt->busAcc)->set_f(pEnt->busAcc); + } +} }
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: mrg Date: Thu Dec 3 05:06:17 UTC 2009 Modified Files: src/sys/arch/sparc64/sparc64: intr.c Log Message: s/DEBUG/NOT_DEBUG/ on the intr_establish() re-used message. it triggers all the time on more-modern systems. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/sparc64/sparc64/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/intr.c diff -u src/sys/arch/sparc64/sparc64/intr.c:1.61 src/sys/arch/sparc64/sparc64/intr.c:1.62 --- src/sys/arch/sparc64/sparc64/intr.c:1.61 Tue Dec 16 22:35:27 2008 +++ src/sys/arch/sparc64/sparc64/intr.c Thu Dec 3 05:06:16 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.61 2008/12/16 22:35:27 christos Exp $ */ +/* $NetBSD: intr.c,v 1.62 2009/12/03 05:06:16 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.61 2008/12/16 22:35:27 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.62 2009/12/03 05:06:16 mrg Exp $"); #include "opt_ddb.h" #include "opt_multiprocessor.h" @@ -203,7 +203,7 @@ * Interrupt is already there. We need to create a * new interrupt handler and interpose it. */ -#ifdef DEBUG +#ifdef NOT_DEBUG printf("intr_establish: intr reused %x\n", ih->ih_number); #endif