CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Jan 14 18:46:38 UTC 2015 Modified Files: src/sys/rump/librump/rumpkern: intr.c Log Message: Implement softint_schedule_cpu() for rump kernels. While distributing processing all over the place is not relevant for high-performance rump kernel I/O stacks (and downright counterproductive), the mechanism is used e.g. to reach a quiescent state when detaching an interface, and therefore a semantically correct implementation is required. Fixes at least an uncommon race in the ifconfig destroy case. reported patch tested by Justin Cormack. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/rump/librump/rumpkern/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Jan 14 18:46:38 UTC 2015 Modified Files: src/sys/rump/librump/rumpkern: intr.c Log Message: Implement softint_schedule_cpu() for rump kernels. While distributing processing all over the place is not relevant for high-performance rump kernel I/O stacks (and downright counterproductive), the mechanism is used e.g. to reach a quiescent state when detaching an interface, and therefore a semantically correct implementation is required. Fixes at least an uncommon race in the ifconfig destroy case. reported patch tested by Justin Cormack. To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/rump/librump/rumpkern/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/intr.c diff -u src/sys/rump/librump/rumpkern/intr.c:1.46 src/sys/rump/librump/rumpkern/intr.c:1.47 --- src/sys/rump/librump/rumpkern/intr.c:1.46 Sun Jun 22 20:09:19 2014 +++ src/sys/rump/librump/rumpkern/intr.c Wed Jan 14 18:46:38 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.46 2014/06/22 20:09:19 pooka Exp $ */ +/* $NetBSD: intr.c,v 1.47 2015/01/14 18:46:38 pooka Exp $ */ /* * Copyright (c) 2008-2010 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.46 2014/06/22 20:09:19 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.47 2015/01/14 18:46:38 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -62,8 +62,10 @@ struct softint { struct softint_percpu { struct softint *sip_parent; bool sip_onlist; + bool sip_onlist_cpu; - LIST_ENTRY(softint_percpu) sip_entries; + LIST_ENTRY(softint_percpu) sip_entries; /* scheduled */ + TAILQ_ENTRY(softint_percpu) sip_entries_cpu; /* to be scheduled */ }; struct softint_lev { @@ -71,6 +73,11 @@ struct softint_lev { LIST_HEAD(, softint_percpu) si_pending; }; +static TAILQ_HEAD(, softint_percpu) sicpupending \ += TAILQ_HEAD_INITIALIZER(sicpupending); +static struct rumpuser_mtx *sicpumtx; +static struct rumpuser_cv *sicpucv; + kcondvar_t lbolt; /* Oh Kath Ra */ static u_int ticks; @@ -183,6 +190,51 @@ sithread(void *arg) panic(sithread unreachable); } +/* + * Helper for softint_schedule_cpu() + */ +static void +sithread_cpu_bouncer(void *arg) +{ + struct lwp *me; + + me = curlwp; + me-l_pflag |= LP_BOUND; + + rump_unschedule(); + for (;;) { + struct softint_percpu *sip; + struct softint *si; + struct cpu_info *ci; + unsigned int cidx; + + rumpuser_mutex_enter_nowrap(sicpumtx); + while (TAILQ_EMPTY(sicpupending)) { + rumpuser_cv_wait_nowrap(sicpucv, sicpumtx); + } + sip = TAILQ_FIRST(sicpupending); + TAILQ_REMOVE(sicpupending, sip, sip_entries_cpu); + sip-sip_onlist_cpu = false; + rumpuser_mutex_exit(sicpumtx); + + /* + * ok, now figure out which cpu we need the softint to + * be handled on + */ + si = sip-sip_parent; + cidx = sip - si-si_entry; + ci = cpu_lookup(cidx); + me-l_target_cpu = ci; + + /* schedule ourselves there, and then schedule the softint */ + rump_schedule(); + KASSERT(curcpu() == ci); + softint_schedule(si); + rump_unschedule(); + } + panic(sithread_cpu_bouncer unreasonable); +} + static kmutex_t sithr_emtx; static unsigned int sithr_est; static int sithr_canest; @@ -273,6 +325,13 @@ softint_init(struct cpu_info *ci) if ((rv = kthread_create(PRI_NONE, KTHREAD_MPSAFE, ci, doclock, NULL, NULL, rumpclk%d, ci-ci_index)) != 0) panic(clock thread creation failed: %d, rv); + + /* not one either, but at least a softint helper */ + rumpuser_mutex_init(sicpumtx, RUMPUSER_MTX_SPIN); + rumpuser_cv_init(sicpucv); + if ((rv = kthread_create(PRI_NONE, KTHREAD_MPSAFE, + NULL, sithread_cpu_bouncer, NULL, NULL, sipbnc)) != 0) + panic(softint cpu bouncer creation failed: %d, rv); } void * @@ -300,6 +359,13 @@ softint_establish(u_int flags, void (*fu return si; } +static struct softint_percpu * +sitosip(struct softint *si, struct cpu_info *ci) +{ + + return si-si_entry[ci-ci_index]; +} + /* * Soft interrupts bring two choices. If we are running with thread * support enabled, defer execution, otherwise execute in place. @@ -310,7 +376,7 @@ softint_schedule(void *arg) { struct softint *si = arg; struct cpu_info *ci = curcpu(); - struct softint_percpu *sip = si-si_entry[ci-ci_index]; + struct softint_percpu *sip = sitosip(si, ci); struct cpu_data *cd = ci-ci_data; struct softint_lev *si_lvl = cd-cpu_softcpu; @@ -325,14 +391,44 @@ softint_schedule(void *arg) } } +/* + * Like softint_schedule(), except schedule softint to be handled on + * the core designated by ci_tgt instead of the core the call is made on. + * + * Unlike softint_schedule(), the performance is not important + * (unless ci_tgt == curcpu): high-performance rump kernel I/O stacks + * should arrange data to already be on the right core at the driver + *
CVS commit: src/external/gpl3/gcc/usr.bin/lto1
Module Name:src Committed By: tron Date: Wed Jan 14 20:26:41 UTC 2015 Modified Files: src/external/gpl3/gcc/usr.bin/lto1: Makefile Log Message: Fix build with USE_SSP set to yes. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/lto1/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/usr.bin/lto1/Makefile diff -u src/external/gpl3/gcc/usr.bin/lto1/Makefile:1.1 src/external/gpl3/gcc/usr.bin/lto1/Makefile:1.2 --- src/external/gpl3/gcc/usr.bin/lto1/Makefile:1.1 Wed Jan 7 02:02:44 2015 +++ src/external/gpl3/gcc/usr.bin/lto1/Makefile Wed Jan 14 20:26:41 2015 @@ -1,10 +1,13 @@ -# $NetBSD: Makefile,v 1.1 2015/01/07 02:02:44 christos Exp $ +# $NetBSD: Makefile,v 1.2 2015/01/14 20:26:41 tron Exp $ PROG= lto1 SRCS= lto-partition.c lto-object.c lto.c lto-lang.c attribs.c main.c CPPFLAGS+= -DPREFIX=\/usr\ +COPTS.lto.c+= -Wno-stack-protector +COPTS.lto-lang.c+= -Wno-stack-protector + .include ../Makefile.backend .include ../Makefile.backtrace .include ../Makefile.common
CVS commit: src/external/gpl3/gcc/usr.bin/lto1
Module Name:src Committed By: tron Date: Wed Jan 14 20:26:41 UTC 2015 Modified Files: src/external/gpl3/gcc/usr.bin/lto1: Makefile Log Message: Fix build with USE_SSP set to yes. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/external/gpl3/gcc/usr.bin/lto1/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Jan 14 18:51:56 UTC 2015 Modified Files: src/sys/rump/librump/rumpkern: intr.c Log Message: Execute softints in the order in which they are scheduled (per level). To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/rump/librump/rumpkern/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/rump/librump/rumpkern
Module Name:src Committed By: pooka Date: Wed Jan 14 18:51:56 UTC 2015 Modified Files: src/sys/rump/librump/rumpkern: intr.c Log Message: Execute softints in the order in which they are scheduled (per level). To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/rump/librump/rumpkern/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/rump/librump/rumpkern/intr.c diff -u src/sys/rump/librump/rumpkern/intr.c:1.47 src/sys/rump/librump/rumpkern/intr.c:1.48 --- src/sys/rump/librump/rumpkern/intr.c:1.47 Wed Jan 14 18:46:38 2015 +++ src/sys/rump/librump/rumpkern/intr.c Wed Jan 14 18:51:56 2015 @@ -1,7 +1,7 @@ -/* $NetBSD: intr.c,v 1.47 2015/01/14 18:46:38 pooka Exp $ */ +/* $NetBSD: intr.c,v 1.48 2015/01/14 18:51:56 pooka Exp $ */ /* - * Copyright (c) 2008-2010 Antti Kantee. All Rights Reserved. + * Copyright (c) 2008-2010, 2015 Antti Kantee. All Rights Reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -26,7 +26,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.47 2015/01/14 18:46:38 pooka Exp $); +__KERNEL_RCSID(0, $NetBSD: intr.c,v 1.48 2015/01/14 18:51:56 pooka Exp $); #include sys/param.h #include sys/atomic.h @@ -64,13 +64,13 @@ struct softint_percpu { bool sip_onlist; bool sip_onlist_cpu; - LIST_ENTRY(softint_percpu) sip_entries; /* scheduled */ + TAILQ_ENTRY(softint_percpu) sip_entries; /* scheduled */ TAILQ_ENTRY(softint_percpu) sip_entries_cpu; /* to be scheduled */ }; struct softint_lev { struct rumpuser_cv *si_cv; - LIST_HEAD(, softint_percpu) si_pending; + TAILQ_HEAD(, softint_percpu) si_pending; }; static TAILQ_HEAD(, softint_percpu) sicpupending \ @@ -161,8 +161,8 @@ sithread(void *arg) si_lvl = si_lvlp[mylevel]; for (;;) { - if (!LIST_EMPTY(si_lvl-si_pending)) { - sip = LIST_FIRST(si_lvl-si_pending); + if (!TAILQ_EMPTY(si_lvl-si_pending)) { + sip = TAILQ_FIRST(si_lvl-si_pending); si = sip-sip_parent; func = si-si_func; @@ -170,7 +170,7 @@ sithread(void *arg) mpsafe = si-si_flags SI_MPSAFE; sip-sip_onlist = false; - LIST_REMOVE(sip, sip_entries); + TAILQ_REMOVE(si_lvl-si_pending, sip, sip_entries); if (si-si_flags SI_KILLME) { softint_disestablish(si); continue; @@ -297,7 +297,7 @@ softint_init(struct cpu_info *ci) slev = kmem_alloc(sizeof(struct softint_lev) * SOFTINT_COUNT, KM_SLEEP); for (i = 0; i SOFTINT_COUNT; i++) { rumpuser_cv_init(slev[i].si_cv); - LIST_INIT(slev[i].si_pending); + TAILQ_INIT(slev[i].si_pending); } cd-cpu_softcpu = slev; @@ -384,7 +384,7 @@ softint_schedule(void *arg) si-si_func(si-si_arg); } else { if (!sip-sip_onlist) { - LIST_INSERT_HEAD(si_lvl[si-si_level].si_pending, + TAILQ_INSERT_TAIL(si_lvl[si-si_level].si_pending, sip, sip_entries); sip-sip_onlist = true; } @@ -464,7 +464,7 @@ rump_softint_run(struct cpu_info *ci) return; for (i = 0; i SOFTINT_COUNT; i++) { - if (!LIST_EMPTY(si_lvl[i].si_pending)) + if (!TAILQ_EMPTY(si_lvl[i].si_pending)) rumpuser_cv_signal(si_lvl[i].si_cv); } }
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Wed Jan 14 22:25:05 UTC 2015 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi Log Message: add vnode kqueue test from PR/48958 To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.609 -r1.610 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Wed Jan 14 22:21:00 UTC 2015 Modified Files: src/sys/sys: event.h Log Message: make unsigned constants that. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/sys/event.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: christos Date: Wed Jan 14 22:21:00 UTC 2015 Modified Files: src/sys/sys: event.h Log Message: make unsigned constants that. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/sys/event.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/event.h diff -u src/sys/sys/event.h:1.23 src/sys/sys/event.h:1.24 --- src/sys/sys/event.h:1.23 Sun Jun 26 12:43:12 2011 +++ src/sys/sys/event.h Wed Jan 14 17:21:00 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: event.h,v 1.23 2011/06/26 16:43:12 christos Exp $ */ +/* $NetBSD: event.h,v 1.24 2015/01/14 22:21:00 christos Exp $ */ /*- * Copyright (c) 1999,2000,2001 Jonathan Lemon jle...@freebsd.org @@ -36,14 +36,14 @@ #include sys/inttypes.h /* for uintptr_t */ #include sys/null.h /* for NULL */ -#define EVFILT_READ 0 -#define EVFILT_WRITE 1 -#define EVFILT_AIO 2 /* attached to aio requests */ -#define EVFILT_VNODE 3 /* attached to vnodes */ -#define EVFILT_PROC 4 /* attached to struct proc */ -#define EVFILT_SIGNAL 5 /* attached to struct proc */ -#define EVFILT_TIMER 6 /* arbitrary timer (in ms) */ -#define EVFILT_SYSCOUNT 7 /* number of filters */ +#define EVFILT_READ 0U +#define EVFILT_WRITE 1U +#define EVFILT_AIO 2U /* attached to aio requests */ +#define EVFILT_VNODE 3U /* attached to vnodes */ +#define EVFILT_PROC 4U /* attached to struct proc */ +#define EVFILT_SIGNAL 5U /* attached to struct proc */ +#define EVFILT_TIMER 6U /* arbitrary timer (in ms) */ +#define EVFILT_SYSCOUNT 7U /* number of filters */ #define EV_SET(kevp, a, b, c, d, e, f) \ do { \ @@ -66,57 +66,57 @@ struct kevent { }; /* actions */ -#define EV_ADD 0x0001 /* add event to kq (implies ENABLE) */ -#define EV_DELETE 0x0002 /* delete event from kq */ -#define EV_ENABLE 0x0004 /* enable event */ -#define EV_DISABLE 0x0008 /* disable event (not reported) */ +#define EV_ADD 0x0001U /* add event to kq (implies ENABLE) */ +#define EV_DELETE 0x0002U /* delete event from kq */ +#define EV_ENABLE 0x0004U /* enable event */ +#define EV_DISABLE 0x0008U /* disable event (not reported) */ /* flags */ -#define EV_ONESHOT 0x0010 /* only report one occurrence */ -#define EV_CLEAR 0x0020 /* clear event state after reporting */ +#define EV_ONESHOT 0x0010U /* only report one occurrence */ +#define EV_CLEAR 0x0020U /* clear event state after reporting */ -#define EV_SYSFLAGS 0xF000 /* reserved by system */ -#define EV_FLAG1 0x2000 /* filter-specific flag */ +#define EV_SYSFLAGS 0xF000U /* reserved by system */ +#define EV_FLAG1 0x2000U /* filter-specific flag */ /* returned values */ -#define EV_EOF 0x8000 /* EOF detected */ -#define EV_ERROR 0x4000 /* error, data contains errno */ +#define EV_EOF 0x8000U /* EOF detected */ +#define EV_ERROR 0x4000U /* error, data contains errno */ /* * hint flag for in-kernel use - must not equal any existing note */ #ifdef _KERNEL -#define NOTE_SUBMIT 0x0100 /* initial knote submission */ +#define NOTE_SUBMIT 0x0100U /* initial knote submission */ #endif /* * data/hint flags for EVFILT_{READ|WRITE}, shared with userspace */ -#define NOTE_LOWAT 0x0001 /* low water mark */ +#define NOTE_LOWAT 0x0001U /* low water mark */ /* * data/hint flags for EVFILT_VNODE, shared with userspace */ -#define NOTE_DELETE 0x0001 /* vnode was removed */ -#define NOTE_WRITE 0x0002 /* data contents changed */ -#define NOTE_EXTEND 0x0004 /* size increased */ -#define NOTE_ATTRIB 0x0008 /* attributes changed */ -#define NOTE_LINK 0x0010 /* link count changed */ -#define NOTE_RENAME 0x0020 /* vnode was renamed */ -#define NOTE_REVOKE 0x0040 /* vnode access was revoked */ +#define NOTE_DELETE 0x0001U /* vnode was removed */ +#define NOTE_WRITE 0x0002U /* data contents changed */ +#define NOTE_EXTEND 0x0004U /* size increased */ +#define NOTE_ATTRIB 0x0008U /* attributes changed */ +#define NOTE_LINK 0x0010U /* link count changed */ +#define NOTE_RENAME 0x0020U /* vnode was renamed */ +#define NOTE_REVOKE 0x0040U /* vnode access was revoked */ /* * data/hint flags for EVFILT_PROC, shared with userspace */ -#define NOTE_EXIT 0x8000 /* process exited */ -#define NOTE_FORK 0x4000 /* process forked */ -#define NOTE_EXEC 0x2000 /* process exec'd */ -#define NOTE_PCTRLMASK 0xf000 /* mask for hint bits */ -#define NOTE_PDATAMASK 0x000f /* mask for pid */ +#define NOTE_EXIT 0x8000U /* process exited */ +#define NOTE_FORK 0x4000U /* process forked */ +#define NOTE_EXEC 0x2000U /* process exec'd */ +#define NOTE_PCTRLMASK 0xf000U /* mask for hint bits */ +#define NOTE_PDATAMASK 0x000fU /* mask for pid */ /* additional flags for EVFILT_PROC */ -#define NOTE_TRACK 0x0001 /* follow across forks */ -#define NOTE_TRACKERR 0x0002 /* could not track child */
CVS commit: src/tests
Module Name:src Committed By: christos Date: Wed Jan 14 22:16:05 UTC 2015 Modified Files: src/tests: h_macros.h Log Message: cast to destination type. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tests/h_macros.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests
Module Name:src Committed By: christos Date: Wed Jan 14 22:16:05 UTC 2015 Modified Files: src/tests: h_macros.h Log Message: cast to destination type. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/tests/h_macros.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/h_macros.h diff -u src/tests/h_macros.h:1.9 src/tests/h_macros.h:1.10 --- src/tests/h_macros.h:1.9 Fri May 17 11:42:09 2013 +++ src/tests/h_macros.h Wed Jan 14 17:16:04 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: h_macros.h,v 1.9 2013/05/17 15:42:09 christos Exp $ */ +/* $NetBSD: h_macros.h,v 1.10 2015/01/14 22:16:04 christos Exp $ */ /*- * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ tests_makegarbage(void *space, size_t le uint16_t randval; while (len = sizeof(randval)) { - *sb++ = (random() 0x); + *sb++ = ((uint16_t)random() 0x); len -= sizeof(*sb); } randval = (uint16_t)random();
CVS commit: src/tests/kernel/kqueue
Module Name:src Committed By: christos Date: Wed Jan 14 22:22:14 UTC 2015 Added Files: src/tests/kernel/kqueue: t_vnode.c Log Message: PR/48958: rudolf: EVFILT_VNODE filter miscounting hardlinks (add test) To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/tests/kernel/kqueue/t_vnode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/tests/kernel/kqueue/t_vnode.c diff -u /dev/null src/tests/kernel/kqueue/t_vnode.c:1.1 --- /dev/null Wed Jan 14 17:22:14 2015 +++ src/tests/kernel/kqueue/t_vnode.c Wed Jan 14 17:22:14 2015 @@ -0,0 +1,533 @@ +#include sys/event.h +#include sys/stat.h +#include sys/time.h +#include fcntl.h +#include stdio.h +#include unistd.h + +#include atf-c.h + +/* + * Test cases for events triggered by manipulating a target directory + * content. Using EVFILT_VNODE filter on the target directory descriptor. + * + */ + +static const char *dir_target = foo; +static const char *dir_inside1 = foo/bar1; +static const char *dir_inside2 = foo/bar2; +static const char *dir_outside = bar; +static const char *file_inside1 = foo/baz1; +static const char *file_inside2 = foo/baz2; +static const char *file_outside = qux; +static const struct timespec ts = {0, 0}; +static int kq = -1; +static int target = -1; + +int init_target(void); +int init_kqueue(void); +int create_file(const char *); +void cleanup(void); + +int +init_target(void) +{ + if (mkdir(dir_target, S_IRWXU) 0) { + return -1; + } + target = open(dir_target, O_RDONLY, 0); + return target; +} + +int +init_kqueue(void) +{ + struct kevent eventlist[1]; + + kq = kqueue(); + if (kq 0) { + return -1; + } + EV_SET(eventlist[0], (uintptr_t)target, EVFILT_VNODE, + EV_ADD | EV_ONESHOT, NOTE_DELETE | + NOTE_WRITE | NOTE_EXTEND | NOTE_ATTRIB | + NOTE_LINK | NOTE_RENAME | NOTE_REVOKE, 0, 0); + return kevent(kq, eventlist, 1, NULL, 0, NULL); +} + +int +create_file(const char *file) +{ + int fd; + + fd = open(file, O_WRONLY | O_CREAT, S_IRUSR | S_IWUSR); + if (fd 0) { + return -1; + } + return close(fd); +} + +void +cleanup(void) +{ + (void)unlink(file_inside1); + (void)unlink(file_inside2); + (void)unlink(file_outside); + (void)rmdir(dir_inside1); + (void)rmdir(dir_inside2); + (void)rmdir(dir_outside); + (void)rmdir(dir_target); + (void)close(kq); + (void)close(target); +} + +ATF_TC_WITH_CLEANUP(dir_no_note_link_create_file_in); +ATF_TC_HEAD(dir_no_note_link_create_file_in, tc) +{ + atf_tc_set_md_var(tc, descr, This test case ensures + that kevent(2) does not return NOTE_LINK for the directory + 'foo' if a file 'foo/baz' is created.); +} +ATF_TC_BODY(dir_no_note_link_create_file_in, tc) +{ + struct kevent changelist[1]; + + ATF_REQUIRE(init_target() != -1); + ATF_REQUIRE(init_kqueue() != -1); + + ATF_REQUIRE(create_file(file_inside1) != -1); + ATF_REQUIRE(kevent(kq, NULL, 0, changelist, 1, ts) != -1); + ATF_CHECK_EQ(changelist[0].fflags NOTE_LINK, 0); +} +ATF_TC_CLEANUP(dir_no_note_link_create_file_in, tc) +{ + cleanup(); +} + +ATF_TC_WITH_CLEANUP(dir_no_note_link_delete_file_in); +ATF_TC_HEAD(dir_no_note_link_delete_file_in, tc) +{ + atf_tc_set_md_var(tc, descr, This test case ensures + that kevent(2) does not return NOTE_LINK for the directory + 'foo' if a file 'foo/baz' is deleted.); +} +ATF_TC_BODY(dir_no_note_link_delete_file_in, tc) +{ + struct kevent changelist[1]; + + ATF_REQUIRE(init_target() != -1); + ATF_REQUIRE(create_file(file_inside1) != -1); + ATF_REQUIRE(init_kqueue() != -1); + + ATF_REQUIRE(unlink(file_inside1) != -1); + ATF_REQUIRE(kevent(kq, NULL, 0, changelist, 1, ts) != -1); + ATF_CHECK_EQ(changelist[0].fflags NOTE_LINK, 0); +} +ATF_TC_CLEANUP(dir_no_note_link_delete_file_in, tc) +{ + cleanup(); +} + +ATF_TC_WITH_CLEANUP(dir_no_note_link_mv_dir_within); +ATF_TC_HEAD(dir_no_note_link_mv_dir_within, tc) +{ + atf_tc_set_md_var(tc, descr, This test case ensures + that kevent(2) does not return NOTE_LINK for the directory + 'foo' if a directory 'foo/bar' is renamed to 'foo/baz'.); +} +ATF_TC_BODY(dir_no_note_link_mv_dir_within, tc) +{ + struct kevent changelist[1]; + + ATF_REQUIRE(init_target() != -1); + ATF_REQUIRE(mkdir(dir_inside1, S_IRWXU) != -1); + ATF_REQUIRE(init_kqueue() != -1); + + ATF_REQUIRE(rename(dir_inside1, dir_inside2) != -1); + ATF_REQUIRE(kevent(kq, NULL, 0, changelist, 1, ts) != -1); + ATF_CHECK_EQ(changelist[0].fflags NOTE_LINK, 0); +} +ATF_TC_CLEANUP(dir_no_note_link_mv_dir_within, tc) +{ + cleanup(); +} + +ATF_TC_WITH_CLEANUP(dir_no_note_link_mv_file_within); +ATF_TC_HEAD(dir_no_note_link_mv_file_within, tc) +{ + atf_tc_set_md_var(tc, descr, This test case ensures + that kevent(2) does not return NOTE_LINK for the directory + 'foo' if a file 'foo/baz' is renamed to 'foo/qux'.); +} +ATF_TC_BODY(dir_no_note_link_mv_file_within, tc) +{ + struct kevent changelist[1]; + + ATF_REQUIRE(init_target() != -1); + ATF_REQUIRE(create_file(file_inside1) != -1); +
CVS commit: src/tests/kernel/kqueue
Module Name:src Committed By: christos Date: Wed Jan 14 22:22:14 UTC 2015 Added Files: src/tests/kernel/kqueue: t_vnode.c Log Message: PR/48958: rudolf: EVFILT_VNODE filter miscounting hardlinks (add test) To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/tests/kernel/kqueue/t_vnode.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests
Module Name:src Committed By: christos Date: Wed Jan 14 22:57:27 UTC 2015 Modified Files: src/tests: h_macros.h Log Message: cast and mask is overkill. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/tests/h_macros.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/distrib/sets/lists
Module Name:src Committed By: christos Date: Wed Jan 14 22:25:05 UTC 2015 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi Log Message: add vnode kqueue test from PR/48958 To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.609 -r1.610 src/distrib/sets/lists/tests/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.102 src/distrib/sets/lists/debug/mi:1.103 --- src/distrib/sets/lists/debug/mi:1.102 Wed Jan 7 17:26:50 2015 +++ src/distrib/sets/lists/debug/mi Wed Jan 14 17:25:05 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.102 2015/01/07 22:26:50 pooka Exp $ +# $NetBSD: mi,v 1.103 2015/01/14 22:25:05 christos Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib @@ -1637,6 +1637,7 @@ ./usr/libdata/debug/usr/tests/kernel/kqueue/t_proc2.debug tests-kernel-tests debug,atf ./usr/libdata/debug/usr/tests/kernel/kqueue/t_proc3.debug tests-kernel-tests debug,atf ./usr/libdata/debug/usr/tests/kernel/kqueue/t_sig.debug tests-kernel-tests debug,atf +./usr/libdata/debug/usr/tests/kernel/kqueue/t_vnode.debug tests-kernel-tests debug,atf ./usr/libdata/debug/usr/tests/kernel/kqueue/write/t_fifo.debug tests-kernel-tests debug,atf ./usr/libdata/debug/usr/tests/kernel/kqueue/write/t_pipe.debug tests-kernel-tests debug,atf ./usr/libdata/debug/usr/tests/kernel/kqueue/write/t_ttypty.debug tests-kernel-tests debug,atf Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.609 src/distrib/sets/lists/tests/mi:1.610 --- src/distrib/sets/lists/tests/mi:1.609 Tue Jan 6 16:42:02 2015 +++ src/distrib/sets/lists/tests/mi Wed Jan 14 17:25:05 2015 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.609 2015/01/06 21:42:02 mrg Exp $ +# $NetBSD: mi,v 1.610 2015/01/14 22:25:05 christos Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -2066,6 +2066,7 @@ ./usr/tests/kernel/kqueue/t_proc2 tests-kernel-tests atf ./usr/tests/kernel/kqueue/t_proc3 tests-kernel-tests atf ./usr/tests/kernel/kqueue/t_sig tests-kernel-tests atf +./usr/tests/kernel/kqueue/t_vnode tests-kernel-tests atf ./usr/tests/kernel/kqueue/write tests-kernel-tests ./usr/tests/kernel/kqueue/write/Atffile tests-kernel-tests atf ./usr/tests/kernel/kqueue/write/Kyuafile tests-kernel-tests atf,kyua
CVS commit: src/tests/kernel/kqueue
Module Name:src Committed By: christos Date: Wed Jan 14 22:22:32 UTC 2015 Modified Files: src/tests/kernel/kqueue: Makefile t_ioctl.c t_proc1.c t_proc2.c t_proc3.c Log Message: bump warns. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/kernel/kqueue/Makefile cvs rdiff -u -r1.1 -r1.2 src/tests/kernel/kqueue/t_ioctl.c \ src/tests/kernel/kqueue/t_proc1.c src/tests/kernel/kqueue/t_proc2.c \ src/tests/kernel/kqueue/t_proc3.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/kernel/kqueue/Makefile diff -u src/tests/kernel/kqueue/Makefile:1.3 src/tests/kernel/kqueue/Makefile:1.4 --- src/tests/kernel/kqueue/Makefile:1.3 Sat Nov 17 16:55:24 2012 +++ src/tests/kernel/kqueue/Makefile Wed Jan 14 17:22:32 2015 @@ -1,5 +1,6 @@ -# $NetBSD: Makefile,v 1.3 2012/11/17 21:55:24 joerg Exp $ +# $NetBSD: Makefile,v 1.4 2015/01/14 22:22:32 christos Exp $ +WARNS?=6 NOMAN= # defined .include bsd.own.mk @@ -14,5 +15,6 @@ TESTS_C+= t_proc1 TESTS_C+= t_proc2 TESTS_C+= t_proc3 TESTS_C+= t_sig +TESTS_C+= t_vnode .include bsd.test.mk Index: src/tests/kernel/kqueue/t_ioctl.c diff -u src/tests/kernel/kqueue/t_ioctl.c:1.1 src/tests/kernel/kqueue/t_ioctl.c:1.2 --- src/tests/kernel/kqueue/t_ioctl.c:1.1 Fri Feb 20 16:39:57 2009 +++ src/tests/kernel/kqueue/t_ioctl.c Wed Jan 14 17:22:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_ioctl.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $ */ +/* $NetBSD: t_ioctl.c,v 1.2 2015/01/14 22:22:32 christos Exp $ */ /*- * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include sys/cdefs.h __COPYRIGHT(@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved.); -__RCSID($NetBSD: t_ioctl.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $); +__RCSID($NetBSD: t_ioctl.c,v 1.2 2015/01/14 22:22:32 christos Exp $); #include sys/event.h #include sys/ioctl.h @@ -53,7 +53,8 @@ ATF_TC_BODY(kfilter_byfilter, tc) { char buf[32]; struct kfilter_mapping km; - int i, kq; + int kq; + uint32_t i; RL(kq = kqueue()); Index: src/tests/kernel/kqueue/t_proc1.c diff -u src/tests/kernel/kqueue/t_proc1.c:1.1 src/tests/kernel/kqueue/t_proc1.c:1.2 --- src/tests/kernel/kqueue/t_proc1.c:1.1 Fri Feb 20 16:39:57 2009 +++ src/tests/kernel/kqueue/t_proc1.c Wed Jan 14 17:22:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_proc1.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $ */ +/* $NetBSD: t_proc1.c,v 1.2 2015/01/14 22:22:32 christos Exp $ */ /*- * Copyright (c) 2002, 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include sys/cdefs.h __COPYRIGHT(@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved.); -__RCSID($NetBSD: t_proc1.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $); +__RCSID($NetBSD: t_proc1.c,v 1.2 2015/01/14 22:22:32 christos Exp $); /* * this also used to trigger problem fixed in @@ -99,7 +99,8 @@ ATF_TC_BODY(proc1, tc) { struct kevent event[1]; pid_t pid; - int kq, want, status; + int kq, status; + u_int want; RL(kq = kqueue()); @@ -112,7 +113,7 @@ ATF_TC_BODY(proc1, tc) (void)sleep(1); /* give child some time to come up */ - event[0].ident = pid; + event[0].ident = (uintptr_t)pid; event[0].filter = EVFILT_PROC; event[0].flags = EV_ADD | EV_ENABLE; event[0].fflags = NOTE_EXIT | NOTE_FORK | NOTE_EXEC; /* | NOTE_TRACK;*/ Index: src/tests/kernel/kqueue/t_proc2.c diff -u src/tests/kernel/kqueue/t_proc2.c:1.1 src/tests/kernel/kqueue/t_proc2.c:1.2 --- src/tests/kernel/kqueue/t_proc2.c:1.1 Fri Feb 20 16:39:57 2009 +++ src/tests/kernel/kqueue/t_proc2.c Wed Jan 14 17:22:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_proc2.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $ */ +/* $NetBSD: t_proc2.c,v 1.2 2015/01/14 22:22:32 christos Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -32,7 +32,7 @@ #include sys/cdefs.h __COPYRIGHT(@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved.); -__RCSID($NetBSD: t_proc2.c,v 1.1 2009/02/20 21:39:57 jmmv Exp $); +__RCSID($NetBSD: t_proc2.c,v 1.2 2015/01/14 22:22:32 christos Exp $); #include sys/event.h #include sys/time.h @@ -106,7 +106,8 @@ ATF_TC_BODY(proc2, tc) /* NOTREACHED */ } - EV_SET(ke, pid, EVFILT_PROC, EV_ADD, NOTE_FORK|NOTE_TRACK, 0, 0); + EV_SET(ke, (uintptr_t)pid, EVFILT_PROC, EV_ADD, NOTE_FORK|NOTE_TRACK, + 0, 0); RL(kevent(kq, ke, 1, NULL, 0, timeout)); Index: src/tests/kernel/kqueue/t_proc3.c diff -u src/tests/kernel/kqueue/t_proc3.c:1.1 src/tests/kernel/kqueue/t_proc3.c:1.2 --- src/tests/kernel/kqueue/t_proc3.c:1.1 Sat Nov 17 16:55:24 2012 +++ src/tests/kernel/kqueue/t_proc3.c Wed Jan 14 17:22:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: t_proc3.c,v 1.1 2012/11/17 21:55:24 joerg Exp $ */ +/* $NetBSD: t_proc3.c,v 1.2 2015/01/14 22:22:32 christos Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include sys/cdefs.h -__RCSID($NetBSD: t_proc3.c,v 1.1 2012/11/17
CVS commit: src/tests/kernel/kqueue
Module Name:src Committed By: christos Date: Wed Jan 14 22:22:32 UTC 2015 Modified Files: src/tests/kernel/kqueue: Makefile t_ioctl.c t_proc1.c t_proc2.c t_proc3.c Log Message: bump warns. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/tests/kernel/kqueue/Makefile cvs rdiff -u -r1.1 -r1.2 src/tests/kernel/kqueue/t_ioctl.c \ src/tests/kernel/kqueue/t_proc1.c src/tests/kernel/kqueue/t_proc2.c \ src/tests/kernel/kqueue/t_proc3.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jan 14 15:26:08 UTC 2015 Modified Files: src/sys/dev/pci: pcidevs Log Message: Sort VIATECH's entries in the device ID's order. To generate a diff of this commit: cvs rdiff -u -r1.1210 -r1.1211 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jan 14 15:26:08 UTC 2015 Modified Files: src/sys/dev/pci: pcidevs Log Message: Sort VIATECH's entries in the device ID's order. To generate a diff of this commit: cvs rdiff -u -r1.1210 -r1.1211 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1210 src/sys/dev/pci/pcidevs:1.1211 --- src/sys/dev/pci/pcidevs:1.1210 Wed Dec 31 21:20:23 2014 +++ src/sys/dev/pci/pcidevs Wed Jan 14 15:26:08 2015 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1210 2014/12/31 21:20:23 veego Exp $ +$NetBSD: pcidevs,v 1.1211 2015/01/14 15:26:08 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -5671,19 +5671,19 @@ product VIATECH VT8623 0x3123 VT8623 (A product VIATECH VT8233A 0x3147 VT8233A PCI-ISA Bridge product VIATECH VT8237_SATA 0x3149 VT8237 Integrated SATA Controller product VIATECH VT6410_RAID 0x3164 VT6410 ATA133 RAID Controller -product VIATECH K8HTB 0x3188 K8HTB Host -product VIATECH VT6421_RAID 0x3249 VT6421 Serial RAID Controller -product VIATECH VT3314_IG 0x3344 VT3314 CN900 UniChrome Integrated Graphics -product VIATECH VT8237R_SATA 0x3349 VT8237R Integrated SATA Controller -product VIATECH VT3351_HB_3351 0x3351 VT3351 Host Bridge -product VIATECH KT880_3 0x3269 KT880 CPU to PCI Bridge product VIATECH VT8235 0x3177 VT8235 (Apollo KT400) PCI-ISA Bridge +product VIATECH K8HTB 0x3188 K8HTB Host product VIATECH VT8377 0x3189 VT8377 Apollo KT400 CPU to PCI Bridge product VIATECH VT8378 0x3205 VT8378 Apollo KM400 CPU to PCI Bridge product VIATECH VT8237 0x3227 VT8237 PCI-LPC Bridge +product VIATECH VT6421_RAID 0x3249 VT6421 Serial RAID Controller +product VIATECH KT880_3 0x3269 KT880 CPU to PCI Bridge product VIATECH VT8251 0x3287 VT8251 PCI-LPC Bridge product VIATECH VT8237A_HDA 0x3288 VT8237A/VT8251 High Definition Audio Controller product VIATECH VT8237A_ISA 0x3337 VT8237A/VT82C586A PCI-ISA Bridge +product VIATECH VT3314_IG 0x3344 VT3314 CN900 UniChrome Integrated Graphics +product VIATECH VT8237R_SATA 0x3349 VT8237R Integrated SATA Controller +product VIATECH VT3351_HB_3351 0x3351 VT3351 Host Bridge product VIATECH VT8237S_ISA 0x3372 VT8237S PCI-ISA Bridge product VIATECH VT8237A_PPB 0x337a VT8237A PCI-PCI Bridge product VIATECH VT8237A_HB 0x337b VT8237A Host Bridge
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jan 14 15:28:18 UTC 2015 Modified Files: src/sys/dev/pci: pcidevs.h pcidevs_data.h Log Message: regen. To generate a diff of this commit: cvs rdiff -u -r1.1204 -r1.1205 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1203 -r1.1204 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs.h diff -u src/sys/dev/pci/pcidevs.h:1.1204 src/sys/dev/pci/pcidevs.h:1.1205 --- src/sys/dev/pci/pcidevs.h:1.1204 Wed Dec 31 21:21:41 2014 +++ src/sys/dev/pci/pcidevs.h Wed Jan 14 15:28:18 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs.h,v 1.1204 2014/12/31 21:21:41 veego Exp $ */ +/* $NetBSD: pcidevs.h,v 1.1205 2015/01/14 15:28:18 msaitoh Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.1210 2014/12/31 21:20:23 veego Exp + * NetBSD: pcidevs,v 1.1211 2015/01/14 15:26:08 msaitoh Exp */ /* @@ -5678,19 +5678,19 @@ #define PCI_PRODUCT_VIATECH_VT8233A 0x3147 /* VT8233A PCI-ISA Bridge */ #define PCI_PRODUCT_VIATECH_VT8237_SATA 0x3149 /* VT8237 Integrated SATA Controller */ #define PCI_PRODUCT_VIATECH_VT6410_RAID 0x3164 /* VT6410 ATA133 RAID Controller */ -#define PCI_PRODUCT_VIATECH_K8HTB 0x3188 /* K8HTB Host */ -#define PCI_PRODUCT_VIATECH_VT6421_RAID 0x3249 /* VT6421 Serial RAID Controller */ -#define PCI_PRODUCT_VIATECH_VT3314_IG 0x3344 /* VT3314 CN900 UniChrome Integrated Graphics */ -#define PCI_PRODUCT_VIATECH_VT8237R_SATA 0x3349 /* VT8237R Integrated SATA Controller */ -#define PCI_PRODUCT_VIATECH_VT3351_HB_3351 0x3351 /* VT3351 Host Bridge */ -#define PCI_PRODUCT_VIATECH_KT880_3 0x3269 /* KT880 CPU to PCI Bridge */ #define PCI_PRODUCT_VIATECH_VT8235 0x3177 /* VT8235 (Apollo KT400) PCI-ISA Bridge */ +#define PCI_PRODUCT_VIATECH_K8HTB 0x3188 /* K8HTB Host */ #define PCI_PRODUCT_VIATECH_VT8377 0x3189 /* VT8377 Apollo KT400 CPU to PCI Bridge */ #define PCI_PRODUCT_VIATECH_VT8378 0x3205 /* VT8378 Apollo KM400 CPU to PCI Bridge */ #define PCI_PRODUCT_VIATECH_VT8237 0x3227 /* VT8237 PCI-LPC Bridge */ +#define PCI_PRODUCT_VIATECH_VT6421_RAID 0x3249 /* VT6421 Serial RAID Controller */ +#define PCI_PRODUCT_VIATECH_KT880_3 0x3269 /* KT880 CPU to PCI Bridge */ #define PCI_PRODUCT_VIATECH_VT8251 0x3287 /* VT8251 PCI-LPC Bridge */ #define PCI_PRODUCT_VIATECH_VT8237A_HDA 0x3288 /* VT8237A/VT8251 High Definition Audio Controller */ #define PCI_PRODUCT_VIATECH_VT8237A_ISA 0x3337 /* VT8237A/VT82C586A PCI-ISA Bridge */ +#define PCI_PRODUCT_VIATECH_VT3314_IG 0x3344 /* VT3314 CN900 UniChrome Integrated Graphics */ +#define PCI_PRODUCT_VIATECH_VT8237R_SATA 0x3349 /* VT8237R Integrated SATA Controller */ +#define PCI_PRODUCT_VIATECH_VT3351_HB_3351 0x3351 /* VT3351 Host Bridge */ #define PCI_PRODUCT_VIATECH_VT8237S_ISA 0x3372 /* VT8237S PCI-ISA Bridge */ #define PCI_PRODUCT_VIATECH_VT8237A_PPB 0x337a /* VT8237A PCI-PCI Bridge */ #define PCI_PRODUCT_VIATECH_VT8237A_HB 0x337b /* VT8237A Host Bridge */ Index: src/sys/dev/pci/pcidevs_data.h diff -u src/sys/dev/pci/pcidevs_data.h:1.1203 src/sys/dev/pci/pcidevs_data.h:1.1204 --- src/sys/dev/pci/pcidevs_data.h:1.1203 Wed Dec 31 21:21:41 2014 +++ src/sys/dev/pci/pcidevs_data.h Wed Jan 14 15:28:18 2015 @@ -1,10 +1,10 @@ -/* $NetBSD: pcidevs_data.h,v 1.1203 2014/12/31 21:21:41 veego Exp $ */ +/* $NetBSD: pcidevs_data.h,v 1.1204 2015/01/14 15:28:18 msaitoh Exp $ */ /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: pcidevs,v 1.1210 2014/12/31 21:20:23 veego Exp + * NetBSD: pcidevs,v 1.1211 2015/01/14 15:26:08 msaitoh Exp */ /* @@ -9545,32 +9545,32 @@ static const uint16_t pci_products[] = { 30231, 692, 8263, 6239, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT6410_RAID, 30286, 24296, 6234, 6239, 0, + PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8235, + 30293, 29791, 30300, 6621, 6347, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_K8HTB, 29778, 6743, 0, - PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT6421_RAID, - 30293, 10599, 6234, 6239, 0, - PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT3314_IG, - 30300, 30307, 30313, 692, 1716, 0, - PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8237R_SATA, - 30323, 692, 8263, 6239, 0, - PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT3351_HB_3351, - 29806, 6743, 6347, 0, - PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_KT880_3, - 29772, 2544, 6799, 615, 6347, 0, - PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8235, - 30331, 29791, 30338, 6621, 6347, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8377, - 30345, 30352, 30359, 2544, 6799, 615, 6347, 0, + 30307, 30314, 30321, 2544, 6799, 615, 6347, 0, PCI_VENDOR_VIATECH, PCI_PRODUCT_VIATECH_VT8378, - 30365, 30352, 30372, 2544, 6799, 615, 6347, 0, + 30327, 30314, 30334, 2544, 6799,
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Wed Jan 14 15:28:18 UTC 2015 Modified Files: src/sys/dev/pci: pcidevs.h pcidevs_data.h Log Message: regen. To generate a diff of this commit: cvs rdiff -u -r1.1204 -r1.1205 src/sys/dev/pci/pcidevs.h cvs rdiff -u -r1.1203 -r1.1204 src/sys/dev/pci/pcidevs_data.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/dev/ic
Module Name:src Committed By: chs Date: Wed Jan 14 17:45:27 UTC 2015 Modified Files: src/sys/dev/ic: vga.c vga_raster.c vgavar.h Log Message: remove BIOS-mapping code that was #if-0'd in the previous commit. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/dev/ic/vga.c cvs rdiff -u -r1.42 -r1.43 src/sys/dev/ic/vga_raster.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/ic/vgavar.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/vga.c diff -u src/sys/dev/ic/vga.c:1.113 src/sys/dev/ic/vga.c:1.114 --- src/sys/dev/ic/vga.c:1.113 Thu Aug 21 13:52:22 2014 +++ src/sys/dev/ic/vga.c Wed Jan 14 17:45:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vga.c,v 1.113 2014/08/21 13:52:22 macallan Exp $ */ +/* $NetBSD: vga.c,v 1.114 2015/01/14 17:45:27 chs Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vga.c,v 1.113 2014/08/21 13:52:22 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: vga.c,v 1.114 2015/01/14 17:45:27 chs Exp $); #include opt_vga.h /* for WSCONS_SUPPORT_PCVTFONTS */ @@ -555,14 +555,6 @@ vga_init(struct vga_config *vc, bus_spac (vh-vh_mono ? 0x1 : 0x18000), 0x8000, vh-vh_memh)) panic(vga_init: mem subrange failed); -#if 0 - /* should only reserve the space (no need to map - save KVM) */ - vc-vc_biostag = memt; - if (bus_space_map(vc-vc_biostag, 0xc, 0x8000, 0, vc-vc_bioshdl)) - vc-vc_biosmapped = 0; - else - vc-vc_biosmapped = 1; -#endif vc-nscreens = 0; LIST_INIT(vc-screens); vc-active = NULL; Index: src/sys/dev/ic/vga_raster.c diff -u src/sys/dev/ic/vga_raster.c:1.42 src/sys/dev/ic/vga_raster.c:1.43 --- src/sys/dev/ic/vga_raster.c:1.42 Thu Aug 21 13:52:22 2014 +++ src/sys/dev/ic/vga_raster.c Wed Jan 14 17:45:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vga_raster.c,v 1.42 2014/08/21 13:52:22 macallan Exp $ */ +/* $NetBSD: vga_raster.c,v 1.43 2015/01/14 17:45:27 chs Exp $ */ /* * Copyright (c) 2001, 2002 Bang Jun-Young @@ -56,7 +56,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vga_raster.c,v 1.42 2014/08/21 13:52:22 macallan Exp $); +__KERNEL_RCSID(0, $NetBSD: vga_raster.c,v 1.43 2015/01/14 17:45:27 chs Exp $); #include opt_vga.h #include opt_wsmsgattrs.h /* for WSDISPLAY_CUSTOM_OUTPUT */ @@ -402,14 +402,6 @@ vga_raster_init(struct vga_config *vc, b vh-vh_memh)) panic(vga_raster_init: mem subrange failed); -#if 0 - /* should only reserve the space (no need to map - save KVM) */ - vc-vc_biostag = memt; - if (bus_space_map(vc-vc_biostag, 0xc, 0x8000, 0, vc-vc_bioshdl)) - vc-vc_biosmapped = 0; - else - vc-vc_biosmapped = 1; -#endif vc-nscreens = 0; LIST_INIT(vc-screens); vc-active = NULL; Index: src/sys/dev/ic/vgavar.h diff -u src/sys/dev/ic/vgavar.h:1.32 src/sys/dev/ic/vgavar.h:1.33 --- src/sys/dev/ic/vgavar.h:1.32 Wed Nov 12 03:12:35 2014 +++ src/sys/dev/ic/vgavar.h Wed Jan 14 17:45:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vgavar.h,v 1.32 2014/11/12 03:12:35 christos Exp $ */ +/* $NetBSD: vgavar.h,v 1.33 2015/01/14 17:45:27 chs Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -57,11 +57,6 @@ struct vga_config { struct vgascreen *active; /* current display */ const struct wsscreen_descr *currenttype; -#if 0 - int vc_biosmapped; - bus_space_tag_t vc_biostag; - bus_space_handle_t vc_bioshdl; -#endif struct vgascreen *wantedscreen; void (*switchcb)(void *, int, int); void *switchcbarg;
CVS commit: src/sys/dev/ic
Module Name:src Committed By: chs Date: Wed Jan 14 17:45:27 UTC 2015 Modified Files: src/sys/dev/ic: vga.c vga_raster.c vgavar.h Log Message: remove BIOS-mapping code that was #if-0'd in the previous commit. To generate a diff of this commit: cvs rdiff -u -r1.113 -r1.114 src/sys/dev/ic/vga.c cvs rdiff -u -r1.42 -r1.43 src/sys/dev/ic/vga_raster.c cvs rdiff -u -r1.32 -r1.33 src/sys/dev/ic/vgavar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/sys/dev/ic
Module Name:src Committed By: martin Date: Wed Jan 14 18:27:05 UTC 2015 Modified Files: src/sys/dev/ic [netbsd-7]: vga.c vga_raster.c vgavar.h Log Message: Pull up following revision(s) (requested by chs in ticket #418): sys/dev/ic/vga.c: revision 1.113 sys/dev/ic/vga.c: revision 1.114 sys/dev/ic/vga_raster.c: revision 1.42 sys/dev/ic/vga_raster.c: revision 1.43 sys/dev/ic/vgavar.h: revision 1.31 sys/dev/ic/vgavar.h: revision 1.33 I've been unable to find any code that actually uses the mapping and we may want to read the ROM from drm2. If no users show up within a week or so I'll delete it. remove BIOS-mapping code that was #if-0'd in the previous commit. To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.112.2.1 src/sys/dev/ic/vga.c cvs rdiff -u -r1.41 -r1.41.2.1 src/sys/dev/ic/vga_raster.c cvs rdiff -u -r1.30.12.1 -r1.30.12.2 src/sys/dev/ic/vgavar.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/vga.c diff -u src/sys/dev/ic/vga.c:1.112 src/sys/dev/ic/vga.c:1.112.2.1 --- src/sys/dev/ic/vga.c:1.112 Sat Jul 12 05:30:33 2014 +++ src/sys/dev/ic/vga.c Wed Jan 14 18:27:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vga.c,v 1.112 2014/07/12 05:30:33 mlelstv Exp $ */ +/* $NetBSD: vga.c,v 1.112.2.1 2015/01/14 18:27:05 martin Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vga.c,v 1.112 2014/07/12 05:30:33 mlelstv Exp $); +__KERNEL_RCSID(0, $NetBSD: vga.c,v 1.112.2.1 2015/01/14 18:27:05 martin Exp $); #include opt_vga.h /* for WSCONS_SUPPORT_PCVTFONTS */ @@ -555,13 +555,6 @@ vga_init(struct vga_config *vc, bus_spac (vh-vh_mono ? 0x1 : 0x18000), 0x8000, vh-vh_memh)) panic(vga_init: mem subrange failed); - /* should only reserve the space (no need to map - save KVM) */ - vc-vc_biostag = memt; - if (bus_space_map(vc-vc_biostag, 0xc, 0x8000, 0, vc-vc_bioshdl)) - vc-vc_biosmapped = 0; - else - vc-vc_biosmapped = 1; - vc-nscreens = 0; LIST_INIT(vc-screens); vc-active = NULL; Index: src/sys/dev/ic/vga_raster.c diff -u src/sys/dev/ic/vga_raster.c:1.41 src/sys/dev/ic/vga_raster.c:1.41.2.1 --- src/sys/dev/ic/vga_raster.c:1.41 Sat Jul 12 05:30:33 2014 +++ src/sys/dev/ic/vga_raster.c Wed Jan 14 18:27:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vga_raster.c,v 1.41 2014/07/12 05:30:33 mlelstv Exp $ */ +/* $NetBSD: vga_raster.c,v 1.41.2.1 2015/01/14 18:27:05 martin Exp $ */ /* * Copyright (c) 2001, 2002 Bang Jun-Young @@ -56,7 +56,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: vga_raster.c,v 1.41 2014/07/12 05:30:33 mlelstv Exp $); +__KERNEL_RCSID(0, $NetBSD: vga_raster.c,v 1.41.2.1 2015/01/14 18:27:05 martin Exp $); #include opt_vga.h #include opt_wsmsgattrs.h /* for WSDISPLAY_CUSTOM_OUTPUT */ @@ -402,13 +402,6 @@ vga_raster_init(struct vga_config *vc, b vh-vh_memh)) panic(vga_raster_init: mem subrange failed); - /* should only reserve the space (no need to map - save KVM) */ - vc-vc_biostag = memt; - if (bus_space_map(vc-vc_biostag, 0xc, 0x8000, 0, vc-vc_bioshdl)) - vc-vc_biosmapped = 0; - else - vc-vc_biosmapped = 1; - vc-nscreens = 0; LIST_INIT(vc-screens); vc-active = NULL; Index: src/sys/dev/ic/vgavar.h diff -u src/sys/dev/ic/vgavar.h:1.30.12.1 src/sys/dev/ic/vgavar.h:1.30.12.2 --- src/sys/dev/ic/vgavar.h:1.30.12.1 Sun Jan 11 05:59:16 2015 +++ src/sys/dev/ic/vgavar.h Wed Jan 14 18:27:05 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vgavar.h,v 1.30.12.1 2015/01/11 05:59:16 snj Exp $ */ +/* $NetBSD: vgavar.h,v 1.30.12.2 2015/01/14 18:27:05 martin Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -57,10 +57,6 @@ struct vga_config { struct vgascreen *active; /* current display */ const struct wsscreen_descr *currenttype; - int vc_biosmapped; - bus_space_tag_t vc_biostag; - bus_space_handle_t vc_bioshdl; - struct vgascreen *wantedscreen; void (*switchcb)(void *, int, int); void *switchcbarg;
CVS commit: [netbsd-7] src/sys/dev/ic
Module Name:src Committed By: martin Date: Wed Jan 14 18:27:05 UTC 2015 Modified Files: src/sys/dev/ic [netbsd-7]: vga.c vga_raster.c vgavar.h Log Message: Pull up following revision(s) (requested by chs in ticket #418): sys/dev/ic/vga.c: revision 1.113 sys/dev/ic/vga.c: revision 1.114 sys/dev/ic/vga_raster.c: revision 1.42 sys/dev/ic/vga_raster.c: revision 1.43 sys/dev/ic/vgavar.h: revision 1.31 sys/dev/ic/vgavar.h: revision 1.33 I've been unable to find any code that actually uses the mapping and we may want to read the ROM from drm2. If no users show up within a week or so I'll delete it. remove BIOS-mapping code that was #if-0'd in the previous commit. To generate a diff of this commit: cvs rdiff -u -r1.112 -r1.112.2.1 src/sys/dev/ic/vga.c cvs rdiff -u -r1.41 -r1.41.2.1 src/sys/dev/ic/vga_raster.c cvs rdiff -u -r1.30.12.1 -r1.30.12.2 src/sys/dev/ic/vgavar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Wed Jan 14 18:31:29 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Ticket #418 To generate a diff of this commit: cvs rdiff -u -r1.1.2.163 -r1.1.2.164 src/doc/CHANGES-7.0 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-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.163 src/doc/CHANGES-7.0:1.1.2.164 --- src/doc/CHANGES-7.0:1.1.2.163 Wed Jan 14 05:33:35 2015 +++ src/doc/CHANGES-7.0 Wed Jan 14 18:31:29 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.163 2015/01/14 05:33:35 msaitoh Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.164 2015/01/14 18:31:29 martin Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -13422,3 +13422,12 @@ sys/sys/power.h 1.20 to report PSWITCH_TYPE_RADIO events to sysmon. [bouyer, ticket #415] +sys/dev/ic/vga.c1.113-1.114 +sys/dev/ic/vga_raster.c1.42-1.43 +sys/dev/ic/vgavar.h1.31,1.33 + + Remove code to map the VGA BIOS. The mapping is not used + and prevents mapping and reading the ROM from drm2. + [chs, ticket #418] + +
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Wed Jan 14 18:31:29 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Ticket #418 To generate a diff of this commit: cvs rdiff -u -r1.1.2.163 -r1.1.2.164 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/elftoolchain/dist/libdwarf
Module Name:src Committed By: martin Date: Wed Jan 14 09:29:28 UTC 2015 Modified Files: src/external/bsd/elftoolchain/dist/libdwarf: dwarf_attrval.c Log Message: Add missing break, following upstream. Reported by Henning Petersen in PR bin/49567. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/bsd/elftoolchain/dist/libdwarf
Module Name:src Committed By: martin Date: Wed Jan 14 09:29:28 UTC 2015 Modified Files: src/external/bsd/elftoolchain/dist/libdwarf: dwarf_attrval.c Log Message: Add missing break, following upstream. Reported by Henning Petersen in PR bin/49567. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 \ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c diff -u src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.2 src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.3 --- src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c:1.2 Sun Mar 9 16:58:03 2014 +++ src/external/bsd/elftoolchain/dist/libdwarf/dwarf_attrval.c Wed Jan 14 09:29:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: dwarf_attrval.c,v 1.2 2014/03/09 16:58:03 christos Exp $ */ +/* $NetBSD: dwarf_attrval.c,v 1.3 2015/01/14 09:29:27 martin Exp $ */ /*- * Copyright (c) 2007 John Birrell (j...@freebsd.org) @@ -28,7 +28,7 @@ #include _libdwarf.h -__RCSID($NetBSD: dwarf_attrval.c,v 1.2 2014/03/09 16:58:03 christos Exp $); +__RCSID($NetBSD: dwarf_attrval.c,v 1.3 2015/01/14 09:29:27 martin Exp $); ELFTC_VCSID(Id: dwarf_attrval.c 2072 2011-10-27 03:26:49Z jkoshy ); int @@ -128,6 +128,7 @@ dwarf_attrval_signed(Dwarf_Die die, Dwar break; case DW_FORM_data4: *valp = (int32_t) at-u[0].s64; + break; case DW_FORM_data8: case DW_FORM_sdata: *valp = at-u[0].s64;
CVS commit: src/sys/ufs/mfs
Module Name:src Committed By: hannken Date: Wed Jan 14 11:21:31 UTC 2015 Modified Files: src/sys/ufs/mfs: mfs_vfsops.c mfs_vnops.c Log Message: Change mfs to use an anonymous vnode obtained with bdevvp() for the specdev it mounts on. To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/ufs/mfs/mfs_vfsops.c cvs rdiff -u -r1.55 -r1.56 src/sys/ufs/mfs/mfs_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/mfs/mfs_vfsops.c diff -u src/sys/ufs/mfs/mfs_vfsops.c:1.108 src/sys/ufs/mfs/mfs_vfsops.c:1.109 --- src/sys/ufs/mfs/mfs_vfsops.c:1.108 Thu May 8 08:21:53 2014 +++ src/sys/ufs/mfs/mfs_vfsops.c Wed Jan 14 11:21:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mfs_vfsops.c,v 1.108 2014/05/08 08:21:53 hannken Exp $ */ +/* $NetBSD: mfs_vfsops.c,v 1.109 2015/01/14 11:21:31 hannken Exp $ */ /* * Copyright (c) 1989, 1990, 1993, 1994 @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mfs_vfsops.c,v 1.108 2014/05/08 08:21:53 hannken Exp $); +__KERNEL_RCSID(0, $NetBSD: mfs_vfsops.c,v 1.109 2015/01/14 11:21:31 hannken Exp $); #if defined(_KERNEL_OPT) #include opt_compat_netbsd.h @@ -71,7 +71,7 @@ MODULE(MODULE_CLASS_VFS, mfs, ffs); kmutex_t mfs_lock; /* global lock */ /* used for building internal dev_t, minor == 0 reserved for miniroot */ -static int mfs_minor = 1; +static devminor_t mfs_minor = 1; static int mfs_initcnt; extern int (**mfs_vnodeop_p)(void *); @@ -246,6 +246,7 @@ mfs_mount(struct mount *mp, const char * struct fs *fs; struct mfsnode *mfsp; struct proc *p; + devminor_t minor; int flags, error = 0; if (args == NULL) @@ -307,14 +308,20 @@ mfs_mount(struct mount *mp, const char * return EINVAL; return (0); } - error = getnewvnode(VT_MFS, NULL, mfs_vnodeop_p, NULL, devvp); + mutex_enter(mfs_lock); + minor = mfs_minor++; + mutex_exit(mfs_lock); + error = bdevvp(makedev(255, minor), devvp); if (error) return (error); - devvp-v_vflag |= VV_MPSAFE; - devvp-v_type = VBLK; - spec_node_init(devvp, makedev(255, mfs_minor)); - mfs_minor++; mfsp = kmem_alloc(sizeof(*mfsp), KM_SLEEP); + /* + * Changing v_op and v_data here is safe as we are + * the exclusive owner of this device node. + */ + KASSERT(devvp-v_op == spec_vnodeop_p); + KASSERT(devvp-v_data == NULL); + devvp-v_op = mfs_vnodeop_p; devvp-v_data = mfsp; mfsp-mfs_baseoff = args-base; mfsp-mfs_size = args-size; Index: src/sys/ufs/mfs/mfs_vnops.c diff -u src/sys/ufs/mfs/mfs_vnops.c:1.55 src/sys/ufs/mfs/mfs_vnops.c:1.56 --- src/sys/ufs/mfs/mfs_vnops.c:1.55 Fri Jul 25 08:20:53 2014 +++ src/sys/ufs/mfs/mfs_vnops.c Wed Jan 14 11:21:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mfs_vnops.c,v 1.55 2014/07/25 08:20:53 dholland Exp $ */ +/* $NetBSD: mfs_vnops.c,v 1.56 2015/01/14 11:21:31 hannken Exp $ */ /* * Copyright (c) 1989, 1993 @@ -32,7 +32,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: mfs_vnops.c,v 1.55 2014/07/25 08:20:53 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: mfs_vnops.c,v 1.56 2015/01/14 11:21:31 hannken Exp $); #include sys/param.h #include sys/systm.h @@ -280,8 +280,8 @@ mfs_inactive(void *v) if (bufq_peek(mfsp-mfs_buflist) != NULL) panic(mfs_inactive: not inactive (mfs_buflist %p), bufq_peek(mfsp-mfs_buflist)); - VOP_UNLOCK(vp); - return (0); + + return VOCALL(spec_vnodeop_p, VOFFSET(vop_inactive), ap); } /* @@ -308,7 +308,7 @@ mfs_reclaim(void *v) kmem_free(mfsp, sizeof(*mfsp)); } - return (0); + return VOCALL(spec_vnodeop_p, VOFFSET(vop_reclaim), ap); } /*
CVS commit: src/sys/ufs/mfs
Module Name:src Committed By: hannken Date: Wed Jan 14 11:21:31 UTC 2015 Modified Files: src/sys/ufs/mfs: mfs_vfsops.c mfs_vnops.c Log Message: Change mfs to use an anonymous vnode obtained with bdevvp() for the specdev it mounts on. To generate a diff of this commit: cvs rdiff -u -r1.108 -r1.109 src/sys/ufs/mfs/mfs_vfsops.c cvs rdiff -u -r1.55 -r1.56 src/sys/ufs/mfs/mfs_vnops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.