CVS commit: src/sys/arch/sparc64
Module Name:src Committed By: mrg Date: Fri Jul 29 08:37:37 UTC 2011 Modified Files: src/sys/arch/sparc64/conf: GENERIC files.sparc64 src/sys/arch/sparc64/dev: mkclock.c sbus.c zs.c Added Files: src/sys/arch/sparc64/dev: central.c centralvar.h fhc.c fhc_central.c fhc_mainbus.c fhcreg.h fhcvar.h Log Message: port the openbsd central and fhc drivers, and the clock/zs attachments. doesn't quite work yet, crashes when central_attach() calls config_attach() (faulting address is 0xf800.) To generate a diff of this commit: cvs rdiff -u -r1.141 -r1.142 src/sys/arch/sparc64/conf/GENERIC cvs rdiff -u -r1.133 -r1.134 src/sys/arch/sparc64/conf/files.sparc64 cvs rdiff -u -r0 -r1.1 src/sys/arch/sparc64/dev/central.c \ src/sys/arch/sparc64/dev/centralvar.h src/sys/arch/sparc64/dev/fhc.c \ src/sys/arch/sparc64/dev/fhc_central.c \ src/sys/arch/sparc64/dev/fhc_mainbus.c src/sys/arch/sparc64/dev/fhcreg.h \ src/sys/arch/sparc64/dev/fhcvar.h cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc64/dev/mkclock.c cvs rdiff -u -r1.89 -r1.90 src/sys/arch/sparc64/dev/sbus.c cvs rdiff -u -r1.70 -r1.71 src/sys/arch/sparc64/dev/zs.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/conf/GENERIC diff -u src/sys/arch/sparc64/conf/GENERIC:1.141 src/sys/arch/sparc64/conf/GENERIC:1.142 --- src/sys/arch/sparc64/conf/GENERIC:1.141 Sat Jul 23 21:12:58 2011 +++ src/sys/arch/sparc64/conf/GENERIC Fri Jul 29 08:37:37 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.141 2011/07/23 21:12:58 jakllsch Exp $ +# $NetBSD: GENERIC,v 1.142 2011/07/29 08:37:37 mrg Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.141 $ +#ident GENERIC-$Revision: 1.142 $ maxusers 64 @@ -240,11 +240,14 @@ psycho* at mainbus0# PCI-based systems schizo* at mainbus? pyro* at mainbus? +central* at mainbus? +fhc* at mainbus? pci* at psycho? pci* at schizo? pci* at pyro? pci* at ppb? -ppb* at pci? # `APB' support. +ppb* at pci? +fhc* at central? ebus* at mainbus0# ebus devices ebus* at pci? # ebus devices # XXX 'puc's aren't really bridges, but there's no better place for them here @@ -266,6 +269,7 @@ ## Mostek clock found on sbus on Ultra-1,2 systems ## and found on ebus on Ultra-5 and other systems. clock* at sbus? slot ? offset ? +clock* at fhc? clock* at ebus? ## DS1287 compatible clock found on ebus on Netra X1 and other systems. @@ -279,7 +283,8 @@ ## Zilog 8530 serial chips. Each has two-channels. ## zs0 is ttya and ttyb. zs1 is the keyboard and mouse. zs* at sbus? slot ? offset ? -zstty* at zs? channel ? # ttya +zs* at fhc? +zstty* at zs? channel ? # ttys kbd0 at zstty? ms0 at zstty? Index: src/sys/arch/sparc64/conf/files.sparc64 diff -u src/sys/arch/sparc64/conf/files.sparc64:1.133 src/sys/arch/sparc64/conf/files.sparc64:1.134 --- src/sys/arch/sparc64/conf/files.sparc64:1.133 Sun Jun 12 03:35:47 2011 +++ src/sys/arch/sparc64/conf/files.sparc64 Fri Jul 29 08:37:37 2011 @@ -1,4 +1,4 @@ -# $NetBSD: files.sparc64,v 1.133 2011/06/12 03:35:47 rmind Exp $ +# $NetBSD: files.sparc64,v 1.134 2011/07/29 08:37:37 mrg Exp $ # @(#)files.sparc64 8.1 (Berkeley) 7/19/93 # sparc64-specific configuration info @@ -42,6 +42,19 @@ file arch/sparc64/dev/pyro.c pyro file arch/sparc64/dev/pci_machdep.c psycho | schizo | pyro +define central {} +device central: central +attach central at mainbus +file arch/sparc64/dev/central.c central + +define fhc {} +device fhc: fhc +attach fhc at mainbus with fhc_mainbus +attach fhc at central with fhc_central +file arch/sparc64/dev/fhc.c fhc +file arch/sparc64/dev/fhc_central.c fhc_central +file arch/sparc64/dev/fhc_mainbus.c fhc_mainbus + # IOMMU is for both file arch/sparc64/dev/iommu.c sbus | psycho | schizo | pyro @@ -56,6 +69,7 @@ device clock: mk48txx attach clock at sbus with mkclock_sbus attach clock at ebus with mkclock_ebus +attach clock at fhc with mkclock_fhc file arch/sparc64/dev/mkclock.c clock device rtc: mc146818 @@ -125,7 +139,7 @@ # device zs {channel = -1} -attach zs at sbus +attach zs at sbus, fhc file arch/sparc64/dev/zs.c zs needs-flag file dev/ic/z8530sc.c zs Index: src/sys/arch/sparc64/dev/mkclock.c diff -u src/sys/arch/sparc64/dev/mkclock.c:1.8 src/sys/arch/sparc64/dev/mkclock.c:1.9 --- src/sys/arch/sparc64/dev/mkclock.c:1.8 Fri Jul 1 18:48:36 2011 +++ src/sys/arch/sparc64/dev/mkclock.c Fri Jul 29 08:37:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mkclock.c,v 1.8 2011/07/01 18:48:36 dyoung Exp $ */ +/* $NetBSD: mkclock.c,v 1.9 2011/07/29 08:37:36 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -55,7 +55,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mkclock.c,v 1.8 2011/07/01 18:48:36 dyoung Exp $); +__KERNEL_RCSID(0, $NetBSD: mkclock.c,v 1.9
CVS commit: src/external/cddl/osnet/dev/sdt
Module Name:src Committed By: uebayasi Date: Fri Jul 29 13:10:23 UTC 2011 Modified Files: src/external/cddl/osnet/dev/sdt: sdt.c Log Message: KNF. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/cddl/osnet/dev/sdt/sdt.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/cddl/osnet/dev/sdt/sdt.c diff -u src/external/cddl/osnet/dev/sdt/sdt.c:1.6 src/external/cddl/osnet/dev/sdt/sdt.c:1.7 --- src/external/cddl/osnet/dev/sdt/sdt.c:1.6 Sat Mar 13 22:31:15 2010 +++ src/external/cddl/osnet/dev/sdt/sdt.c Fri Jul 29 13:10:23 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sdt.c,v 1.6 2010/03/13 22:31:15 christos Exp $ */ +/* $NetBSD: sdt.c,v 1.7 2011/07/29 13:10:23 uebayasi Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -107,37 +107,37 @@ /* define the provider */ static sdt_provider_t l7_provider = { -proc, /* provider name */ -0, /* registered ID - leave as 0 */ -{ - { DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON }, - { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN }, - { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_ISA }, - { DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON }, - { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_ISA }, -}, - -/* list all probes belonging to the provider */ -{ - SDT_NAME(proc,,,create), - SDT_NAME(proc,,,exec), - SDT_NAME(proc,,,exec_success), - SDT_NAME(proc,,,exec_failure), - SDT_NAME(proc,,,signal_send), - SDT_NAME(proc,,,signal_discard), - SDT_NAME(proc,,,signal_clear), - SDT_NAME(proc,,,signal_handle), - SDT_NAME(proc,,,lwp_create), - SDT_NAME(proc,,,lwp_start), - SDT_NAME(proc,,,lwp_exit), - NULL /* NULL terminated list */ -} + proc, /* provider name */ + 0, /* registered ID - leave as 0 */ + { + { DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON }, + { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_UNKNOWN }, + { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_ISA }, + { DTRACE_STABILITY_EVOLVING, DTRACE_STABILITY_EVOLVING, DTRACE_CLASS_COMMON }, + { DTRACE_STABILITY_PRIVATE, DTRACE_STABILITY_PRIVATE, DTRACE_CLASS_ISA }, + }, + + /* list all probes belonging to the provider */ + { + SDT_NAME(proc,,,create), + SDT_NAME(proc,,,exec), + SDT_NAME(proc,,,exec_success), + SDT_NAME(proc,,,exec_failure), + SDT_NAME(proc,,,signal_send), + SDT_NAME(proc,,,signal_discard), + SDT_NAME(proc,,,signal_clear), + SDT_NAME(proc,,,signal_handle), + SDT_NAME(proc,,,lwp_create), + SDT_NAME(proc,,,lwp_start), + SDT_NAME(proc,,,lwp_exit), + NULL/* NULL terminated list */ + } }; /* list of local providers to register with DTrace */ static sdt_provider_t *sdt_providers[] = { -l7_provider, -NULL /* NULL terminated list */ + l7_provider, + NULL /* NULL terminated list */ }; static sdt_provider_t **sdt_list = NULL; /* registered provider list */ @@ -167,7 +167,7 @@ sizeof(desc-dtargd_native)); desc-dtargd_mapping = desc-dtargd_ndx; if (sprobe-argx[desc-dtargd_ndx] != NULL) { - strncpy(desc-dtargd_xlate, sprobe-argx[desc-dtargd_ndx], + strncpy(desc-dtargd_xlate, sprobe-argx[desc-dtargd_ndx], sizeof(desc-dtargd_xlate)); } #ifdef SDT_DEBUG @@ -197,16 +197,16 @@ static void sdt_provide(void *arg, const dtrace_probedesc_t *desc) { - sdt_provider_t *sprov = arg; + sdt_provider_t *sprov = arg; int res; int ind; - int num_probes=0; + int num_probes = 0; #ifdef SDT_DEBUG if (desc == NULL) { printf(sdt: provide null\n); } else { - printf(sdt: provide %d %02x:%02x:%02x:%02x\n, + printf(sdt: provide %d %02x:%02x:%02x:%02x\n, desc-dtpd_id, desc-dtpd_provider[0], desc-dtpd_mod[0], @@ -215,7 +215,7 @@ } #endif - for (ind=0; sprov-probes[ind] != NULL; ind++) { + for (ind = 0; sprov-probes[ind] != NULL; ind++) { if (sprov-probes[ind]-created == 0) { res = dtrace_probe_create(sprov-id, sprov-probes[ind]-module, @@ -241,14 +241,14 @@ static void sdt_destroy(void *arg, dtrace_id_t id, void *parg) { - sdt_provider_t *sprov = arg; - int ind; + sdt_provider_t *sprov = arg; + int ind; #ifdef SDT_DEBUG printf(sdt: %s\n, __func__); #endif - for (ind=0; sprov-probes[ind] != NULL; ind++) { + for (ind = 0; sprov-probes[ind] != NULL; ind++) { if (sprov-probes[ind]-id == id) { #ifdef SDT_DEBUG printf(%s: destroying probe %d (%s:%s:%s:%s)\n, @@ -269,14 +269,14 @@ static int sdt_enable(void *arg, dtrace_id_t id, void *parg) { - sdt_provider_t *sprov = arg; - int ind; + sdt_provider_t *sprov = arg; + int ind; #ifdef SDT_DEBUG printf(sdt: %s\n, __func__); #endif - for (ind=0; sprov-probes[ind] != NULL; ind++) { + for (ind = 0; sprov-probes[ind] != NULL; ind++) {
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Fri Jul 29 15:20:39 UTC 2011 Modified Files: src/lib/libedit: chared.c common.c sys.h terminal.c tty.c Log Message: kill ifdef notdef To generate a diff of this commit: cvs rdiff -u -r1.32 -r1.33 src/lib/libedit/chared.c cvs rdiff -u -r1.26 -r1.27 src/lib/libedit/common.c cvs rdiff -u -r1.15 -r1.16 src/lib/libedit/sys.h cvs rdiff -u -r1.5 -r1.6 src/lib/libedit/terminal.c cvs rdiff -u -r1.38 -r1.39 src/lib/libedit/tty.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/libedit/chared.c diff -u src/lib/libedit/chared.c:1.32 src/lib/libedit/chared.c:1.33 --- src/lib/libedit/chared.c:1.32 Fri Jul 29 11:16:33 2011 +++ src/lib/libedit/chared.c Fri Jul 29 11:20:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: chared.c,v 1.32 2011/07/29 15:16:33 christos Exp $ */ +/* $NetBSD: chared.c,v 1.33 2011/07/29 15:20:39 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)chared.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: chared.c,v 1.32 2011/07/29 15:16:33 christos Exp $); +__RCSID($NetBSD: chared.c,v 1.33 2011/07/29 15:20:39 christos Exp $); #endif #endif /* not lint not SCCSID */ @@ -326,41 +326,6 @@ } -#ifdef notdef -/* c__number(): - * Ignore character p points to, return number appearing after that. - * A '$' by itself means a big number; $- is for negative; '^' means 1. - * Return p pointing to last char used. - */ -protected Char * -c__number( -Char *p, /* character position */ -int *num, /* Return value */ -int dval) /* dval is the number to subtract from like $-3 */ -{ - int i; - int sign = 1; - - if (*++p == '^') { - *num = 1; - return p; - } - if (*p == '$') { - if (*++p != '-') { - *num = 0x7fff; /* Handle $ */ - return --p; - } - sign = -1; /* Handle $- */ - ++p; - } -/* XXX: this assumes ASCII compatible digits */ - for (i = 0; Isdigit(*p); i = 10 * i + *p++ - '0') - continue; - *num = (sign 0 ? dval - i : i); - return --p; -} -#endif - /* cv_delfini(): * Finish vi delete action */ @@ -399,28 +364,6 @@ } -#ifdef notdef -/* ce__endword(): - * Go to the end of this word according to emacs - */ -protected Char * -ce__endword(Char *p, Char *high, int n) -{ - p++; - - while (n--) { - while ((p high) Isspace(*p)) - p++; - while ((p high) !Isspace(*p)) - p++; - } - - p--; - return p; -} -#endif - - /* cv__endword(): * Go to the end of this word according to vi */ Index: src/lib/libedit/common.c diff -u src/lib/libedit/common.c:1.26 src/lib/libedit/common.c:1.27 --- src/lib/libedit/common.c:1.26 Fri Jul 29 11:16:33 2011 +++ src/lib/libedit/common.c Fri Jul 29 11:20:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.26 2011/07/29 15:16:33 christos Exp $ */ +/* $NetBSD: common.c,v 1.27 2011/07/29 15:20:39 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)common.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: common.c,v 1.26 2011/07/29 15:16:33 christos Exp $); +__RCSID($NetBSD: common.c,v 1.27 2011/07/29 15:20:39 christos Exp $); #endif #endif /* not lint not SCCSID */ @@ -139,7 +139,7 @@ /*ARGSUSED*/ ed_delete_next_char(EditLine *el, Int c) { -#ifdef notdef /* XXX */ +#ifdef DEBUG_EDIT #define EL el-el_line (void) fprintf(el-el_errlfile, \nD(b: %x(%s) c: %x(%s) last: %x(%s) limit: %x(%s)\n, Index: src/lib/libedit/sys.h diff -u src/lib/libedit/sys.h:1.15 src/lib/libedit/sys.h:1.16 --- src/lib/libedit/sys.h:1.15 Thu Jul 28 16:50:55 2011 +++ src/lib/libedit/sys.h Fri Jul 29 11:20:39 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sys.h,v 1.15 2011/07/28 20:50:55 christos Exp $ */ +/* $NetBSD: sys.h,v 1.16 2011/07/29 15:20:39 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -124,40 +124,4 @@ extern char* tgetstr(char*, char**); #endif -#ifdef notdef -# undef REGEX -# undef REGEXP -# include malloc.h -# ifdef __GNUC__ -/* - * Broken hdrs. - */ -extern int tgetent(const char *bp, char *name); -extern int tgetflag(const char *id); -extern int tgetnum(const char *id); -extern char*tgetstr(const char *id, char **area); -extern char*tgoto(const char *cap, int col, int row); -extern int tputs(const char *str, int affcnt, int (*putc)(int)); -extern char*getenv(const char *); -extern int fprintf(FILE *, const char *, ...); -extern int sigsetmask(int); -extern int sigblock(int); -extern int fputc(int, FILE *); -extern int fgetc(FILE *); -extern int fflush(FILE *); -extern int tolower(int); -extern int toupper(int); -extern int errno, sys_nerr; -extern char *sys_errlist[]; -extern void perror(const char *); -# include string.h -# define strerror(e) sys_errlist[e] -# endif -# ifdef SABER -extern void * memcpy(void *, const void *, size_t); -extern void * memset(void *, int, size_t); -# endif -extern char*fgetline(FILE *, int *); -#endif - #endif /*
CVS commit: src/external/gpl2/xcvs/dist/src
Module Name:src Committed By: christos Date: Fri Jul 29 18:47:11 UTC 2011 Modified Files: src/external/gpl2/xcvs/dist/src: mkmodules.c Log Message: Allow init for new repository construction! To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/external/gpl2/xcvs/dist/src/mkmodules.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/mkmodules.c diff -u src/external/gpl2/xcvs/dist/src/mkmodules.c:1.3 src/external/gpl2/xcvs/dist/src/mkmodules.c:1.4 --- src/external/gpl2/xcvs/dist/src/mkmodules.c:1.3 Fri Apr 10 07:20:30 2009 +++ src/external/gpl2/xcvs/dist/src/mkmodules.c Fri Jul 29 14:47:11 2011 @@ -1154,15 +1154,12 @@ char *info_v; /* Exit status. */ int err = 0; +struct stat st; const struct admin_file *fileptr; umask (cvsumask); -if (!admin_group_member ()) - error (1, 0, usage is restricted to members of the group %s, - config-UserAdminGroup); - if (argc == -1 || argc 1) usage (init_usage); @@ -1177,6 +1174,11 @@ } #endif /* CLIENT_SUPPORT */ +if (stat (current_parsed_root-directory, st) != -1) + if (!admin_group_member ()) + error (1, 0, init to an existing repository is restricted to + members of the group %s, config-UserAdminGroup); + /* Note: we do *not* create parent directories as needed like the old cvsinit.sh script did. Few utilities do that, and a non-existent parent directory is as likely to be a typo as something
CVS commit: src/sys/dev/ic
Module Name:src Committed By: jakllsch Date: Fri Jul 29 19:19:14 UTC 2011 Modified Files: src/sys/dev/ic: hpet.c Log Message: Use one more bit of precision when calculating frequency from period. This makes the 4-times-NTSC color carrier get calculated to a correct 14318180Hz, instead of 14318179Hz, which seems a bit odd. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/dev/ic/hpet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/hpet.c diff -u src/sys/dev/ic/hpet.c:1.11 src/sys/dev/ic/hpet.c:1.12 --- src/sys/dev/ic/hpet.c:1.11 Wed Jun 15 09:09:48 2011 +++ src/sys/dev/ic/hpet.c Fri Jul 29 19:19:14 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: hpet.c,v 1.11 2011/06/15 09:09:48 jruoho Exp $ */ +/* $NetBSD: hpet.c,v 1.12 2011/07/29 19:19:14 jakllsch Exp $ */ /* * Copyright (c) 2006 Nicolas Joly @@ -33,7 +33,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: hpet.c,v 1.11 2011/06/15 09:09:48 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: hpet.c,v 1.12 2011/07/29 19:19:14 jakllsch Exp $); #include sys/systm.h #include sys/device.h @@ -87,7 +87,8 @@ aprint_error_dev(dv, invalid timer period\n); return; } - tc-tc_frequency = 1000ULL / val; + val = (1000ULL * 2) / val; + tc-tc_frequency = (val / 2) + (val 1); /* Enable timer */ val = bus_space_read_4(sc-sc_memt, sc-sc_memh, HPET_CONFIG);
CVS commit: src/sys/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 29 19:55:51 UTC 2011 Modified Files: src/sys/dev/raidframe: rf_disks.c rf_kintf.h rf_netbsdkintf.c Log Message: In rf_disks.c make sure ser_values and ser_count arrays are initialized before use. Validate the component label before considering a component for use, and make sure we only consider components that are optimal. Fixes PR#44251. All atf RAIDframe tests now pass. To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/dev/raidframe/rf_disks.c cvs rdiff -u -r1.21 -r1.22 src/sys/dev/raidframe/rf_kintf.h cvs rdiff -u -r1.291 -r1.292 src/sys/dev/raidframe/rf_netbsdkintf.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/raidframe/rf_disks.c diff -u src/sys/dev/raidframe/rf_disks.c:1.79 src/sys/dev/raidframe/rf_disks.c:1.80 --- src/sys/dev/raidframe/rf_disks.c:1.79 Wed May 11 18:13:12 2011 +++ src/sys/dev/raidframe/rf_disks.c Fri Jul 29 19:55:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_disks.c,v 1.79 2011/05/11 18:13:12 mrg Exp $ */ +/* $NetBSD: rf_disks.c,v 1.80 2011/07/29 19:55:50 oster Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -60,7 +60,7 @@ ***/ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rf_disks.c,v 1.79 2011/05/11 18:13:12 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: rf_disks.c,v 1.80 2011/07/29 19:55:50 oster Exp $); #include dev/raidframe/raidframevar.h @@ -136,6 +136,11 @@ ret = raidfetch_component_label(raidPtr, c); if (ret) goto fail; + + /* mark it as failed if the label looks bogus... */ + if (!rf_reasonable_label(raidPtr-raid_cinfo[c].ci_label,0) !force) { +disks[c].status = rf_ds_failed; + } } if (disks[c].status != rf_ds_optimal) { @@ -749,7 +754,12 @@ num_ser = 0; num_mod = 0; + ser_values[0] = ser_values[1] = ser_values[2] = ser_values[3] = 0; + ser_count[0] = ser_count[1] = ser_count[2] = ser_count[3] = 0; + for (c = 0; c raidPtr-numCol; c++) { + if (raidPtr-Disks[c].status != rf_ds_optimal) + continue; ci_label = raidget_component_label(raidPtr, c); found=0; for(i=0;inum_ser;i++) { @@ -805,6 +815,8 @@ } for (c = 0; c raidPtr-numCol; c++) { +if (raidPtr-Disks[c].status != rf_ds_optimal) + continue; ci_label = raidget_component_label(raidPtr, c); if (serial_number != ci_label-serial_number) { hosed_column = c; @@ -860,6 +872,9 @@ } for (c = 0; c raidPtr-numCol; c++) { +if (raidPtr-Disks[c].status != rf_ds_optimal) + continue; + ci_label = raidget_component_label(raidPtr, c); if (mod_number != ci_label-mod_counter) { if (hosed_column == c) { @@ -920,6 +935,13 @@ fatal_error = 1; } +for (c = 0; c raidPtr-numCol; c++) { + if (raidPtr-Disks[c].status != rf_ds_optimal) { + hosed_column = c; + break; + } + } + /* we start by assuming the parity will be good, and flee from that notion at the slightest sign of trouble */ Index: src/sys/dev/raidframe/rf_kintf.h diff -u src/sys/dev/raidframe/rf_kintf.h:1.21 src/sys/dev/raidframe/rf_kintf.h:1.22 --- src/sys/dev/raidframe/rf_kintf.h:1.21 Tue Nov 17 18:54:26 2009 +++ src/sys/dev/raidframe/rf_kintf.h Fri Jul 29 19:55:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_kintf.h,v 1.21 2009/11/17 18:54:26 jld Exp $ */ +/* $NetBSD: rf_kintf.h,v 1.22 2011/07/29 19:55:50 oster Exp $ */ /* * rf_kintf.h * @@ -37,6 +37,8 @@ #include dev/raidframe/raidframevar.h int rf_GetSpareTableFromDaemon(RF_SparetWait_t * req); +int rf_reasonable_label(RF_ComponentLabel_t *, uint64_t); + voidraidstart(RF_Raid_t * raidPtr); int rf_DispatchKernelIO(RF_DiskQueue_t * queue, RF_DiskQueueData_t * req); Index: src/sys/dev/raidframe/rf_netbsdkintf.c diff -u src/sys/dev/raidframe/rf_netbsdkintf.c:1.291 src/sys/dev/raidframe/rf_netbsdkintf.c:1.292 --- src/sys/dev/raidframe/rf_netbsdkintf.c:1.291 Wed May 11 18:13:12 2011 +++ src/sys/dev/raidframe/rf_netbsdkintf.c Fri Jul 29 19:55:50 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.291 2011/05/11 18:13:12 mrg Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.292 2011/07/29 19:55:50 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. @@ -101,7 +101,7 @@ ***/ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.291 2011/05/11 18:13:12 mrg Exp $); +__KERNEL_RCSID(0, $NetBSD: rf_netbsdkintf.c,v 1.292 2011/07/29 19:55:50 oster Exp $); #ifdef _KERNEL_OPT #include opt_compat_netbsd.h @@ -297,7 +297,7 @@ RF_AutoConfig_t *rf_find_raid_components(void); RF_ConfigSet_t *rf_create_auto_sets(RF_AutoConfig_t *); static int rf_does_it_fit(RF_ConfigSet_t *,RF_AutoConfig_t *); -static int rf_reasonable_label(RF_ComponentLabel_t *, uint64_t); +int
CVS commit: src/tests/dev/raidframe
Module Name:src Committed By: oster Date: Fri Jul 29 19:57:38 UTC 2011 Modified Files: src/tests/dev/raidframe: t_raid.sh Log Message: Note that PR kern/44251 is fixed. Add tests for normal configuration of RAID 1 and RAID 5 sets. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/dev/raidframe/t_raid.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/dev/raidframe/t_raid.sh diff -u src/tests/dev/raidframe/t_raid.sh:1.8 src/tests/dev/raidframe/t_raid.sh:1.9 --- src/tests/dev/raidframe/t_raid.sh:1.8 Sat May 14 17:42:28 2011 +++ src/tests/dev/raidframe/t_raid.sh Fri Jul 29 19:57:38 2011 @@ -1,4 +1,5 @@ -# $NetBSD: t_raid.sh,v 1.8 2011/05/14 17:42:28 jmmv Exp $ +#! /usr/bin/atf-sh +# $NetBSD: t_raid.sh,v 1.9 2011/07/29 19:57:38 oster Exp $ # # Copyright (c) 2010 The NetBSD Foundation, Inc. # All rights reserved. @@ -125,7 +126,8 @@ atf_test_case raid1_comp0fail cleanup raid1_comp0fail_head() { - atf_set descr Checks configuring RAID1 after component 0 fails + atf_set descr Checks configuring RAID1 after component 0 fails \ + (PR kern/44251) } raid1_comp0fail_body() @@ -144,12 +146,11 @@ # restart server with failed component rump.halt rm disk0.img # FAIL - atf_check -s exit:0 ${raidserver}\ + atf_check -s exit:0 ${raidserver} \ -d key=/disk0,hostpath=disk0.img,size=${RAID_MEDIASIZE} \ -d key=/disk1,hostpath=disk1.img,size=${RAID_MEDIASIZE} \ ${RUMP_SERVER} - atf_expect_fail PR kern/44251 atf_check -s exit:0 rump.raidctl -c raid.conf raid0 } @@ -159,6 +160,53 @@ rump.halt } +atf_test_case raid1_normal cleanup +raid1_normal_head() +{ + atf_set descr Checks that RAID1 -c configurations work \ + in the normal case +} + +raid1_normal_body() +{ + makecfg 1 2 +atf_check -s exit:0 ${raidserver} \ +-d key=/disk0,hostpath=disk0.img,size=${RAID_MEDIASIZE} \ +-d key=/disk1,hostpath=disk1.img,size=${RAID_MEDIASIZE} \ +${RUMP_SERVER} + +atf_check -s exit:0 rump.raidctl -C raid.conf raid0 +atf_check -s exit:0 rump.raidctl -I 12345 raid0 +atf_check -s exit:0 -o ignore rump.raidctl -iv raid0 + +# put some data there +atf_check -s exit:0 -e ignore \ +dd if=$(atf_get_srcdir)/t_raid of=testfile count=4 +atf_check -s exit:0 -e ignore -x \ +dd if=testfile | rump.dd of=${rawraid} conv=sync + +# restart server, disks remain normal +rump.halt + +atf_check -s exit:0 ${raidserver} \ +-d key=/disk0,hostpath=disk0.img,size=${RAID_MEDIASIZE} \ +-d key=/disk1,hostpath=disk1.img,size=${RAID_MEDIASIZE} \ +${RUMP_SERVER} + +atf_check -s exit:0 rump.raidctl -c raid.conf raid0 + +# check if we we get what we wrote +atf_check -s exit:0 -o file:testfile -e ignore \ +rump.dd if=${rawraid} count=4 + +} + +raid1_comp0fail_cleanup() +{ +export RUMP_SERVER=unix://sock +rump.halt +} + atf_test_case raid5_compfail cleanup raid5_compfail_head() @@ -208,11 +256,61 @@ rump.halt } +atf_test_case raid5_normal cleanup +raid5_normal_head() +{ +atf_set descr Checks that RAID5 works after normal shutdown \ + and 'raidctl -c' startup +} + +raid5_normal_body() +{ +makecfg 5 3 +export RUMP_SERVER=unix://sock +atf_check -s exit:0 ${raidserver} \ +-d key=/disk0,hostpath=disk0.img,size=${RAID_MEDIASIZE} \ +-d key=/disk1,hostpath=disk1.img,size=${RAID_MEDIASIZE} \ +-d key=/disk2,hostpath=disk2.img,size=${RAID_MEDIASIZE} \ +${RUMP_SERVER} + +atf_check -s exit:0 rump.raidctl -C raid.conf raid0 +atf_check -s exit:0 rump.raidctl -I 12345 raid0 +atf_check -s exit:0 -o ignore rump.raidctl -iv raid0 + +# put some data there +atf_check -s exit:0 -e ignore \ +dd if=$(atf_get_srcdir)/t_raid of=testfile count=4 +atf_check -s exit:0 -e ignore -x \ +dd if=testfile | rump.dd of=${rawraid} conv=sync + +# restart server after normal shutdown +rump.halt + +atf_check -s exit:0 ${raidserver} \ +-d key=/disk0,hostpath=disk0.img,size=${RAID_MEDIASIZE} \ +-d key=/disk1,hostpath=disk1.img,size=${RAID_MEDIASIZE} \ +-d key=/disk2,hostpath=disk2.img,size=${RAID_MEDIASIZE} \ +${RUMP_SERVER} + +atf_check -s exit:0 rump.raidctl -c raid.conf raid0 + +# check if we we get what we wrote +atf_check -s exit:0 -o file:testfile -e ignore \ +rump.dd if=${rawraid} count=4 +} + +raid5_normal_cleanup() +{ +export RUMP_SERVER=unix://sock +
CVS commit: src/sys/dev/flash
Module Name:src Committed By: ahoka Date: Fri Jul 29 20:48:33 UTC 2011 Modified Files: src/sys/dev/flash: flash.c flash.h Log Message: add a function to get the size of the flash device To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/flash/flash.c cvs rdiff -u -r1.6 -r1.7 src/sys/dev/flash/flash.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/flash/flash.c diff -u src/sys/dev/flash/flash.c:1.8 src/sys/dev/flash/flash.c:1.9 --- src/sys/dev/flash/flash.c:1.8 Fri Jul 15 19:19:57 2011 +++ src/sys/dev/flash/flash.c Fri Jul 29 20:48:33 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: flash.c,v 1.8 2011/07/15 19:19:57 cliff Exp $ */ +/* $NetBSD: flash.c,v 1.9 2011/07/29 20:48:33 ahoka Exp $ */ /*- * Copyright (c) 2011 Department of Software Engineering, @@ -37,7 +37,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: flash.c,v 1.8 2011/07/15 19:19:57 cliff Exp $); +__KERNEL_RCSID(0, $NetBSD: flash.c,v 1.9 2011/07/29 20:48:33 ahoka Exp $); #include sys/param.h #include sys/types.h @@ -525,6 +525,16 @@ return sc-sc_dev; } +flash_size_t +flash_get_size(dev_t dev) +{ + const struct flash_softc *sc; + + sc = flash_get_softc(dev); + + return sc-sc_partinfo.part_size; +} + static inline flash_off_t flash_get_part_offset(struct flash_softc * const sc, size_t poffset) { Index: src/sys/dev/flash/flash.h diff -u src/sys/dev/flash/flash.h:1.6 src/sys/dev/flash/flash.h:1.7 --- src/sys/dev/flash/flash.h:1.6 Fri Jul 15 19:19:57 2011 +++ src/sys/dev/flash/flash.h Fri Jul 29 20:48:33 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: flash.h,v 1.6 2011/07/15 19:19:57 cliff Exp $ */ +/* $NetBSD: flash.h,v 1.7 2011/07/29 20:48:33 ahoka Exp $ */ /*- * Copyright (c) 2011 Department of Software Engineering, @@ -123,6 +123,7 @@ const struct flash_interface *flash_get_interface(dev_t); const struct flash_softc *flash_get_softc(dev_t); device_t flash_get_device(dev_t); +flash_size_t flash_get_size(dev_t); /* flash operations should be used through these */ int flash_erase(device_t, struct flash_erase_instruction *);
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Fri Jul 29 20:56:58 UTC 2011 Modified Files: src/lib/libedit: Makefile Log Message: add -Wunused-parameter Is that the right way? Perhaps WARNS=5? To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/lib/libedit/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/libedit/Makefile diff -u src/lib/libedit/Makefile:1.44 src/lib/libedit/Makefile:1.45 --- src/lib/libedit/Makefile:1.44 Wed Jul 27 21:56:26 2011 +++ src/lib/libedit/Makefile Fri Jul 29 16:56:58 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.44 2011/07/28 01:56:26 christos Exp $ +# $NetBSD: Makefile,v 1.45 2011/07/29 20:56:58 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 USE_SHLIBDIR= yes @@ -8,6 +8,7 @@ LIB= edit LIBDPLIBS+= terminfo ${.CURDIR}/../libterminfo +COPTS+=-Wunused-parameter OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \ hist.c keymacro.c map.c chartype.c \
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Fri Jul 29 20:58:07 UTC 2011 Modified Files: src/lib/libedit: common.c filecomplete.c history.c readline.c vi.c Log Message: - fix unused params - unconditionalize vis.h To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/lib/libedit/common.c \ src/lib/libedit/filecomplete.c cvs rdiff -u -r1.43 -r1.44 src/lib/libedit/history.c cvs rdiff -u -r1.96 -r1.97 src/lib/libedit/readline.c cvs rdiff -u -r1.37 -r1.38 src/lib/libedit/vi.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/libedit/common.c diff -u src/lib/libedit/common.c:1.27 src/lib/libedit/common.c:1.28 --- src/lib/libedit/common.c:1.27 Fri Jul 29 11:20:39 2011 +++ src/lib/libedit/common.c Fri Jul 29 16:58:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: common.c,v 1.27 2011/07/29 15:20:39 christos Exp $ */ +/* $NetBSD: common.c,v 1.28 2011/07/29 20:58:07 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)common.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: common.c,v 1.27 2011/07/29 15:20:39 christos Exp $); +__RCSID($NetBSD: common.c,v 1.28 2011/07/29 20:58:07 christos Exp $); #endif #endif /* not lint not SCCSID */ @@ -137,7 +137,7 @@ */ protected el_action_t /*ARGSUSED*/ -ed_delete_next_char(EditLine *el, Int c) +ed_delete_next_char(EditLine *el, Int c __attribute__((__unused__))) { #ifdef DEBUG_EDIT #define EL el-el_line @@ -432,7 +432,8 @@ */ protected el_action_t /*ARGSUSED*/ -ed_unassigned(EditLine *el, Int c __attribute__((__unused__))) +ed_unassigned(EditLine *el __attribute__((__unused__)), +Int c __attribute__((__unused__))) { return CC_ERROR; Index: src/lib/libedit/filecomplete.c diff -u src/lib/libedit/filecomplete.c:1.27 src/lib/libedit/filecomplete.c:1.28 --- src/lib/libedit/filecomplete.c:1.27 Fri Jul 29 11:16:33 2011 +++ src/lib/libedit/filecomplete.c Fri Jul 29 16:58:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: filecomplete.c,v 1.27 2011/07/29 15:16:33 christos Exp $ */ +/* $NetBSD: filecomplete.c,v 1.28 2011/07/29 20:58:07 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include config.h #if !defined(lint) !defined(SCCSID) -__RCSID($NetBSD: filecomplete.c,v 1.27 2011/07/29 15:16:33 christos Exp $); +__RCSID($NetBSD: filecomplete.c,v 1.28 2011/07/29 20:58:07 christos Exp $); #endif /* not lint not SCCSID */ #include sys/types.h @@ -46,11 +46,7 @@ #include limits.h #include errno.h #include fcntl.h -#ifdef HAVE_VIS_H -#include vis.h -#else -#include vis.h -#endif + #include el.h #include fcns.h /* for EL_NUM_FCNS */ #include histedit.h Index: src/lib/libedit/history.c diff -u src/lib/libedit/history.c:1.43 src/lib/libedit/history.c:1.44 --- src/lib/libedit/history.c:1.43 Fri Jul 29 11:16:33 2011 +++ src/lib/libedit/history.c Fri Jul 29 16:58:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: history.c,v 1.43 2011/07/29 15:16:33 christos Exp $ */ +/* $NetBSD: history.c,v 1.44 2011/07/29 20:58:07 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)history.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: history.c,v 1.43 2011/07/29 15:16:33 christos Exp $); +__RCSID($NetBSD: history.c,v 1.44 2011/07/29 20:58:07 christos Exp $); #endif #endif /* not lint not SCCSID */ @@ -47,11 +47,7 @@ #include string.h #include stdlib.h #include stdarg.h -#ifdef HAVE_VIS_H #include vis.h -#else -#include vis.h -#endif #include sys/stat.h static const char hist_cookie[] = _HiStOrY_V2_\n; Index: src/lib/libedit/readline.c diff -u src/lib/libedit/readline.c:1.96 src/lib/libedit/readline.c:1.97 --- src/lib/libedit/readline.c:1.96 Fri Jul 29 11:16:33 2011 +++ src/lib/libedit/readline.c Fri Jul 29 16:58:07 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: readline.c,v 1.96 2011/07/29 15:16:33 christos Exp $ */ +/* $NetBSD: readline.c,v 1.97 2011/07/29 20:58:07 christos Exp $ */ /*- * Copyright (c) 1997 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include config.h #if !defined(lint) !defined(SCCSID) -__RCSID($NetBSD: readline.c,v 1.96 2011/07/29 15:16:33 christos Exp $); +__RCSID($NetBSD: readline.c,v 1.97 2011/07/29 20:58:07 christos Exp $); #endif /* not lint not SCCSID */ #include sys/types.h @@ -47,11 +47,8 @@ #include errno.h #include fcntl.h #include setjmp.h -#ifdef HAVE_VIS_H #include vis.h -#else -#include vis.h -#endif + #include readline/readline.h #include el.h #include fcns.h /* for EL_NUM_FCNS */ @@ -205,7 +202,7 @@ */ static int /*ARGSUSED*/ -_getc_function(EditLine *el, char *c) +_getc_function(EditLine *el __attribute__((__unused__)), char *c) { int i; @@ -1886,7 +1883,8 @@ /*ARGSUSED*/ int -rl_newline(int count, int c) +rl_newline(int count __attribute__((__unused__)), +int c __attribute__((__unused__))) { /* * Readline-4.0 appears to ignore
CVS commit: src/sys/dev/isa
Module Name:src Committed By: jmcneill Date: Fri Jul 29 20:58:47 UTC 2011 Modified Files: src/sys/dev/isa: itesio_isa.c Log Message: add module support To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/dev/isa/itesio_isa.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/isa/itesio_isa.c diff -u src/sys/dev/isa/itesio_isa.c:1.22 src/sys/dev/isa/itesio_isa.c:1.23 --- src/sys/dev/isa/itesio_isa.c:1.22 Mon Jun 20 18:12:54 2011 +++ src/sys/dev/isa/itesio_isa.c Fri Jul 29 20:58:47 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: itesio_isa.c,v 1.22 2011/06/20 18:12:54 pgoyette Exp $ */ +/* $NetBSD: itesio_isa.c,v 1.23 2011/07/29 20:58:47 jmcneill Exp $ */ /* Derived from $OpenBSD: it.c,v 1.19 2006/04/10 00:57:54 deraadt Exp $ */ /* @@ -34,12 +34,12 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: itesio_isa.c,v 1.22 2011/06/20 18:12:54 pgoyette Exp $); +__KERNEL_RCSID(0, $NetBSD: itesio_isa.c,v 1.23 2011/07/29 20:58:47 jmcneill Exp $); #include sys/param.h #include sys/kernel.h #include sys/device.h - +#include sys/module.h #include sys/bus.h #include dev/isa/isareg.h @@ -610,3 +610,32 @@ return 0; } + +MODULE(MODULE_CLASS_DRIVER, itesio, NULL); + +#ifdef _MODULE +#include ioconf.c +#endif + +static int +itesio_modcmd(modcmd_t cmd, void *opaque) +{ + switch (cmd) { + case MODULE_CMD_INIT: +#ifdef _MODULE + return config_init_component(cfdriver_ioconf_itesio, + cfattach_ioconf_itesio, cfdata_ioconf_itesio); +#else + return 0; +#endif + case MODULE_CMD_FINI: +#ifdef _MODULE + return config_fini_component(cfdriver_ioconf_itesio, + cfattach_ioconf_itesio, cfdata_ioconf_itesio); +#else + return 0; +#endif + default: + return ENOTTY; + } +}
CVS commit: src/sys/modules/itesio
Module Name:src Committed By: jmcneill Date: Fri Jul 29 20:59:25 UTC 2011 Added Files: src/sys/modules/itesio: Makefile itesio.ioconf Log Message: module build glue for itesio To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/modules/itesio/Makefile \ src/sys/modules/itesio/itesio.ioconf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/modules/itesio/Makefile diff -u /dev/null src/sys/modules/itesio/Makefile:1.1 --- /dev/null Fri Jul 29 20:59:25 2011 +++ src/sys/modules/itesio/Makefile Fri Jul 29 20:59:25 2011 @@ -0,0 +1,13 @@ +# $NetBSD: Makefile,v 1.1 2011/07/29 20:59:25 jmcneill Exp $ + +.include ../Makefile.inc + +.PATH: ${S}/dev/isa + +KMOD= itesio +IOCONF= itesio.ioconf +SRCS= itesio_isa.c + +WARNS= 5 + +.include bsd.kmodule.mk Index: src/sys/modules/itesio/itesio.ioconf diff -u /dev/null src/sys/modules/itesio/itesio.ioconf:1.1 --- /dev/null Fri Jul 29 20:59:25 2011 +++ src/sys/modules/itesio/itesio.ioconf Fri Jul 29 20:59:25 2011 @@ -0,0 +1,10 @@ +# $NetBSD: itesio.ioconf,v 1.1 2011/07/29 20:59:25 jmcneill Exp $ + +ioconf itesio + +include conf/files +include dev/isa/files.isa + +pseudo-root isa* + +itesio* at isa? port 0x2e
CVS commit: src
Module Name:src Committed By: jmcneill Date: Fri Jul 29 21:01:43 UTC 2011 Modified Files: src/distrib/sets/lists/modules: md.amd64 md.i386 src/sys/modules: Makefile Log Message: build and install itesio module on i386 and amd64 To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/distrib/sets/lists/modules/md.amd64 cvs rdiff -u -r1.28 -r1.29 src/distrib/sets/lists/modules/md.i386 cvs rdiff -u -r1.78 -r1.79 src/sys/modules/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/modules/md.amd64 diff -u src/distrib/sets/lists/modules/md.amd64:1.23 src/distrib/sets/lists/modules/md.amd64:1.24 --- src/distrib/sets/lists/modules/md.amd64:1.23 Wed Jul 13 07:52:49 2011 +++ src/distrib/sets/lists/modules/md.amd64 Fri Jul 29 21:01:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.23 2011/07/13 07:52:49 jruoho Exp $ +# $NetBSD: md.amd64,v 1.24 2011/07/29 21:01:43 jmcneill Exp $ ./@MODULEDIR@/acpiacadbase-kernel-modules kmod ./@MODULEDIR@/acpiacad/acpiacad.kmod base-kernel-modules kmod ./@MODULEDIR@/acpibatbase-kernel-modules kmod @@ -65,6 +65,8 @@ ./@MODULEDIR@/hpqlb/hpqlb.kmod base-kernel-modules kmod ./@MODULEDIR@/i915drmbase-kernel-modules kmod ./@MODULEDIR@/i915drm/i915drm.kmod base-kernel-modules kmod +./@MODULEDIR@/itesiobase-kernel-modules kmod +./@MODULEDIR@/itesio/itesio.kmod base-kernel-modules kmod ./@MODULEDIR@/odcmbase-kernel-modules kmod ./@MODULEDIR@/odcm/odcm.kmod base-kernel-modules kmod ./@MODULEDIR@/padbase-kernel-modules kmod Index: src/distrib/sets/lists/modules/md.i386 diff -u src/distrib/sets/lists/modules/md.i386:1.28 src/distrib/sets/lists/modules/md.i386:1.29 --- src/distrib/sets/lists/modules/md.i386:1.28 Fri Jul 15 21:08:48 2011 +++ src/distrib/sets/lists/modules/md.i386 Fri Jul 29 21:01:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.28 2011/07/15 21:08:48 jmcneill Exp $ +# $NetBSD: md.i386,v 1.29 2011/07/29 21:01:43 jmcneill Exp $ ./@MODULEDIR@/acpiacadbase-kernel-modules kmod ./@MODULEDIR@/acpiacad/acpiacad.kmod base-kernel-modules kmod ./@MODULEDIR@/acpibatbase-kernel-modules kmod @@ -67,6 +67,8 @@ ./@MODULEDIR@/hpqlb/hpqlb.kmod base-kernel-modules kmod ./@MODULEDIR@/i915drmbase-kernel-modules kmod ./@MODULEDIR@/i915drm/i915drm.kmod base-kernel-modules kmod +./@MODULEDIR@/itesiobase-kernel-modules kmod +./@MODULEDIR@/itesio/itesio.kmod base-kernel-modules kmod ./@MODULEDIR@/nsclpcsiobase-kernel-modules kmod ./@MODULEDIR@/nsclpcsio/nsclpcsio.kmod base-kernel-modules kmod ./@MODULEDIR@/radeondrmbase-kernel-modules kmod Index: src/sys/modules/Makefile diff -u src/sys/modules/Makefile:1.78 src/sys/modules/Makefile:1.79 --- src/sys/modules/Makefile:1.78 Tue Jul 19 23:13:31 2011 +++ src/sys/modules/Makefile Fri Jul 29 21:01:43 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.78 2011/07/19 23:13:31 enami Exp $ +# $NetBSD: Makefile,v 1.79 2011/07/29 21:01:43 jmcneill Exp $ .include bsd.own.mk @@ -164,6 +164,7 @@ SUBDIR+= aps SUBDIR+= au8522 SUBDIR+= auvitek +SUBDIR+= itesio SUBDIR+= xc5k .endif
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: dyoung Date: Fri Jul 29 21:21:43 UTC 2011 Modified Files: src/sys/arch/x86/x86: cpu.c Log Message: Don't shutdown the boostrap processor (BSP) because we may have to run BIOS methods on it. For example, ACPI requires that we execute the code for changing sleep state on the BSP. This may help the problem where folks' machines would hang instead of powering off when they entered ACPI sleep state 5. XXX If the BSP is already shut down, we should start it back up. To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/x86/x86/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/x86/x86/cpu.c diff -u src/sys/arch/x86/x86/cpu.c:1.89 src/sys/arch/x86/x86/cpu.c:1.90 --- src/sys/arch/x86/x86/cpu.c:1.89 Wed Jun 22 09:28:08 2011 +++ src/sys/arch/x86/x86/cpu.c Fri Jul 29 21:21:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.89 2011/06/22 09:28:08 jruoho Exp $ */ +/* $NetBSD: cpu.c,v 1.90 2011/07/29 21:21:43 dyoung Exp $ */ /*- * Copyright (c) 2000, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -62,7 +62,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.89 2011/06/22 09:28:08 jruoho Exp $); +__KERNEL_RCSID(0, $NetBSD: cpu.c,v 1.90 2011/07/29 21:21:43 dyoung Exp $); #include opt_ddb.h #include opt_mpbios.h /* for MPDEBUG */ @@ -1137,6 +1137,12 @@ static bool cpu_shutdown(device_t dv, int how) { + struct cpu_softc *sc = device_private(dv); + struct cpu_info *ci = sc-sc_info; + + if (ci-ci_flags CPUF_BSP) + return false; + return cpu_suspend(dv, NULL); }
CVS commit: src/sys/arch/xen/xen
Module Name:src Committed By: jym Date: Fri Jul 29 22:16:05 UTC 2011 Modified Files: src/sys/arch/xen/xen: balloon.c clock.c Log Message: Move xen.balloon to machdep in the sysctl(7) tree. It does not really belong to either kern or hw. Rename machdep.xen_timepush_ticks to xen.timepush_ticks, so it can live under the same tree as the balloon node, machdep.xen. ok bouyer@. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/xen/xen/balloon.c cvs rdiff -u -r1.54 -r1.55 src/sys/arch/xen/xen/clock.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/xen/xen/balloon.c diff -u src/sys/arch/xen/xen/balloon.c:1.9 src/sys/arch/xen/xen/balloon.c:1.10 --- src/sys/arch/xen/xen/balloon.c:1.9 Fri Apr 29 22:52:02 2011 +++ src/sys/arch/xen/xen/balloon.c Fri Jul 29 22:16:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: balloon.c,v 1.9 2011/04/29 22:52:02 jym Exp $ */ +/* $NetBSD: balloon.c,v 1.10 2011/07/29 22:16:05 jym Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ #define BALLOONDEBUG 0 #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: balloon.c,v 1.9 2011/04/29 22:52:02 jym Exp $); +__KERNEL_RCSID(0, $NetBSD: balloon.c,v 1.10 2011/07/29 22:16:05 jym Exp $); #include sys/inttypes.h #include sys/device.h @@ -773,9 +773,9 @@ sysctl_createv(clog, 0, NULL, node, CTLFLAG_PERMANENT, - CTLTYPE_NODE, kern, NULL, + CTLTYPE_NODE, machdep, NULL, NULL, 0, NULL, 0, - CTL_KERN, CTL_EOL); + CTL_MACHDEP, CTL_EOL); sysctl_createv(clog, 0, node, node, CTLFLAG_PERMANENT, Index: src/sys/arch/xen/xen/clock.c diff -u src/sys/arch/xen/xen/clock.c:1.54 src/sys/arch/xen/xen/clock.c:1.55 --- src/sys/arch/xen/xen/clock.c:1.54 Sun Mar 28 20:46:18 2010 +++ src/sys/arch/xen/xen/clock.c Fri Jul 29 22:16:05 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.54 2010/03/28 20:46:18 snj Exp $ */ +/* $NetBSD: clock.c,v 1.55 2011/07/29 22:16:05 jym Exp $ */ /* * @@ -29,7 +29,7 @@ #include opt_xen.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.54 2010/03/28 20:46:18 snj Exp $); +__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.55 2011/07/29 22:16:05 jym Exp $); #include sys/param.h #include sys/systm.h @@ -416,11 +416,21 @@ #ifdef DOM0OPS xen_timepush_ticks = 53 * hz + 3; /* avoid exact # of min/sec */ if (xendomain_is_privileged()) { - sysctl_createv(NULL, 0, NULL, NULL, CTLFLAG_READWRITE, - CTLTYPE_INT, xen_timepush_ticks, SYSCTL_DESCR(How often - to update the hypervisor's time-of-day; 0 to disable), - sysctl_xen_timepush, 0, xen_timepush_ticks, 0, + const struct sysctlnode *node = NULL; + + sysctl_createv(NULL, 0, NULL, node, 0, + CTLTYPE_NODE, xen, + SYSCTL_DESCR(Xen top level node), + NULL, 0, NULL, 0, CTL_MACHDEP, CTL_CREATE, CTL_EOL); + + sysctl_createv(NULL, 0, node, NULL, CTLFLAG_READWRITE, + CTLTYPE_INT, timepush_ticks, + SYSCTL_DESCR(How often to update the hypervisor's + time-of-day; 0 to disable), + sysctl_xen_timepush, 0, xen_timepush_ticks, 0, + CTL_CREATE, CTL_EOL); + callout_reset(xen_timepush_co, xen_timepush_ticks, xen_timepush, xen_timepush_co); }
CVS commit: src/sys/ufs/ufs
Module Name:src Committed By: riastradh Date: Fri Jul 29 22:18:57 UTC 2011 Modified Files: src/sys/ufs/ufs: ufs_vnops.c Log Message: In ufs_rename, declare oldparent and newparent ino_t, not int. XXX There should be an automatic test for this somewhere. ok dholland To generate a diff of this commit: cvs rdiff -u -r1.200 -r1.201 src/sys/ufs/ufs/ufs_vnops.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/ufs/ufs/ufs_vnops.c diff -u src/sys/ufs/ufs/ufs_vnops.c:1.200 src/sys/ufs/ufs/ufs_vnops.c:1.201 --- src/sys/ufs/ufs/ufs_vnops.c:1.200 Mon Jul 18 06:45:47 2011 +++ src/sys/ufs/ufs/ufs_vnops.c Fri Jul 29 22:18:56 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ufs_vnops.c,v 1.200 2011/07/18 06:45:47 dholland Exp $ */ +/* $NetBSD: ufs_vnops.c,v 1.201 2011/07/29 22:18:56 riastradh Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ufs_vnops.c,v 1.200 2011/07/18 06:45:47 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: ufs_vnops.c,v 1.201 2011/07/29 22:18:56 riastradh Exp $); #if defined(_KERNEL_OPT) #include opt_ffs.h @@ -1317,7 +1317,8 @@ struct inode *ip, *txp, *fxp, *tdp, *fdp; struct mount *mp; struct direct *newdir; - int doingdirectory, oldparent, newparent, error; + int doingdirectory, error; + ino_t oldparent, newparent; struct ufs_lookup_results from_ulr, to_ulr; @@ -1327,7 +1328,8 @@ fdvp = ap-a_fdvp; tcnp = ap-a_tcnp; fcnp = ap-a_fcnp; - doingdirectory = oldparent = newparent = error = 0; + doingdirectory = error = 0; + oldparent = newparent = 0; /* save the supplemental lookup results as they currently exist */ from_ulr = VTOI(fdvp)-i_crap;
CVS commit: src/lib/libedit
Module Name:src Committed By: christos Date: Fri Jul 29 23:44:45 UTC 2011 Modified Files: src/lib/libedit: Makefile chared.c chartype.c chartype.h el.h filecomplete.c history.c keymacro.c read.c readline.c refresh.c search.c terminal.c terminal.h vi.c Log Message: pass -Wconversion To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/lib/libedit/Makefile cvs rdiff -u -r1.33 -r1.34 src/lib/libedit/chared.c cvs rdiff -u -r1.8 -r1.9 src/lib/libedit/chartype.c cvs rdiff -u -r1.7 -r1.8 src/lib/libedit/chartype.h cvs rdiff -u -r1.24 -r1.25 src/lib/libedit/el.h cvs rdiff -u -r1.28 -r1.29 src/lib/libedit/filecomplete.c cvs rdiff -u -r1.44 -r1.45 src/lib/libedit/history.c cvs rdiff -u -r1.5 -r1.6 src/lib/libedit/keymacro.c cvs rdiff -u -r1.65 -r1.66 src/lib/libedit/read.c cvs rdiff -u -r1.97 -r1.98 src/lib/libedit/readline.c cvs rdiff -u -r1.36 -r1.37 src/lib/libedit/refresh.c cvs rdiff -u -r1.27 -r1.28 src/lib/libedit/search.c cvs rdiff -u -r1.6 -r1.7 src/lib/libedit/terminal.c cvs rdiff -u -r1.2 -r1.3 src/lib/libedit/terminal.h cvs rdiff -u -r1.38 -r1.39 src/lib/libedit/vi.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/libedit/Makefile diff -u src/lib/libedit/Makefile:1.45 src/lib/libedit/Makefile:1.46 --- src/lib/libedit/Makefile:1.45 Fri Jul 29 16:56:58 2011 +++ src/lib/libedit/Makefile Fri Jul 29 19:44:44 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.45 2011/07/29 20:56:58 christos Exp $ +# $NetBSD: Makefile,v 1.46 2011/07/29 23:44:44 christos Exp $ # @(#)Makefile 8.1 (Berkeley) 6/4/93 USE_SHLIBDIR= yes @@ -8,7 +8,7 @@ LIB= edit LIBDPLIBS+= terminfo ${.CURDIR}/../libterminfo -COPTS+=-Wunused-parameter +COPTS+=-Wunused-parameter -Wconversion OSRCS= chared.c common.c el.c emacs.c fcns.c filecomplete.c help.c \ hist.c keymacro.c map.c chartype.c \ Index: src/lib/libedit/chared.c diff -u src/lib/libedit/chared.c:1.33 src/lib/libedit/chared.c:1.34 --- src/lib/libedit/chared.c:1.33 Fri Jul 29 11:20:39 2011 +++ src/lib/libedit/chared.c Fri Jul 29 19:44:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: chared.c,v 1.33 2011/07/29 15:20:39 christos Exp $ */ +/* $NetBSD: chared.c,v 1.34 2011/07/29 23:44:44 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = @(#)chared.c 8.1 (Berkeley) 6/4/93; #else -__RCSID($NetBSD: chared.c,v 1.33 2011/07/29 15:20:39 christos Exp $); +__RCSID($NetBSD: chared.c,v 1.34 2011/07/29 23:44:44 christos Exp $); #endif #endif /* not lint not SCCSID */ @@ -691,7 +691,7 @@ break; default: - if (len = EL_BUFSIZ - 16) + if (len = (ssize_t)(EL_BUFSIZ - 16)) terminal_beep(el); else { buf[len++] = ch; Index: src/lib/libedit/chartype.c diff -u src/lib/libedit/chartype.c:1.8 src/lib/libedit/chartype.c:1.9 --- src/lib/libedit/chartype.c:1.8 Fri Jul 29 11:16:33 2011 +++ src/lib/libedit/chartype.c Fri Jul 29 19:44:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: chartype.c,v 1.8 2011/07/29 15:16:33 christos Exp $ */ +/* $NetBSD: chartype.c,v 1.9 2011/07/29 23:44:44 christos Exp $ */ /*- * Copyright (c) 2009 The NetBSD Foundation, Inc. @@ -38,12 +38,12 @@ */ #include config.h #if !defined(lint) !defined(SCCSID) -__RCSID($NetBSD: chartype.c,v 1.8 2011/07/29 15:16:33 christos Exp $); +__RCSID($NetBSD: chartype.c,v 1.9 2011/07/29 23:44:44 christos Exp $); #endif /* not lint not SCCSID */ #include el.h #include stdlib.h -#define CT_BUFSIZ 1024 +#define CT_BUFSIZ ((size_t)1024) #ifdef WIDECHAR protected void @@ -83,7 +83,7 @@ if (!s) return NULL; if (!conv-cbuff) - ct_conv_buff_resize(conv, CT_BUFSIZ, 0); + ct_conv_buff_resize(conv, CT_BUFSIZ, (size_t)0); if (!conv-cbuff) return NULL; @@ -92,12 +92,13 @@ used = conv-csize - (dst - conv-cbuff); if (used 5) { used = dst - conv-cbuff; - ct_conv_buff_resize(conv, conv-csize + CT_BUFSIZ, 0); + ct_conv_buff_resize(conv, conv-csize + CT_BUFSIZ, + (size_t)0); if (!conv-cbuff) return NULL; dst = conv-cbuff + used; } - used = ct_encode_char(dst, 5, *s); + used = ct_encode_char(dst, (size_t)5, *s); if (used == -1) /* failed to encode, need more buffer space */ abort(); ++s; @@ -115,15 +116,15 @@ if (!s) return NULL; if (!conv-wbuff) - ct_conv_buff_resize(conv, 0, CT_BUFSIZ); + ct_conv_buff_resize(conv, (size_t)0, CT_BUFSIZ); if (!conv-wbuff) return NULL; - len = ct_mbstowcs(NULL, s, 0); + len = ct_mbstowcs(NULL, s, (size_t)0); if (len == (size_t)-1) return NULL; if (len conv-wsize) - ct_conv_buff_resize(conv, 0, len + 1); + ct_conv_buff_resize(conv, (size_t)0, len + 1); if (!conv-wbuff) return NULL; ct_mbstowcs(conv-wbuff, s, conv-wsize); @@ -144,7 +145,7 @@ * the argv strings. */ for (i = 0, bufspace = 0; i argc; ++i) bufspace += argv[i] ? strlen(argv[i]) + 1 : 0; - ct_conv_buff_resize(conv, 0, bufspace); +
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: jakllsch Date: Sat Jul 30 03:43:21 UTC 2011 Modified Files: src/sys/lib/libsa: alloc.c tftp.c Log Message: Fix printf formating in ifdef DEBUG sections. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/lib/libsa/alloc.c cvs rdiff -u -r1.32 -r1.33 src/sys/lib/libsa/tftp.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/lib/libsa/alloc.c diff -u src/sys/lib/libsa/alloc.c:1.25 src/sys/lib/libsa/alloc.c:1.26 --- src/sys/lib/libsa/alloc.c:1.25 Thu Jun 16 13:27:58 2011 +++ src/sys/lib/libsa/alloc.c Sat Jul 30 03:43:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: alloc.c,v 1.25 2011/06/16 13:27:58 joerg Exp $ */ +/* $NetBSD: alloc.c,v 1.26 2011/07/30 03:43:20 jakllsch Exp $ */ /* * Copyright (c) 1993 @@ -251,7 +251,7 @@ #endif #ifdef DEBUG if (size (size_t)f-size) { - printf(dealloc %u bytes @%lx, should be =%u\n, + printf(dealloc %zu bytes @%lx, should be =%u\n, size, (u_long)ptr, f-size); } Index: src/sys/lib/libsa/tftp.c diff -u src/sys/lib/libsa/tftp.c:1.32 src/sys/lib/libsa/tftp.c:1.33 --- src/sys/lib/libsa/tftp.c:1.32 Thu Jun 16 13:27:58 2011 +++ src/sys/lib/libsa/tftp.c Sat Jul 30 03:43:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: tftp.c,v 1.32 2011/06/16 13:27:58 joerg Exp $ */ +/* $NetBSD: tftp.c,v 1.33 2011/07/30 03:43:20 jakllsch Exp $ */ /* * Copyright (c) 1996 @@ -410,7 +410,7 @@ filesize += tftpfile-validsize; } #ifdef DEBUG - printf(tftp_size_of_file: file is %d bytes\n, filesize); + printf(tftp_size_of_file: file is %zu bytes\n, filesize); #endif return filesize; }
CVS commit: src/sys/fs/v7fs
Module Name:src Committed By: uch Date: Sat Jul 30 03:51:53 UTC 2011 Modified Files: src/sys/fs/v7fs: v7fs_file.c Log Message: Fix return vaule. Pass t_vnops:rename_dotdot, dir_noempty, rename_dir(6) To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/fs/v7fs/v7fs_file.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/fs/v7fs/v7fs_file.c diff -u src/sys/fs/v7fs/v7fs_file.c:1.2 src/sys/fs/v7fs/v7fs_file.c:1.3 --- src/sys/fs/v7fs/v7fs_file.c:1.2 Mon Jul 18 21:51:49 2011 +++ src/sys/fs/v7fs/v7fs_file.c Sat Jul 30 03:51:53 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: v7fs_file.c,v 1.2 2011/07/18 21:51:49 apb Exp $ */ +/* $NetBSD: v7fs_file.c,v 1.3 2011/07/30 03:51:53 uch Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #endif #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: v7fs_file.c,v 1.2 2011/07/18 21:51:49 apb Exp $); +__KERNEL_RCSID(0, $NetBSD: v7fs_file.c,v 1.3 2011/07/30 03:51:53 uch Exp $); #if defined _KERNEL_OPT #include opt_v7fs.h #endif @@ -247,16 +247,24 @@ return error; if (v7fs_inode_isdir(inode)) { - /* Check child directory exists. */ + char filename[V7FS_NAME_MAX + 1]; + v7fs_dirent_filename(filename, name); + /* Check parent */ + if (strncmp(filename, .., V7FS_NAME_MAX) == 0) { + DPRINTF(can not remove '..'\n); + return EINVAL; /* t_vnops rename_dotdot */ + } + /* Check empty */ if (v7fs_inode_filesize(inode) != sizeof(struct v7fs_dirent) * 2 /*. + ..*/) { - DPRINTF(file exists.\n); - return EEXIST; + DPRINTF(directory not empty.\n); + return ENOTEMPTY;/* t_vnops dir_noempty, rename_dir(6)*/ } inode.nlink = 0; /* remove this. */ } else { /* Decrement reference count. */ --inode.nlink; /* regular file. */ + DPRINTF(%s nlink=%d\n, name, inode.nlink); }
CVS commit: src/sys/fs/v7fs
Module Name:src Committed By: uch Date: Sat Jul 30 03:52:05 UTC 2011 Modified Files: src/sys/fs/v7fs: v7fs_file_util.c Log Message: When rename directory, check hierarchy. Pass t_vnops rename_dir(5) To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/fs/v7fs/v7fs_file_util.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/v7fs/v7fs_file_util.c diff -u src/sys/fs/v7fs/v7fs_file_util.c:1.3 src/sys/fs/v7fs/v7fs_file_util.c:1.4 --- src/sys/fs/v7fs/v7fs_file_util.c:1.3 Mon Jul 18 21:51:49 2011 +++ src/sys/fs/v7fs/v7fs_file_util.c Sat Jul 30 03:52:04 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: v7fs_file_util.c,v 1.3 2011/07/18 21:51:49 apb Exp $ */ +/* $NetBSD: v7fs_file_util.c,v 1.4 2011/07/30 03:52:04 uch Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #endif #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: v7fs_file_util.c,v 1.3 2011/07/18 21:51:49 apb Exp $); +__KERNEL_RCSID(0, $NetBSD: v7fs_file_util.c,v 1.4 2011/07/30 03:52:04 uch Exp $); #ifdef _KERNEL #include sys/systm.h #include sys/param.h @@ -61,6 +61,9 @@ static int replace_subr(struct v7fs_self *, void *, v7fs_daddr_t, size_t); static int lookup_by_number_subr(struct v7fs_self *, void *, v7fs_daddr_t, size_t); +static int can_dirmove(struct v7fs_self *, v7fs_ino_t, v7fs_ino_t); +static int lookup_parent_from_dir_subr(struct v7fs_self *, void *, +v7fs_daddr_t, size_t); int v7fs_file_link(struct v7fs_self *fs, struct v7fs_inode *parent_dir, @@ -118,26 +121,38 @@ const char *from, struct v7fs_inode *parent_to, const char *to) { v7fs_ino_t from_ino, to_ino; + struct v7fs_inode inode; int error; + bool dir_move; + /* Check source file */ if ((error = v7fs_file_lookup_by_name(fs, parent_from, from, from_ino))) { DPRINTF(%s don't exists\n, from); return error; } + v7fs_inode_load(fs, inode, from_ino); + dir_move = v7fs_inode_isdir(inode); - /* If target file exists, remove. */ + /* Check target file */ error = v7fs_file_lookup_by_name(fs, parent_to, to, to_ino); - if (error == 0) { + if (error == 0) { /* found */ DPRINTF(%s already exists\n, to); if ((error = v7fs_file_deallocate(fs, parent_to, to))) { - DPRINTF(%s can't remove\n, to); + DPRINTF(%s can't remove %d\n, to, error); return error; } } else if (error != ENOENT) { DPRINTF(error=%d\n, error); return error; } + /* Check directory hierarchy. t_vnops rename_dir(5) */ + if (dir_move (error = can_dirmove(fs, from_ino, + parent_to-inode_number))) { + DPRINTF(dst '%s' is child dir of '%s'. error=%d\n, to, from, + error); + return error; + } if ((error = v7fs_directory_add_entry(fs, parent_to, from_ino, to))) { DPRINTF(can't add entry); @@ -149,18 +164,14 @@ return error; } - if (parent_from != parent_to) { + if (dir_move (parent_from != parent_to)) { /* If directory move, update .. */ - struct v7fs_inode inode; - v7fs_inode_load(fs, inode, from_ino); - if (v7fs_inode_isdir(inode)) { - if ((error = v7fs_directory_replace_entry(fs, inode, - .., parent_to-inode_number))) { -DPRINTF(can't replace parent dir); -return error; - } - v7fs_inode_writeback(fs, inode); + if ((error = v7fs_directory_replace_entry(fs, inode, .., + parent_to-inode_number))) { + DPRINTF(can't replace parent dir); + return error; } + v7fs_inode_writeback(fs, inode); } return 0; @@ -258,3 +269,76 @@ return ret; } + +struct lookup_parent_arg { + v7fs_ino_t parent_ino; +}; + +static int +can_dirmove(struct v7fs_self *fs, v7fs_ino_t from_ino, v7fs_ino_t to_ino) +{ + struct v7fs_inode inode; + v7fs_ino_t parent; + int error; + + /* Start dir. */ + if ((error = v7fs_inode_load(fs, inode, to_ino))) + return error; + + if (!v7fs_inode_isdir(inode)) + return ENOTDIR; + + /* Lookup the parent. */ + do { + struct lookup_parent_arg arg; + /* Search parent dir */ + arg.parent_ino = 0; + v7fs_datablock_foreach(fs, inode, lookup_parent_from_dir_subr, + arg); + if ((parent = arg.parent_ino) == 0) { + DPRINTF(***parent missing\n); + return ENOENT; + } + /* Load parent dir */ + if ((error = v7fs_inode_load(fs, inode, parent))) + return error; + if (parent == from_ino) { + DPRINTF(#%d is child dir of #%d\n, to_ino, from_ino); + return EINVAL; + } + } while (parent != V7FS_ROOT_INODE); + + return 0; +} + +static int +lookup_parent_from_dir_subr(struct v7fs_self *fs, void *ctx, v7fs_daddr_t blk, +size_t sz) +{ + struct lookup_parent_arg *arg = (struct lookup_parent_arg *)ctx; + char name[V7FS_NAME_MAX + 1]; + void *buf; + int ret = 0; + + if (!(buf = scratch_read(fs, blk))) + return 0; + struct v7fs_dirent *dir = (struct v7fs_dirent *)buf; + size_t i, n = sz / sizeof(*dir); + if (!v7fs_dirent_endian_convert(fs, dir, n)) { + scratch_free(fs, buf); + return V7FS_ITERATOR_ERROR; + } + + for (i = 0; i
CVS commit: src/sys/fs/v7fs
Module Name:src Committed By: uch Date: Sat Jul 30 03:53:18 UTC 2011 Modified Files: src/sys/fs/v7fs: v7fs_vfsops.c v7fs_vnops.c Log Message: v7fs_lookup() fix return value. Pass t_vnops rename_dir(3) v7fs_setttr() check credential. Pass t_unpriv owner v7fs_rename() reload inode(v7fs_vnode_reload). Pass t_vnops rename_reg_nodir To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/fs/v7fs/v7fs_vfsops.c cvs rdiff -u -r1.5 -r1.6 src/sys/fs/v7fs/v7fs_vnops.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/fs/v7fs/v7fs_vfsops.c diff -u src/sys/fs/v7fs/v7fs_vfsops.c:1.3 src/sys/fs/v7fs/v7fs_vfsops.c:1.4 --- src/sys/fs/v7fs/v7fs_vfsops.c:1.3 Sat Jul 23 05:10:30 2011 +++ src/sys/fs/v7fs/v7fs_vfsops.c Sat Jul 30 03:53:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: v7fs_vfsops.c,v 1.3 2011/07/23 05:10:30 uch Exp $ */ +/* $NetBSD: v7fs_vfsops.c,v 1.4 2011/07/30 03:53:18 uch Exp $ */ /*- * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: v7fs_vfsops.c,v 1.3 2011/07/23 05:10:30 uch Exp $); +__KERNEL_RCSID(0, $NetBSD: v7fs_vfsops.c,v 1.4 2011/07/30 03:53:18 uch Exp $); #if defined _KERNEL_OPT #include opt_v7fs.h #endif @@ -75,6 +75,7 @@ static void v7fs_closefs(struct vnode *, struct mount *); static int is_v7fs_partition(struct vnode *); static enum vtype v7fs_mode_to_vtype(v7fs_mode_t mode); +int v7fs_vnode_reload(struct mount *, struct vnode *); int v7fs_mount(struct mount *mp, const char *path, void *data, size_t *data_len) @@ -594,3 +595,34 @@ return 0; } + +/* Reload disk inode information */ +int +v7fs_vnode_reload(struct mount *mp, struct vnode *vp) +{ + struct v7fs_mount *v7fsmount = mp-mnt_data; + struct v7fs_self *fs = v7fsmount-core; + struct v7fs_node *v7fs_node; + struct v7fs_inode *inode = ((struct v7fs_node *)vp-v_data)-inode; + int target_ino = inode-inode_number; + int error = 0; + + DPRINTF(#%d\n, target_ino); + mutex_enter(mntvnode_lock); + for (v7fs_node = LIST_FIRST(v7fsmount-v7fs_node_head); + v7fs_node != NULL; v7fs_node = LIST_NEXT(v7fs_node, link)) { + inode = v7fs_node-inode; + if (!v7fs_inode_allocated(inode)) { + continue; + } + if (inode-inode_number == target_ino) { + error = v7fs_inode_load(fs, v7fs_node-inode, + target_ino); + DPRINTF(sync #%d error=%d\n, target_ino, error); + break; + } + } + mutex_exit(mntvnode_lock); + + return error; +} Index: src/sys/fs/v7fs/v7fs_vnops.c diff -u src/sys/fs/v7fs/v7fs_vnops.c:1.5 src/sys/fs/v7fs/v7fs_vnops.c:1.6 --- src/sys/fs/v7fs/v7fs_vnops.c:1.5 Sun Jul 24 12:31:33 2011 +++ src/sys/fs/v7fs/v7fs_vnops.c Sat Jul 30 03:53:18 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: v7fs_vnops.c,v 1.5 2011/07/24 12:31:33 uch Exp $ */ +/* $NetBSD: v7fs_vnops.c,v 1.6 2011/07/30 03:53:18 uch Exp $ */ /*- * Copyright (c) 2004, 2011 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: v7fs_vnops.c,v 1.5 2011/07/24 12:31:33 uch Exp $); +__KERNEL_RCSID(0, $NetBSD: v7fs_vnops.c,v 1.6 2011/07/30 03:53:18 uch Exp $); #if defined _KERNEL_OPT #include opt_v7fs.h #endif @@ -67,6 +67,8 @@ MALLOC_JUSTDEFINE(M_V7FS_VNODE, v7fs vnode, v7fs vnode structures); MALLOC_DECLARE(M_V7FS); +int v7fs_vnode_reload(struct mount *, struct vnode *); + static v7fs_mode_t vtype_to_v7fs_mode(enum vtype); static uint8_t v7fs_mode_to_d_type(v7fs_mode_t); @@ -110,9 +112,11 @@ bool islastcn = flags ISLASTCN; v7fs_ino_t ino; int error; - - DPRINTF(%s op=%d flags=%d parent=%d %o %dbyte\n, name, - nameiop, cnp-cn_flags, parent-inode_number, parent-mode, +#ifdef V7FS_VNOPS_DEBUG + const char *opname[] = { LOOKUP, CREATE, DELETE, RENAME }; +#endif + DPRINTF('%s' op=%s flags=%d parent=%d %o %dbyte\n, name, + opname[nameiop], cnp-cn_flags, parent-inode_number, parent-mode, parent-filesize); *a-a_vpp = 0; @@ -132,6 +136,9 @@ /* . */ if (namelen == 1 name[0] == '.') { + if ((nameiop == RENAME) islastcn) { + return EISDIR; /* t_vnops rename_dir(3) */ + } vref(dvp); /* v_usecount++ */ *a-a_vpp = dvp; DPRINTF(done.(.)\n); @@ -170,7 +177,7 @@ vn_lock(dvp, LK_EXCLUSIVE | LK_RETRY); } *a-a_vpp = vpp; - DPRINTF(done.\n); + DPRINTF(done.(%s)\n, name); return 0; } @@ -439,6 +446,7 @@ struct v7fs_node *v7node = vp-v_data; struct v7fs_self *fs = v7node-v7fsmount-core; struct v7fs_inode *inode = v7node-inode; + kauth_cred_t cred = ap-a_cred; struct timespec *acc, *mod; int error = 0; acc = mod = NULL; @@ -477,15 +485,38 @@ if (error == 0) uvm_vnp_setsize(vp, vap-va_size); } + uid_t uid = inode-uid; + gid_t gid = inode-gid; if (vap-va_uid != (uid_t)VNOVAL) { - inode-uid = vap-va_uid; + uid = vap-va_uid; + error = kauth_authorize_vnode(cred, + KAUTH_VNODE_CHANGE_OWNERSHIP, vp, NULL, + genfs_can_chown(vp, cred, inode-uid,
CVS commit: src/sys/arch/sparc/stand/ofwboot
Module Name:src Committed By: jakllsch Date: Sat Jul 30 04:18:38 UTC 2011 Modified Files: src/sys/arch/sparc/stand/ofwboot: netif_of.c Log Message: printf fixes for ifdef NETIF_DEBUG To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sparc/stand/ofwboot/netif_of.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/sparc/stand/ofwboot/netif_of.c diff -u src/sys/arch/sparc/stand/ofwboot/netif_of.c:1.8 src/sys/arch/sparc/stand/ofwboot/netif_of.c:1.9 --- src/sys/arch/sparc/stand/ofwboot/netif_of.c:1.8 Sat May 21 15:50:42 2011 +++ src/sys/arch/sparc/stand/ofwboot/netif_of.c Sat Jul 30 04:18:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: netif_of.c,v 1.8 2011/05/21 15:50:42 tsutsui Exp $ */ +/* $NetBSD: netif_of.c,v 1.9 2011/07/30 04:18:38 jakllsch Exp $ */ /* * Copyright (C) 1995 Wolfgang Solfrank. @@ -147,7 +147,7 @@ { struct ether_header *eh; - printf(netif_put: desc=0x%x pkt=0x%x len=%d\n, + printf(netif_put: desc=%p pkt=%p len=%zu\n, desc, pkt, len); eh = pkt; printf(dst: %s , ether_sprintf(eh-ether_dhost)); @@ -160,14 +160,14 @@ if (sendlen 60) { sendlen = 60; #ifdef NETIF_DEBUG - printf(netif_put: length padded to %d\n, sendlen); + printf(netif_put: length padded to %zu\n, sendlen); #endif } rv = prom_write(op-handle, pkt, sendlen); #ifdef NETIF_DEBUG - printf(netif_put: xmit returned %d\n, rv); + printf(netif_put: xmit returned %zd\n, rv); #endif if (rv len) @@ -190,7 +190,7 @@ op = ((struct netif *)desc-io_netif)-nif_devdata; #ifdef NETIF_DEBUG - printf(netif_get: pkt=0x%x, maxlen=%d, tmo=%d\n, + printf(netif_get: pkt=%p, maxlen=%zu, tmo=%d\n, pkt, maxlen, timo); #endif
CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: jakllsch Date: Sat Jul 30 04:34:17 UTC 2011 Modified Files: src/sys/arch/arm/marvell: mvsoc.c Log Message: Add interrupt info for 88F5182 gtidmac(4) and uncomment. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/marvell/mvsoc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/arm/marvell/mvsoc.c diff -u src/sys/arch/arm/marvell/mvsoc.c:1.2 src/sys/arch/arm/marvell/mvsoc.c:1.3 --- src/sys/arch/arm/marvell/mvsoc.c:1.2 Sat Mar 5 14:50:56 2011 +++ src/sys/arch/arm/marvell/mvsoc.c Sat Jul 30 04:34:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mvsoc.c,v 1.2 2011/03/05 14:50:56 matt Exp $ */ +/* $NetBSD: mvsoc.c,v 1.3 2011/07/30 04:34:17 jakllsch Exp $ */ /* * Copyright (c) 2007, 2008 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mvsoc.c,v 1.2 2011/03/05 14:50:56 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: mvsoc.c,v 1.3 2011/07/30 04:34:17 jakllsch Exp $); #include opt_cputypes.h #include opt_mvsoc.h @@ -244,7 +244,7 @@ { ORION_1(88F5182), com, 1, MVSOC_COM1_BASE, ORION_IRQ_UART1 }, { ORION_1(88F5182), ehci,0, ORION_USB0_BASE, ORION_IRQ_USBCNT0 }, { ORION_1(88F5182), ehci,1, ORION_USB1_BASE, ORION_IRQ_USBCNT1 }, -// { ORION_1(88F5182), gtidmac, 0, ORION_IDMAC_BASE, 0 }, +{ ORION_1(88F5182), gtidmac, 0, ORION_IDMAC_BASE, ORION_IRQ_IDMA0 }, { ORION_1(88F5182), gtpci, 0, ORION_PCI_BASE, ORION_IRQ_PEX0INT }, { ORION_1(88F5182), gttwsi, 0, MVSOC_TWSI_BASE, ORION_IRQ_TWSI }, { ORION_1(88F5182), mvgbec, 0, ORION_GBE_BASE, IRQ_DEFAULT },
CVS commit: src/sys/dev/ata
Module Name:src Committed By: jakllsch Date: Sat Jul 30 04:42:04 UTC 2011 Modified Files: src/sys/dev/ata: wd.c Log Message: Add some additional consistency checking paranoia with KASSERT. To generate a diff of this commit: cvs rdiff -u -r1.386 -r1.387 src/sys/dev/ata/wd.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/ata/wd.c diff -u src/sys/dev/ata/wd.c:1.386 src/sys/dev/ata/wd.c:1.387 --- src/sys/dev/ata/wd.c:1.386 Thu Feb 10 05:07:46 2011 +++ src/sys/dev/ata/wd.c Sat Jul 30 04:42:03 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.386 2011/02/10 05:07:46 enami Exp $ */ +/* $NetBSD: wd.c,v 1.387 2011/07/30 04:42:03 jakllsch Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -54,7 +54,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: wd.c,v 1.386 2011/02/10 05:07:46 enami Exp $); +__KERNEL_RCSID(0, $NetBSD: wd.c,v 1.387 2011/07/30 04:42:03 jakllsch Exp $); #include opt_ata.h @@ -703,6 +703,7 @@ wd-sc_wdc_bio.bcount = bp-b_bcount; wd-sc_wdc_bio.databuf = bp-b_data; wd-sc_wdc_bio.blkdone =0; + KASSERT(bp == wd-sc_bp || wd-sc_bp == NULL); wd-sc_bp = bp; /* * If we're retrying, retry in single-sector mode. This will give us @@ -829,6 +830,8 @@ biodone(bp); wd-openings++; } + KASSERT(wd-sc_bp != NULL); + wd-sc_bp = NULL; wdstart(wd); }
CVS commit: src/sys/arch/macppc/conf
Module Name:src Committed By: jakllsch Date: Sat Jul 30 04:53:30 UTC 2011 Modified Files: src/sys/arch/macppc/conf: GENERIC Log Message: Add uplcom(4) and uftdi(4). To generate a diff of this commit: cvs rdiff -u -r1.292 -r1.293 src/sys/arch/macppc/conf/GENERIC 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/macppc/conf/GENERIC diff -u src/sys/arch/macppc/conf/GENERIC:1.292 src/sys/arch/macppc/conf/GENERIC:1.293 --- src/sys/arch/macppc/conf/GENERIC:1.292 Thu Jun 30 20:09:32 2011 +++ src/sys/arch/macppc/conf/GENERIC Sat Jul 30 04:53:30 2011 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.292 2011/06/30 20:09:32 wiz Exp $ +# $NetBSD: GENERIC,v 1.293 2011/07/30 04:53:30 jakllsch Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident GENERIC-$Revision: 1.292 $ +#ident GENERIC-$Revision: 1.293 $ maxusers 32 @@ -487,6 +487,12 @@ ubsa* at uhub? port ? # Belkin serial adapter ucom* at ubsa? portno ? +uplcom* at uhub? port ? # Prolific serial +ucom* at uplcom? portno ? + +uftdi* at uhub? port ? # FTDI serial +ucom* at uftdi? portno ? + uhso* at uhub? port ? configuration ? # Option N.V. Wireless WAN modems umass* at uhub? port ? configuration ? interface ? # USB Mass Storage
CVS commit: src/sys/kern
Module Name:src Committed By: uebayasi Date: Sat Jul 30 05:24:17 UTC 2011 Modified Files: src/sys/kern: kern_softint.c Log Message: Use kmem(9) to allocate per-cpu softint context. No functional changes. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/kern/kern_softint.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/kern_softint.c diff -u src/sys/kern/kern_softint.c:1.35 src/sys/kern/kern_softint.c:1.36 --- src/sys/kern/kern_softint.c:1.35 Sun Apr 24 18:46:22 2011 +++ src/sys/kern/kern_softint.c Sat Jul 30 05:24:16 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_softint.c,v 1.35 2011/04/24 18:46:22 rmind Exp $ */ +/* $NetBSD: kern_softint.c,v 1.36 2011/07/30 05:24:16 uebayasi Exp $ */ /*- * Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. @@ -176,7 +176,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: kern_softint.c,v 1.35 2011/04/24 18:46:22 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: kern_softint.c,v 1.36 2011/07/30 05:24:16 uebayasi Exp $); #include sys/param.h #include sys/proc.h @@ -186,6 +186,7 @@ #include sys/evcnt.h #include sys/cpu.h #include sys/xcall.h +#include sys/kmem.h #include net/netisr.h @@ -283,8 +284,7 @@ sizeof(softhand_t); } - sc = (softcpu_t *)uvm_km_alloc(kernel_map, softint_bytes, 0, - UVM_KMF_WIRED | UVM_KMF_ZERO); + sc = kmem_zalloc(softint_bytes, KM_SLEEP); if (sc == NULL) panic(softint_init_cpu: cannot allocate memory);