From owner-p4-projects@FreeBSD.ORG Wed Sep 1 09:14:09 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 782BB16A4D0; Wed, 1 Sep 2004 09:14:09 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3923B16A4CE for ; Wed, 1 Sep 2004 09:14:09 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0F46943D54 for ; Wed, 1 Sep 2004 09:14:09 +0000 (GMT) (envelope-from julian@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.11/8.12.11) with ESMTP id i819E9tL099672 for ; Wed, 1 Sep 2004 09:14:09 GMT (envelope-from julian@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.12.11/8.12.11/Submit) id i819E8tj099669 for perforce@freebsd.org; Wed, 1 Sep 2004 09:14:08 GMT (envelope-from julian@freebsd.org) Date: Wed, 1 Sep 2004 09:14:08 GMT Message-Id: <200409010914.i819E8tj099669@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to julian@freebsd.org using -f From: Julian Elischer To: Perforce Change Reviews Subject: PERFORCE change 60809 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Sep 2004 09:14:10 -0000 http://perforce.freebsd.org/chv.cgi?CH=60809 Change 60809 by julian@julian_ref on 2004/09/01 09:13:41 IFC @60805 Affected files ... .. //depot/projects/nsched/sys/alpha/alpha/trap.c#3 integrate .. //depot/projects/nsched/sys/alpha/conf/GENERIC#7 integrate .. //depot/projects/nsched/sys/alpha/linux/linux_machdep.c#2 integrate .. //depot/projects/nsched/sys/amd64/amd64/mp_machdep.c#7 integrate .. //depot/projects/nsched/sys/amd64/amd64/mp_watchdog.c#1 branch .. //depot/projects/nsched/sys/amd64/amd64/pmap.c#18 integrate .. //depot/projects/nsched/sys/amd64/amd64/trap.c#5 integrate .. //depot/projects/nsched/sys/amd64/ia32/ia32_syscall.c#2 integrate .. //depot/projects/nsched/sys/amd64/include/mp_watchdog.h#1 branch .. //depot/projects/nsched/sys/amd64/linux32/linux32_machdep.c#3 integrate .. //depot/projects/nsched/sys/cam/cam_periph.c#2 integrate .. //depot/projects/nsched/sys/coda/cnode.h#3 integrate .. //depot/projects/nsched/sys/coda/coda_fbsd.c#6 integrate .. //depot/projects/nsched/sys/coda/coda_psdev.c#3 integrate .. //depot/projects/nsched/sys/coda/coda_vfsops.c#5 integrate .. //depot/projects/nsched/sys/conf/Makefile.alpha#3 integrate .. //depot/projects/nsched/sys/conf/Makefile.amd64#3 integrate .. //depot/projects/nsched/sys/conf/Makefile.arm#2 integrate .. //depot/projects/nsched/sys/conf/Makefile.i386#3 integrate .. //depot/projects/nsched/sys/conf/Makefile.ia64#3 integrate .. //depot/projects/nsched/sys/conf/Makefile.pc98#3 integrate .. //depot/projects/nsched/sys/conf/Makefile.powerpc#4 integrate .. //depot/projects/nsched/sys/conf/Makefile.sparc64#3 integrate .. //depot/projects/nsched/sys/conf/NOTES#14 integrate .. //depot/projects/nsched/sys/conf/files#21 integrate .. //depot/projects/nsched/sys/conf/files.amd64#8 integrate .. //depot/projects/nsched/sys/conf/files.pc98#8 integrate .. //depot/projects/nsched/sys/conf/majors#3 integrate .. //depot/projects/nsched/sys/conf/options#15 integrate .. //depot/projects/nsched/sys/conf/options.amd64#3 integrate .. //depot/projects/nsched/sys/conf/options.pc98#5 integrate .. //depot/projects/nsched/sys/dev/acpica/acpi_thermal.c#6 integrate .. //depot/projects/nsched/sys/dev/aic7xxx/ahc_isa.c#2 integrate .. //depot/projects/nsched/sys/dev/bfe/if_bfe.c#5 integrate .. //depot/projects/nsched/sys/dev/bfe/if_bfereg.h#4 integrate .. //depot/projects/nsched/sys/dev/fdc/fdc_acpi.c#3 integrate .. //depot/projects/nsched/sys/dev/fdc/fdc_isa.c#3 integrate .. //depot/projects/nsched/sys/dev/md/md.c#9 integrate .. //depot/projects/nsched/sys/fs/autofs/autofs.h#1 branch .. //depot/projects/nsched/sys/fs/autofs/autofs_util.c#1 branch .. //depot/projects/nsched/sys/fs/autofs/autofs_vfsops.c#1 branch .. //depot/projects/nsched/sys/fs/autofs/autofs_vnops.c#1 branch .. //depot/projects/nsched/sys/geom/concat/g_concat.c#8 integrate .. //depot/projects/nsched/sys/geom/geom_io.c#7 integrate .. //depot/projects/nsched/sys/geom/label/g_label.c#6 integrate .. //depot/projects/nsched/sys/geom/mirror/g_mirror.c#5 integrate .. //depot/projects/nsched/sys/geom/raid3/g_raid3.c#6 integrate .. //depot/projects/nsched/sys/geom/stripe/g_stripe.c#7 integrate .. //depot/projects/nsched/sys/i386/bios/mca_machdep.c#3 integrate .. //depot/projects/nsched/sys/i386/bios/vpd.c#3 integrate .. //depot/projects/nsched/sys/i386/conf/NOTES#12 integrate .. //depot/projects/nsched/sys/i386/i386/mp_machdep.c#7 integrate .. //depot/projects/nsched/sys/i386/i386/pmap.c#16 integrate .. //depot/projects/nsched/sys/i386/i386/trap.c#5 integrate .. //depot/projects/nsched/sys/i386/include/param.h#5 integrate .. //depot/projects/nsched/sys/i386/linux/linux_machdep.c#3 integrate .. //depot/projects/nsched/sys/i4b/driver/i4b_ing.c#5 integrate .. //depot/projects/nsched/sys/i4b/driver/i4b_ipr.c#4 integrate .. //depot/projects/nsched/sys/i4b/driver/i4b_isppp.c#2 integrate .. //depot/projects/nsched/sys/i4b/driver/i4b_rbch.c#3 integrate .. //depot/projects/nsched/sys/i4b/driver/i4b_tel.c#3 integrate .. //depot/projects/nsched/sys/i4b/driver/i4b_trace.c#3 integrate .. //depot/projects/nsched/sys/i4b/layer4/i4b_i4bdrv.c#3 integrate .. //depot/projects/nsched/sys/i4b/layer4/i4b_l4.c#2 integrate .. //depot/projects/nsched/sys/ia64/ia64/exception.S#2 integrate .. //depot/projects/nsched/sys/ia64/ia64/locore.S#3 integrate .. //depot/projects/nsched/sys/ia64/ia64/pmap.c#11 integrate .. //depot/projects/nsched/sys/ia64/ia64/support.S#3 integrate .. //depot/projects/nsched/sys/ia64/ia64/syscall.S#3 integrate .. //depot/projects/nsched/sys/ia64/ia64/trap.c#5 integrate .. //depot/projects/nsched/sys/kern/init_main.c#12 integrate .. //depot/projects/nsched/sys/kern/kern_conf.c#8 integrate .. //depot/projects/nsched/sys/kern/kern_fork.c#10 integrate .. //depot/projects/nsched/sys/kern/kern_idle.c#4 integrate .. //depot/projects/nsched/sys/kern/kern_intr.c#7 integrate .. //depot/projects/nsched/sys/kern/kern_kse.c#26 integrate .. //depot/projects/nsched/sys/kern/kern_kthread.c#2 integrate .. //depot/projects/nsched/sys/kern/kern_prot.c#7 integrate .. //depot/projects/nsched/sys/kern/kern_sig.c#10 integrate .. //depot/projects/nsched/sys/kern/kern_switch.c#7 integrate .. //depot/projects/nsched/sys/kern/kern_thr.c#13 integrate .. //depot/projects/nsched/sys/kern/kern_thread.c#33 integrate .. //depot/projects/nsched/sys/kern/sched_4bsd.c#32 integrate .. //depot/projects/nsched/sys/kern/sched_ule.c#21 integrate .. //depot/projects/nsched/sys/kern/subr_bus.c#9 integrate .. //depot/projects/nsched/sys/kern/subr_smp.c#6 integrate .. //depot/projects/nsched/sys/kern/subr_trap.c#5 integrate .. //depot/projects/nsched/sys/kern/subr_turnstile.c#5 integrate .. //depot/projects/nsched/sys/modules/Makefile#9 integrate .. //depot/projects/nsched/sys/modules/aac/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/autofs/Makefile#1 branch .. //depot/projects/nsched/sys/modules/coda/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/coda5/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/cp/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/ctau/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/cx/Makefile#3 integrate .. //depot/projects/nsched/sys/modules/if_ppp/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/if_tap/Makefile#2 integrate .. //depot/projects/nsched/sys/modules/pf/Makefile#5 integrate .. //depot/projects/nsched/sys/net/if.c#9 integrate .. //depot/projects/nsched/sys/net/if.h#6 integrate .. //depot/projects/nsched/sys/net/if_sl.c#10 integrate .. //depot/projects/nsched/sys/netgraph/ng_socket.c#5 integrate .. //depot/projects/nsched/sys/pc98/conf/GENERIC#7 integrate .. //depot/projects/nsched/sys/pc98/pc98/atapi.c#2 integrate .. //depot/projects/nsched/sys/pc98/pc98/wd.c#4 integrate .. //depot/projects/nsched/sys/powerpc/powerpc/pmap.c#10 integrate .. //depot/projects/nsched/sys/powerpc/powerpc/trap.c#5 integrate .. //depot/projects/nsched/sys/sparc64/sparc64/trap.c#3 integrate .. //depot/projects/nsched/sys/sys/bio.h#5 integrate .. //depot/projects/nsched/sys/sys/param.h#12 integrate .. //depot/projects/nsched/sys/sys/proc.h#24 integrate .. //depot/projects/nsched/sys/sys/sched.h#12 integrate .. //depot/projects/nsched/sys/sys/smp.h#4 integrate .. //depot/projects/nsched/sys/sys/ucred.h#3 integrate .. //depot/projects/nsched/sys/vm/vm_zeroidle.c#4 integrate Differences ... ==== //depot/projects/nsched/sys/alpha/alpha/trap.c#3 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.118 2004/07/10 22:35:05 marcel Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/alpha/trap.c,v 1.120 2004/08/31 07:34:53 julian Exp $"); /* #include "opt_fix_unaligned_vax_fp.h" */ #include "opt_ddb.h" @@ -591,9 +591,6 @@ framep->tf_regs[FRAME_SP] = alpha_pal_rdusp(); userret(td, framep, sticks); mtx_assert(&Giant, MA_NOTOWNED); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif } return; @@ -665,7 +662,7 @@ if (td->td_ucred != p->p_ucred) cred_update_thread(td); if (p->p_flag & P_SA) - thread_user_enter(p, td); + thread_user_enter(td); #ifdef DIAGNOSTIC alpha_fpstate_check(td); #endif @@ -785,9 +782,6 @@ PTRACESTOP_SC(p, td, S_PT_SCX); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); mtx_assert(&sched_lock, MA_NOTOWNED); ==== //depot/projects/nsched/sys/alpha/conf/GENERIC#7 (text+ko) ==== @@ -18,7 +18,7 @@ # # For hardware specific information check HARDWARE.TXT # -# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.176 2004/08/28 21:42:15 wilko Exp $ +# $FreeBSD: src/sys/alpha/conf/GENERIC,v 1.177 2004/08/30 18:40:00 wilko Exp $ machine alpha cpu EV4 @@ -153,6 +153,7 @@ # PCI Ethernet NICs. device de # DEC/Intel DC21x4x (``Tulip'') +device em # Intel PRO/1000 adapter Gigabit Ethernet Card device txp # 3Com 3cR990 (``Typhoon'') device vx # 3Com 3c590, 3c595 (``Vortex'') ==== //depot/projects/nsched/sys/alpha/linux/linux_machdep.c#2 (text+ko) ==== @@ -27,7 +27,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_machdep.c,v 1.33 2004/02/04 21:52:52 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/alpha/linux/linux_machdep.c,v 1.34 2004/09/01 02:11:27 julian Exp $"); #include #include @@ -180,7 +180,7 @@ */ mtx_lock_spin(&sched_lock); TD_SET_CAN_RUN(td2); - setrunqueue(td2); + setrunqueue(td2, SRQ_BORING); mtx_unlock_spin(&sched_lock); td->td_retval[0] = p2->p_pid; ==== //depot/projects/nsched/sys/amd64/amd64/mp_machdep.c#7 (text+ko) ==== @@ -25,10 +25,11 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.244 2004/08/28 00:49:54 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/mp_machdep.c,v 1.246 2004/09/01 06:42:01 julian Exp $"); #include "opt_cpu.h" #include "opt_kstack_pages.h" +#include "opt_mp_watchdog.h" #include #include @@ -56,6 +57,7 @@ #include #include #include +#include #include #include #include @@ -111,7 +113,6 @@ */ static u_int logical_cpus; -static u_int logical_cpus_mask; /* used to hold the AP's until we are ready to release them */ static struct mtx ap_boot_mtx; @@ -136,7 +137,6 @@ static int start_ap(int apic_id); static void release_aps(void *dummy); -static int hlt_cpus_mask; static int hlt_logical_cpus; static struct sysctl_ctx_list logical_cpu_clist; static u_int bootMP_size; @@ -1067,8 +1067,15 @@ mp_grab_cpu_hlt(void) { u_int mask = PCPU_GET(cpumask); +#ifdef MP_WATCHDOG + u_int cpuid = PCPU_GET(cpuid); +#endif int retval; +#ifdef MP_WATCHDOG + ap_watchdog(cpuid); +#endif + retval = mask & hlt_cpus_mask; while (mask & hlt_cpus_mask) __asm __volatile("sti; hlt" : : : "memory"); ==== //depot/projects/nsched/sys/amd64/amd64/pmap.c#18 (text+ko) ==== @@ -75,7 +75,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.495 2004/08/28 00:49:54 obrien Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/pmap.c,v 1.496 2004/08/30 03:52:04 alc Exp $"); /* * Manages physical address maps. @@ -2451,7 +2451,7 @@ pv_entry_t pv, npv; #ifdef PMAP_REMOVE_PAGES_CURPROC_ONLY - if (!curthread || (pmap != vmspace_pmap(curthread->td_proc->p_vmspace))) { + if (pmap != vmspace_pmap(curthread->td_proc->p_vmspace)) { printf("warning: pmap_remove_pages called with non-current pmap\n"); return; } ==== //depot/projects/nsched/sys/amd64/amd64/trap.c#5 (text+ko) ==== @@ -38,7 +38,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.279 2004/08/16 22:56:20 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/amd64/trap.c,v 1.281 2004/08/31 07:34:53 julian Exp $"); /* * AMD64 Trap and System call handling @@ -259,7 +259,7 @@ case T_PAGEFLT: /* page fault */ if (td->td_pflags & TDP_SA) - thread_user_enter(p, td); + thread_user_enter(td); i = trap_pfault(&frame, TRUE); if (i == -1) goto userout; @@ -471,9 +471,6 @@ userret(td, &frame, sticks); mtx_assert(&Giant, MA_NOTOWNED); userout: -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif out: return; } @@ -698,7 +695,7 @@ if (td->td_ucred != p->p_ucred) cred_update_thread(td); if (p->p_flag & P_SA) - thread_user_enter(p, td); + thread_user_enter(td); params = (caddr_t)frame.tf_rsp + sizeof(register_t); code = frame.tf_rax; orig_tf_rflags = frame.tf_rflags; @@ -830,9 +827,6 @@ PTRACESTOP_SC(p, td, S_PT_SCX); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? syscallnames[code] : "???"); mtx_assert(&sched_lock, MA_NOTOWNED); ==== //depot/projects/nsched/sys/amd64/ia32/ia32_syscall.c#2 (text+ko) ==== @@ -36,7 +36,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.6 2003/11/17 08:58:14 peter Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/ia32/ia32_syscall.c,v 1.7 2004/08/31 06:12:12 julian Exp $"); /* * 386 Trap and System call handling @@ -247,9 +247,6 @@ */ STOPEVENT(p, S_SCX, code); -#ifdef DIAGNOSTIC - cred_free_thread(td); -#endif WITNESS_WARN(WARN_PANIC, NULL, "System call %s returning", (code >= 0 && code < SYS_MAXSYSCALL) ? freebsd32_syscallnames[code] : "???"); mtx_assert(&sched_lock, MA_NOTOWNED); ==== //depot/projects/nsched/sys/amd64/linux32/linux32_machdep.c#3 (text+ko) ==== @@ -29,7 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.3 2004/08/24 20:52:52 jhb Exp $"); +__FBSDID("$FreeBSD: src/sys/amd64/linux32/linux32_machdep.c,v 1.4 2004/09/01 02:11:27 julian Exp $"); #include #include @@ -503,7 +503,7 @@ */ mtx_lock_spin(&sched_lock); TD_SET_CAN_RUN(td2); - setrunqueue(td2); + setrunqueue(td2, SRQ_BORING); mtx_unlock_spin(&sched_lock); td->td_retval[0] = p2->p_pid; ==== //depot/projects/nsched/sys/cam/cam_periph.c#2 (text+ko) ==== @@ -28,7 +28,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.56 2003/11/08 10:56:57 scottl Exp $"); +__FBSDID("$FreeBSD: src/sys/cam/cam_periph.c,v 1.57 2004/08/30 20:14:21 gibbs Exp $"); #include #include @@ -126,7 +126,7 @@ * of our type assigned to this path, we are likely waiting for * final close on an old, invalidated, peripheral. If this is * the case, queue up a deferred call to the peripheral's async - * handler. If it looks like a mistaken re-alloation, complain. + * handler. If it looks like a mistaken re-allocation, complain. */ if ((periph = cam_periph_find(path, name)) != NULL) { ==== //depot/projects/nsched/sys/coda/cnode.h#3 (text+ko) ==== @@ -27,7 +27,7 @@ * Mellon the rights to redistribute these changes without encumbrance. * * @(#) src/sys/coda/cnode.h,v 1.1.1.1 1998/08/29 21:14:52 rvb Exp $ - * $FreeBSD: src/sys/coda/cnode.h,v 1.14 2004/06/16 09:46:32 phk Exp $ + * $FreeBSD: src/sys/coda/cnode.h,v 1.15 2004/09/01 01:19:51 brooks Exp $ * */ @@ -109,7 +109,7 @@ struct vattr c_vattr; /* attributes */ char *c_symlink; /* pointer to symbolic link */ u_short c_symlen; /* length of symbolic link */ - struct cdev *c_device; /* associated vnode device */ + struct cdev *c_device; /* associated vnode device */ ino_t c_inode; /* associated vnode inode */ struct cnode *c_next; /* links if on NetBSD machine */ }; @@ -153,10 +153,11 @@ struct vnode *mi_rootvp; struct mount *mi_vfsp; struct vcomm mi_vcomm; - struct cdev *dev; + struct cdev *dev; int mi_started; + LIST_ENTRY(coda_mntinfo) mi_list; }; -extern struct coda_mntinfo coda_mnttbl[]; /* indexed by minor device number */ +struct coda_mntinfo *dev2coda_mntinfo(struct cdev *dev); /* * vfs pointer to mount info @@ -188,20 +189,20 @@ }; /* cfs_psdev.h */ -extern int coda_call(struct coda_mntinfo *mntinfo, int inSize, int *outSize, caddr_t buffer); +int coda_call(struct coda_mntinfo *mntinfo, int inSize, int *outSize, caddr_t buffer); extern int coda_kernel_version; /* cfs_subr.h */ -extern int handleDownCall(int opcode, union outputArgs *out); -extern void coda_unmounting(struct mount *whoIam); -extern int coda_vmflush(struct cnode *cp); +int handleDownCall(int opcode, union outputArgs *out); +void coda_unmounting(struct mount *whoIam); +int coda_vmflush(struct cnode *cp); /* cfs_vnodeops.h */ -extern struct cnode *make_coda_node(CodaFid *fid, struct mount *vfsp, short type); -extern int coda_vnodeopstats_init(void); +struct cnode *make_coda_node(CodaFid *fid, struct mount *vfsp, short type); +int coda_vnodeopstats_init(void); /* coda_vfsops.h */ -extern struct mount *devtomp(struct cdev *dev); +struct mount *devtomp(struct cdev *dev); /* sigh */ #define CODA_RDWR ((u_long) 31) ==== //depot/projects/nsched/sys/coda/coda_fbsd.c#6 (text+ko) ==== @@ -29,9 +29,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/coda/coda_fbsd.c,v 1.36 2004/07/15 08:25:59 phk Exp $"); - -#include "vcoda.h" +__FBSDID("$FreeBSD: src/sys/coda/coda_fbsd.c,v 1.38 2004/09/01 01:19:51 brooks Exp $"); #include #include @@ -52,20 +50,6 @@ #include #include -/* - From: "Jordan K. Hubbard" - Subject: Re: New 3.0 SNAPshot CDROM about ready for production.. - To: "Robert.V.Baron" - Date: Fri, 20 Feb 1998 15:57:01 -0800 - - > Also I need a character device major number. (and might want to reserve - > a block of 10 syscalls.) - - Just one char device number? No block devices? Very well, cdev 93 is yours! -*/ - -#define VC_DEV_NO 93 - static struct cdevsw codadevsw = { .d_version = D_VERSION, .d_flags = D_NEEDGIANT, @@ -76,21 +60,39 @@ .d_ioctl = vc_nb_ioctl, .d_poll = vc_nb_poll, .d_name = "Coda", - .d_maj = VC_DEV_NO, }; +static eventhandler_tag clonetag; + +static LIST_HEAD(, coda_mntinfo) coda_mnttbl; + int vcdebug = 1; #define VCDEBUG if (vcdebug) printf +/* for DEVFS, using bpf & tun drivers as examples*/ +static void coda_fbsd_clone(void *arg, char *name, int namelen, + struct cdev **dev); + static int codadev_modevent(module_t mod, int type, void *data) { + struct coda_mntinfo *mnt; switch (type) { case MOD_LOAD: + LIST_INIT(&coda_mnttbl); + clonetag = EVENTHANDLER_REGISTER(dev_clone, coda_fbsd_clone, + 0, 1000); break; case MOD_UNLOAD: - return (EBUSY); + EVENTHANDLER_DEREGISTER(dev_clone, clonetag); + while ((mnt = LIST_FIRST(&coda_mnttbl)) != NULL) { + LIST_REMOVE(mnt, mi_list); + destroy_dev(mnt->dev); + free(mnt, M_CODA); + } + break; + default: return (EOPNOTSUPP); } @@ -101,7 +103,7 @@ codadev_modevent, NULL }; -DECLARE_MODULE(codadev, codadev_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE+VC_DEV_NO); +DECLARE_MODULE(codadev, codadev_mod, SI_SUB_DRIVERS, SI_ORDER_MIDDLE); int coda_fbsd_getpages(v) @@ -170,14 +172,6 @@ #endif } - -/* for DEVFS, using bpf & tun drivers as examples*/ -static void coda_fbsd_drvinit(void *unused); -static void coda_fbsd_drvuninit(void *unused); -static void coda_fbsd_clone(void *arg, char *name, int namelen, struct cdev **dev); - -static eventhandler_tag clonetag; - static void coda_fbsd_clone(arg, name, namelen, dev) void *arg; char *name; @@ -185,6 +179,7 @@ struct cdev **dev; { int u; + struct coda_mntinfo *mnt; if (*dev != NULL) return; @@ -192,31 +187,19 @@ return; *dev = make_dev(&codadevsw,unit2minor(u),UID_ROOT,GID_WHEEL,0600,"cfs%d",u); - coda_mnttbl[unit2minor(u)].dev = *dev; - + mnt = malloc(sizeof(struct coda_mntinfo), M_CODA, M_WAITOK|M_ZERO); + LIST_INSERT_HEAD(&coda_mnttbl, mnt, mi_list); } -static void coda_fbsd_drvinit(unused) - void *unused; +struct coda_mntinfo * +dev2coda_mntinfo(struct cdev *dev) { - int i; + struct coda_mntinfo *mnt; - clonetag = EVENTHANDLER_REGISTER(dev_clone,coda_fbsd_clone,0,1000); - for(i=0;idev == dev) + break; + } -static void coda_fbsd_drvuninit(unused) - void *unused; -{ - int i; - - EVENTHANDLER_DEREGISTER(dev_clone,clonetag); - for(i=0;i -__FBSDID("$FreeBSD: src/sys/coda/coda_psdev.c,v 1.30 2004/06/16 09:46:32 phk Exp $"); +__FBSDID("$FreeBSD: src/sys/coda/coda_psdev.c,v 1.32 2004/09/01 01:19:51 brooks Exp $"); extern int coda_nc_initialized; /* Set if cache has been initialized */ -#include - #include #include #include @@ -122,17 +120,16 @@ int mode; struct thread *td; /* NetBSD only */ { - register struct vcomm *vcp; + struct vcomm *vcp; + struct coda_mntinfo *mnt; ENTRY; - if (minor(dev) >= NVCODA || minor(dev) < 0) - return(ENXIO); - if (!coda_nc_initialized) coda_nc_init(); - vcp = &coda_mnttbl[minor(dev)].mi_vcomm; + mnt = dev2coda_mntinfo(dev); + vcp = &mnt->mi_vcomm; if (VC_OPEN(vcp)) return(EBUSY); @@ -141,8 +138,8 @@ INIT_QUEUE(vcp->vc_replys); MARK_VC_OPEN(vcp); - coda_mnttbl[minor(dev)].mi_vfsp = NULL; - coda_mnttbl[minor(dev)].mi_rootvp = NULL; + mnt->mi_vfsp = NULL; + mnt->mi_rootvp = NULL; return(0); } @@ -161,10 +158,7 @@ ENTRY; - if (minor(dev) >= NVCODA || minor(dev) < 0) - return(ENXIO); - - mi = &coda_mnttbl[minor(dev)]; + mi = dev2coda_mntinfo(dev); vcp = &(mi->mi_vcomm); if (!VC_OPEN(vcp)) @@ -243,10 +237,7 @@ ENTRY; - if (minor(dev) >= NVCODA || minor(dev) < 0) - return(ENXIO); - - vcp = &coda_mnttbl[minor(dev)].mi_vcomm; + vcp = &dev2coda_mntinfo(dev)->mi_vcomm; /* Get message at head of request queue. */ if (EMPTY(vcp->vc_requests)) return(0); /* Nothing to read */ @@ -301,11 +292,8 @@ ENTRY; - if (minor(dev) >= NVCODA || minor(dev) < 0) - return(ENXIO); + vcp = &dev2coda_mntinfo(dev)->mi_vcomm; - vcp = &coda_mnttbl[minor(dev)].mi_vcomm; - /* Peek at the opcode, unique without transfering the data. */ uiop->uio_rw = UIO_WRITE; error = uiomove((caddr_t)buf, sizeof(int) * 2, uiop); @@ -450,10 +438,7 @@ ENTRY; - if (minor(dev) >= NVCODA || minor(dev) < 0) - return(ENXIO); - - vcp = &coda_mnttbl[minor(dev)].mi_vcomm; + vcp = &dev2coda_mntinfo(dev)->mi_vcomm; event_msk = events & (POLLIN|POLLRDNORM); if (!event_msk) ==== //depot/projects/nsched/sys/coda/coda_vfsops.c#5 (text+ko) ==== @@ -41,9 +41,7 @@ */ #include -__FBSDID("$FreeBSD: src/sys/coda/coda_vfsops.c,v 1.51 2004/07/30 22:08:49 phk Exp $"); - -#include +__FBSDID("$FreeBSD: src/sys/coda/coda_vfsops.c,v 1.53 2004/09/01 01:19:51 brooks Exp $"); #include #include @@ -69,7 +67,6 @@ #define ENTRY if(coda_vfsop_print_entry) myprintf(("Entered %s\n",__func__)) struct vnode *coda_ctlvp; -struct coda_mntinfo coda_mnttbl[NVCODA]; /* indexed by minor device number */ /* structure to keep statistics of internally generated/satisfied calls */ @@ -161,15 +158,10 @@ return(ENXIO); } - if (minor(dev) >= NVCODA || minor(dev) < 0) { - MARK_INT_FAIL(CODA_MOUNT_STATS); - return(ENXIO); - } - /* * Initialize the mount record and link it to the vfs struct */ - mi = &coda_mnttbl[minor(dev)]; + mi = dev2coda_mntinfo(dev); if (!VC_OPEN(&mi->mi_vcomm)) { MARK_INT_FAIL(CODA_MOUNT_STATS); ==== //depot/projects/nsched/sys/conf/Makefile.alpha#3 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.alpha -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.alpha 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.alpha,v 1.130 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.alpha,v 1.131 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 .if !defined(S) .if exists(./@/.) ==== //depot/projects/nsched/sys/conf/Makefile.amd64#3 (text+ko) ==== @@ -2,7 +2,7 @@ # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 # from FreeBSD: src/sys/conf/Makefile.i386,v 1.255 2002/02/20 23:35:49 -# $FreeBSD: src/sys/conf/Makefile.amd64,v 1.11 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.amd64,v 1.12 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -18,7 +18,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 STD8X16FONT?= iso ==== //depot/projects/nsched/sys/conf/Makefile.arm#2 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.arm -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.arm,v 1.1 2004/05/14 11:49:40 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.arm,v 1.2 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 # Temporary stuff while we're still embryonic NO_MODULES?= yes ==== //depot/projects/nsched/sys/conf/Makefile.i386#3 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.i386,v 1.260 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.i386,v 1.261 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 STD8X16FONT?= iso ==== //depot/projects/nsched/sys/conf/Makefile.ia64#3 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.ia64 -- with config changes. # Copyright 1990 W. Jolitz # from: src/sys/conf/Makefile.alpha,v 1.76 -# $FreeBSD: src/sys/conf/Makefile.ia64,v 1.57 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.ia64,v 1.58 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -19,7 +19,7 @@ GCC3= you bet # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 STD8X16FONT?= iso ==== //depot/projects/nsched/sys/conf/Makefile.pc98#3 (text+ko) ==== @@ -3,7 +3,7 @@ # Makefile.i386 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.pc98,v 1.161 2004/05/09 22:29:37 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.pc98,v 1.162 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -19,7 +19,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 .if !defined(S) .if exists(./@/.) ==== //depot/projects/nsched/sys/conf/Makefile.powerpc#4 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.powerpc -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.powerpc,v 1.270 2004/08/13 14:30:26 ru Exp $ +# $FreeBSD: src/sys/conf/Makefile.powerpc,v 1.271 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 # Temporary stuff while we're still embryonic NO_MODULES?= yes ==== //depot/projects/nsched/sys/conf/Makefile.sparc64#3 (text+ko) ==== @@ -1,7 +1,7 @@ # Makefile.sparc64 -- with config changes. # Copyright 1990 W. Jolitz # from: @(#)Makefile.i386 7.1 5/10/91 -# $FreeBSD: src/sys/conf/Makefile.sparc64,v 1.28 2004/05/09 22:29:38 cognet Exp $ +# $FreeBSD: src/sys/conf/Makefile.sparc64,v 1.29 2004/08/30 23:03:56 peter Exp $ # # Makefile for FreeBSD # @@ -17,7 +17,7 @@ # # Which version of config(8) is required. -%VERSREQ= 500013 +%VERSREQ= 600000 STD8X16FONT?= iso ==== //depot/projects/nsched/sys/conf/NOTES#14 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/NOTES,v 1.1269 2004/08/29 15:03:06 ru Exp $ +# $FreeBSD: src/sys/conf/NOTES,v 1.1271 2004/09/01 01:19:51 brooks Exp $ # # NOTES -- Lines that can be cut/pasted into kernel and hints configs. # @@ -817,7 +817,7 @@ # Coda stuff: options CODA #CODA filesystem. -device vcoda 4 #coda minicache <-> venus comm. +device vcoda #coda minicache <-> venus comm. # Use the old Coda 5.x venus<->kernel interface instead of the new # realms-aware 6.x protocol. #options CODA_COMPAT_5 @@ -1869,32 +1869,32 @@ # snd_vibes: S3 Sonicvibes PCI. # snd_uaudio: USB audio. -device "snd_ad1816" -device "snd_als4000" -#device "snd_au88x0" +device snd_ad1816 +device snd_als4000 +#device snd_au88x0 device snd_cmi -device "snd_cs4281" +device snd_cs4281 device snd_csa -device "snd_ds1" -device "snd_emu10k1" -device "snd_es137x" +device snd_ds1 +device snd_emu10k1 +device snd_es137x device snd_ess -device "snd_fm801" +device snd_fm801 device snd_gusc device snd_ich device snd_maestro -device "snd_maestro3" +device snd_maestro3 device snd_mss device snd_neomagic -device "snd_sb16" -device "snd_sb8" +device snd_sb16 +device snd_sb8 device snd_sbc device snd_solo -device "snd_t4dwave" -device "snd_via8233" -device "snd_via82c686" +device snd_t4dwave +device snd_via8233 +device snd_via82c686 device snd_vibes -#device "snd_vortex1" +#device snd_vortex1 device snd_uaudio # For non-pnp sound cards: ==== //depot/projects/nsched/sys/conf/files#21 (text+ko) ==== @@ -1,4 +1,4 @@ -# $FreeBSD: src/sys/conf/files,v 1.947 2004/08/29 11:26:36 des Exp $ +# $FreeBSD: src/sys/conf/files,v 1.948 2004/08/30 23:03:56 peter Exp $ # # The long compile-with and dependency lines are required because of # limitations in config: backslash-newline doesn't work in strings, and @@ -82,7 +82,7 @@ cam/scsi/scsi_ses.c optional ses cam/scsi/scsi_targ_bh.c optional targbh cam/scsi/scsi_target.c optional targ -coda/coda_fbsd.c count vcoda +coda/coda_fbsd.c optional vcoda coda/coda_namecache.c optional vcoda >>> TRUNCATED FOR MAIL (1000 lines) <<<