CVS commit: src/tests/dev/sysmon
Module Name:src Committed By: pgoyette Date: Thu Dec 30 04:01:59 UTC 2010 Modified Files: src/tests/dev/sysmon: t_swsensor.sh Log Message: Now that we update the callout timer as soon as it is updated, we no longer need to have an extended wait for the first powerd event to occur. Revert that portion of previous commit. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/dev/sysmon/t_swsensor.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/sysmon/t_swsensor.sh diff -u src/tests/dev/sysmon/t_swsensor.sh:1.2 src/tests/dev/sysmon/t_swsensor.sh:1.3 --- src/tests/dev/sysmon/t_swsensor.sh:1.2 Wed Dec 29 19:21:39 2010 +++ src/tests/dev/sysmon/t_swsensor.sh Thu Dec 30 04:01:59 2010 @@ -1,4 +1,4 @@ -# $NetBSD: t_swsensor.sh,v 1.2 2010/12/29 19:21:39 pgoyette Exp $ +# $NetBSD: t_swsensor.sh,v 1.3 2010/12/30 04:01:59 pgoyette Exp $ get_sensor_info() { rump.envstat -x | \ @@ -141,7 +141,7 @@ # Step 5 - if sensor provides hw limit, make sure it works if [ $1 -ne 0 -a ${skip_events} -eq 0 ] ; then rump.sysctl -w hw.swsensor.cur_value=$(( $3 - $5 )) - sleep 15 + sleep 5 cnt=$(get_powerd_event_count) if [ ${cnt} -lt ${expected_event} ] ; then atf_fail "5: No event triggered"
CVS commit: src/sys/dev/sysmon
Module Name:src Committed By: pgoyette Date: Thu Dec 30 04:00:00 UTC 2010 Modified Files: src/sys/dev/sysmon: sysmon_envsys.c sysmon_envsys_events.c sysmon_envsysvar.h Log Message: When the user updates the sensor device's refresh timer, reset the callout immediately rather than waiting for the previous timer to expire. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/dev/sysmon/sysmon_envsys.c cvs rdiff -u -r1.96 -r1.97 src/sys/dev/sysmon/sysmon_envsys_events.c cvs rdiff -u -r1.37 -r1.38 src/sys/dev/sysmon/sysmon_envsysvar.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/sysmon/sysmon_envsys.c diff -u src/sys/dev/sysmon/sysmon_envsys.c:1.111 src/sys/dev/sysmon/sysmon_envsys.c:1.112 --- src/sys/dev/sysmon/sysmon_envsys.c:1.111 Thu Dec 16 16:08:57 2010 +++ src/sys/dev/sysmon/sysmon_envsys.c Thu Dec 30 03:59:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys.c,v 1.111 2010/12/16 16:08:57 njoly Exp $ */ +/* $NetBSD: sysmon_envsys.c,v 1.112 2010/12/30 03:59:59 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -64,7 +64,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.111 2010/12/16 16:08:57 njoly Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys.c,v 1.112 2010/12/30 03:59:59 pgoyette Exp $"); #include #include @@ -1175,6 +1175,7 @@ * Restore default timeout value. */ sme->sme_events_timeout = SME_EVENTS_DEFTIMEOUT; + sme_schedule_callout(sme); sysmon_envsys_release(sme, false); } mutex_exit(&sme_global_mtx); @@ -1214,8 +1215,10 @@ * ... * */ - if (!sme->sme_events_timeout) + if (sme->sme_events_timeout == 0) { sme->sme_events_timeout = SME_EVENTS_DEFTIMEOUT; + sme_schedule_callout(sme); + } if (!prop_dictionary_set_uint64(pdict, "refresh-timeout", sme->sme_events_timeout)) { @@ -1805,7 +1808,10 @@ error = EINVAL; else { mutex_enter(&sme->sme_mtx); -sme->sme_events_timeout = refresh_timo; +if (sme->sme_events_timeout != refresh_timo) { + sme->sme_events_timeout = refresh_timo; + sme_schedule_callout(sme); +} mutex_exit(&sme->sme_mtx); } } Index: src/sys/dev/sysmon/sysmon_envsys_events.c diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.96 src/sys/dev/sysmon/sysmon_envsys_events.c:1.97 --- src/sys/dev/sysmon/sysmon_envsys_events.c:1.96 Wed Dec 15 17:17:17 2010 +++ src/sys/dev/sysmon/sysmon_envsys_events.c Thu Dec 30 03:59:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsys_events.c,v 1.96 2010/12/15 17:17:17 pgoyette Exp $ */ +/* $NetBSD: sysmon_envsys_events.c,v 1.97 2010/12/30 03:59:59 pgoyette Exp $ */ /*- * Copyright (c) 2007, 2008 Juan Romero Pardines. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.96 2010/12/15 17:17:17 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.97 2010/12/30 03:59:59 pgoyette Exp $"); #include #include @@ -486,16 +486,10 @@ sme_events_init(struct sysmon_envsys *sme) { int error = 0; - uint64_t timo; KASSERT(sme != NULL); KASSERT(mutex_owned(&sme->sme_mtx)); - if (sme->sme_events_timeout) - timo = sme->sme_events_timeout * hz; - else - timo = SME_EVTIMO; - error = workqueue_create(&sme->sme_wq, sme->sme_name, sme_events_worker, sme, PRI_NONE, IPL_SOFTCLOCK, WQ_MPSAFE); if (error) @@ -504,8 +498,8 @@ mutex_init(&sme->sme_callout_mtx, MUTEX_DEFAULT, IPL_SOFTCLOCK); callout_init(&sme->sme_callout, CALLOUT_MPSAFE); callout_setfunc(&sme->sme_callout, sme_events_check, sme); - callout_schedule(&sme->sme_callout, timo); sme->sme_flags |= SME_CALLOUT_INITIALIZED; + sme_schedule_callout(sme); DPRINTF(("%s: events framework initialized for '%s'\n", __func__, sme->sme_name)); @@ -513,6 +507,30 @@ } /* + * sme_schedule_callout + * + * (Re)-schedule the device's callout timer + */ +void +sme_schedule_callout(struct sysmon_envsys *sme) +{ + uint64_t timo; + + KASSERT(sme != NULL); + + if ((sme->sme_flags & SME_CALLOUT_INITIALIZED) == 0) + return; + + if (sme->sme_events_timeout) + timo = sme->sme_events_timeout * hz; + else + timo = SME_EVTIMO; + + callout_stop(&sme->sme_callout); + callout_schedule(&sme->sme_callout, timo); +} + +/* * sme_events_destroy: * * + Destroys the event framework for this device: callout @@ -630,7 +648,7 @@ else timo = SME_EVTIMO; if (!sysmon_low_power) - callout_schedule(&sme->sme_callout, timo); + sme_schedule_callout(sme); mutex_exit(&sme->sme_callout_mtx); } Index: src/sys/dev/sysmon/sysmon_envsysvar.h diff -u src/sys/dev/sysmon/sysmon_envsysvar.h:1.37 src/sys/dev/sysmon/sysmon_envsysvar.h:1.38 --- src/sys/dev/sysmon/sysmon_envsysvar.h:1.37 Wed Dec 15 17:17:17 2010 +++ src/sys/dev/sysmon/sysmon_envsysvar.h Thu Dec 30 03:59:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: sysmon_envsysvar.h,v 1.37 2010/12/15 17:17:17 pgoy
CVS commit: src/external/gpl2/xcvs/lib/libcvs
Module Name:src Committed By: pgoyette Date: Thu Dec 30 00:46:38 UTC 2010 Modified Files: src/external/gpl2/xcvs/lib/libcvs: Makefile Log Message: Fix typo - let the build proceed To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/gpl2/xcvs/lib/libcvs/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/gpl2/xcvs/lib/libcvs/Makefile diff -u src/external/gpl2/xcvs/lib/libcvs/Makefile:1.9 src/external/gpl2/xcvs/lib/libcvs/Makefile:1.10 --- src/external/gpl2/xcvs/lib/libcvs/Makefile:1.9 Wed Dec 29 19:53:32 2010 +++ src/external/gpl2/xcvs/lib/libcvs/Makefile Thu Dec 30 00:46:38 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.9 2010/12/29 19:53:32 christos Exp $ +# $NetBSD: Makefile,v 1.10 2010/12/30 00:46:38 pgoyette Exp $ LIBISPRIVATE= yes @@ -20,6 +20,6 @@ .include # bsd.lib.mk includes bsd.sys.mk which defines the suffix rules, so we -@ need to override after. +# need to override after. .y.c .y.h: @true
CVS commit: src/external/gpl2/lvm2/dist/lib/device
Module Name:src Committed By: haad Date: Wed Dec 29 23:14:21 UTC 2010 Modified Files: src/external/gpl2/lvm2/dist/lib/device: dev-io.c Log Message: Fix my yesterday fix and finally make _get_dev_size recognise partition size for device without DIOWEDGEINFO, where DIOCGDINFO is used. Patch tested by Martin Mersberger. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/gpl2/lvm2/dist/lib/device/dev-io.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/lvm2/dist/lib/device/dev-io.c diff -u src/external/gpl2/lvm2/dist/lib/device/dev-io.c:1.9 src/external/gpl2/lvm2/dist/lib/device/dev-io.c:1.10 --- src/external/gpl2/lvm2/dist/lib/device/dev-io.c:1.9 Wed Dec 29 00:14:04 2010 +++ src/external/gpl2/lvm2/dist/lib/device/dev-io.c Wed Dec 29 23:14:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dev-io.c,v 1.9 2010/12/29 00:14:04 haad Exp $ */ +/* $NetBSD: dev-io.c,v 1.10 2010/12/29 23:14:21 haad Exp $ */ /* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. @@ -268,6 +268,7 @@ #ifdef __NetBSD__ struct disklabel lab; struct dkwedge_info dkw; + struct stat stat; #endif if ((fd = open(name, O_RDONLY)) < 0) { @@ -285,8 +286,12 @@ "DIOCGDINFO for disk device %s", name); close(fd); return 0; - } else - *size = lab.d_nsectors; + } else { + if (fstat(fd, &stat) < 0) +log_debug("fstat on device %s failure", name); + + *size = lab.d_partitions[DISKPART(stat.st_rdev)].p_size; + } } else *size = dkw.dkw_size; #else
CVS commit: src/tests/fs/common
Module Name:src Committed By: yamt Date: Wed Dec 29 22:56:59 UTC 2010 Modified Files: src/tests/fs/common: fstest_puffs.c Log Message: don't assume atomic read/write on socketpair. puffs_kargs at least is too large to assume atomic read/write. this makes some tests including fs/puffs/t_basic pass on my environment. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/fs/common/fstest_puffs.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/fs/common/fstest_puffs.c diff -u src/tests/fs/common/fstest_puffs.c:1.6 src/tests/fs/common/fstest_puffs.c:1.7 --- src/tests/fs/common/fstest_puffs.c:1.6 Mon Nov 1 16:27:07 2010 +++ src/tests/fs/common/fstest_puffs.c Wed Dec 29 22:56:59 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: fstest_puffs.c,v 1.6 2010/11/01 16:27:07 pooka Exp $ */ +/* $NetBSD: fstest_puffs.c,v 1.7 2010/12/29 22:56:59 yamt Exp $ */ /* * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -55,6 +55,44 @@ static bool mayquit = false; +static ssize_t +xread(int fd, void *vp, size_t n) +{ + size_t left; + + left = n; + do { + ssize_t ssz; + + ssz = read(fd, vp, left); + if (ssz == -1) { + return ssz; + } + left -= ssz; + vp = (char *)vp + ssz; + } while (left > 0); + return n; +} + +static ssize_t +xwrite(int fd, const void *vp, size_t n) +{ + size_t left; + + left = n; + do { + ssize_t ssz; + + ssz = write(fd, vp, left); + if (ssz == -1) { + return ssz; + } + left -= ssz; + vp = (const char *)vp + ssz; + } while (left > 0); + return n; +} + /* * Threads which shovel data between comfd and /dev/puffs. * (cannot use polling since fd's are in different namespaces) @@ -102,7 +140,7 @@ } n = phdr->pth_framelen; - if (write(comfd, buf, n) != n) { + if (xwrite(comfd, buf, n) != n) { fprintf(stderr, "readshovel write %zd / %d\n", n, errno); break; } @@ -143,7 +181,7 @@ toread = sizeof(struct putter_hdr); assert(toread < BUFSIZE); do { - n = read(comfd, buf+off, toread); + n = xread(comfd, buf+off, toread); if (n <= 0) { fprintf(stderr, "writeshovel read %zd / %d\n", n, errno); @@ -269,30 +307,30 @@ } /* read args */ - if ((n = read(sv[1], &len, sizeof(len))) != sizeof(len)) + if ((n = xread(sv[1], &len, sizeof(len))) != sizeof(len)) err(1, "mp 1 %zd", n); if (len > MAXPATHLEN) err(1, "mntpath > MAXPATHLEN"); - if ((size_t)read(sv[1], args->pta_dir, len) != len) + if ((size_t)xread(sv[1], args->pta_dir, len) != len) err(1, "mp 2"); - if (read(sv[1], &len, sizeof(len)) != sizeof(len)) + if (xread(sv[1], &len, sizeof(len)) != sizeof(len)) err(1, "fn 1"); if (len > MAXPATHLEN) err(1, "devpath > MAXPATHLEN"); - if ((size_t)read(sv[1], args->pta_dev, len) != len) + if ((size_t)xread(sv[1], args->pta_dev, len) != len) err(1, "fn 2"); - if (read(sv[1], &mntflags, sizeof(mntflags)) != sizeof(mntflags)) + if (xread(sv[1], &mntflags, sizeof(mntflags)) != sizeof(mntflags)) err(1, "mntflags"); - if (read(sv[1], &args->pta_pargslen, sizeof(args->pta_pargslen)) + if (xread(sv[1], &args->pta_pargslen, sizeof(args->pta_pargslen)) != sizeof(args->pta_pargslen)) err(1, "puffstest_args len"); args->pta_pargs = malloc(args->pta_pargslen); if (args->pta_pargs == NULL) err(1, "malloc"); - if (read(sv[1], args->pta_pargs, args->pta_pargslen) + if (xread(sv[1], args->pta_pargs, args->pta_pargslen) != (ssize_t)args->pta_pargslen) err(1, "puffstest_args"); - if (read(sv[1], pflags, sizeof(*pflags)) != sizeof(*pflags)) + if (xread(sv[1], pflags, sizeof(*pflags)) != sizeof(*pflags)) err(1, "pflags"); args->pta_childpid = childpid;
CVS commit: src/sys/arch/i386/stand/lib
Module Name:src Committed By: jakllsch Date: Wed Dec 29 22:40:46 UTC 2010 Modified Files: src/sys/arch/i386/stand/lib: bios_disk.S Log Message: Utilize movz[bw]l to save a few instrutions and bytes of .text. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/i386/stand/lib/bios_disk.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/lib/bios_disk.S diff -u src/sys/arch/i386/stand/lib/bios_disk.S:1.19 src/sys/arch/i386/stand/lib/bios_disk.S:1.20 --- src/sys/arch/i386/stand/lib/bios_disk.S:1.19 Sat Nov 21 11:52:57 2009 +++ src/sys/arch/i386/stand/lib/bios_disk.S Wed Dec 29 22:40:46 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: bios_disk.S,v 1.19 2009/11/21 11:52:57 dsl Exp $ */ +/* $NetBSD: bios_disk.S,v 1.20 2010/12/29 22:40:46 jakllsch Exp $ */ /* * Ported to boot 386BSD by Julian Elischer (jul...@tfs.com) Sept 1992 @@ -82,8 +82,7 @@ calll _C_LABEL(real_to_prot) # back to protected mode .code32 - xorl %eax, %eax - movw %bx, %ax # return value in %ax + movzwl %bx, %eax # return value in %eax pop %edi pop %edx @@ -146,7 +145,7 @@ calll _C_LABEL(real_to_prot) # back to protected mode .code32 - andl $0x, %eax + movzwl %ax, %eax # return value in %eax pop %edi pop %esi @@ -246,8 +245,7 @@ calll _C_LABEL(real_to_prot) # switch back .code32 - xorl %eax, %eax - movb %dl, %al # return value in %ax + movzbl %dl, %eax # return value in %eax cmpw $0xaa55, %bx sete %dl @@ -304,8 +302,7 @@ calll _C_LABEL(real_to_prot) # back to protected mode .code32 - xorl %eax, %eax - movw %bx, %ax # return value in %ax + movzwl %bx, %eax # return value in %eax pop %edi pop %esi @@ -346,8 +343,7 @@ calll _C_LABEL(real_to_prot) # back to protected mode .code32 - xorl %eax, %eax - movb %bl, %al # return value in %ax + movzbl %bl, %eax # return value in %eax pop %edi pop %esi
CVS commit: src/external/gpl2/xcvs/lib/libcvs
Module Name:src Committed By: christos Date: Wed Dec 29 19:53:32 UTC 2010 Modified Files: src/external/gpl2/xcvs/lib/libcvs: Makefile Log Message: real override for yacc rules. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/external/gpl2/xcvs/lib/libcvs/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/gpl2/xcvs/lib/libcvs/Makefile diff -u src/external/gpl2/xcvs/lib/libcvs/Makefile:1.8 src/external/gpl2/xcvs/lib/libcvs/Makefile:1.9 --- src/external/gpl2/xcvs/lib/libcvs/Makefile:1.8 Wed Oct 28 22:36:48 2009 +++ src/external/gpl2/xcvs/lib/libcvs/Makefile Wed Dec 29 14:53:32 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.8 2009/10/29 02:36:48 christos Exp $ +# $NetBSD: Makefile,v 1.9 2010/12/29 19:53:32 christos Exp $ LIBISPRIVATE= yes @@ -9,8 +9,6 @@ DIST= ${IDIST}/lib .PATH: ${DIST} CPPFLAGS+=-I${DIST} -.y.c .y.h: - @true SRCS= __fpending.c asnprintf.c basename.c canon-host.c canonicalize.c \ chdir-long.c closeout.c cycle-check.c dirname.c dup-safer.c exitfail.c \ @@ -20,6 +18,8 @@ stripslash.c vasnprintf.c xalloc-die.c xgetcwd.c xgethostname.c \ xmalloc.c xreadlink.c yesno.c -getdate.c: getdate.y - .include +# bsd.lib.mk includes bsd.sys.mk which defines the suffix rules, so we +@ need to override after. +.y.c .y.h: + @true
CVS commit: src/tests/dev/sysmon
Module Name:src Committed By: pgoyette Date: Wed Dec 29 19:21:39 UTC 2010 Modified Files: src/tests/dev/sysmon: t_swsensor.sh Log Message: Various cleanup (most from pooka@) - Does not require root access on the host, only in the rump environment (which it gets by default) - Manual clean-up of powerd process and rump-server socket is not necessary - happens automatically - Don't use a global, absolute path for the rump-server socket For alarm_sensor, make sure events are still delivered after 'envstat -S' (the cur_value was deliberately left at an alarm level and should not be affected by the reset). No longer need to skip the alarm_sensor and limit_sensor tests, since pooka fixed passing of proplist to built-in modules. Increase wait time for first powerd event report. (This should not be needed, so there's probably a bug somewhere, but the increased timeout lets us validate the rest of the sensor functionality.) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/dev/sysmon/t_swsensor.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/sysmon/t_swsensor.sh diff -u src/tests/dev/sysmon/t_swsensor.sh:1.1 src/tests/dev/sysmon/t_swsensor.sh:1.2 --- src/tests/dev/sysmon/t_swsensor.sh:1.1 Mon Dec 20 04:56:18 2010 +++ src/tests/dev/sysmon/t_swsensor.sh Wed Dec 29 19:21:39 2010 @@ -1,4 +1,4 @@ -# $NetBSD: t_swsensor.sh,v 1.1 2010/12/20 04:56:18 pgoyette Exp $ +# $NetBSD: t_swsensor.sh,v 1.2 2010/12/29 19:21:39 pgoyette Exp $ get_sensor_info() { rump.envstat -x | \ @@ -56,17 +56,11 @@ atf_set require.progs rump.powerd rump.envstat rump.modload \ rump.halt rump.sysctl rump_allserver \ sed grep - atf_set require.user root } common_cleanup() { - if [ -n "$(jobs)" ] ; then - kill %1 # get rid of our rump.powerd - fi - rump.modunload swsensor rump.halt - rm -f ${RUMP_SERVER} } create_envsys_conf_files() { @@ -95,10 +89,6 @@ # $5 difference from limit to trigger event common_body() { - if [ $1 -ne 0 ] ; then - atf_skip "rump.modload doesn't pass proplist attributes" - fi - # Start the rump-server process and load the module start_rump "-i mode=$1 -i value=$2 -i limit=$3" @@ -151,7 +141,7 @@ # Step 5 - if sensor provides hw limit, make sure it works if [ $1 -ne 0 -a ${skip_events} -eq 0 ] ; then rump.sysctl -w hw.swsensor.cur_value=$(( $3 - $5 )) - sleep 5 + sleep 15 cnt=$(get_powerd_event_count) if [ ${cnt} -lt ${expected_event} ] ; then atf_fail "5: No event triggered" @@ -240,7 +230,13 @@ sleep 5 cnt=$(get_powerd_event_count) if [ ${cnt} -ge ${expected_event} ] ; then - atf_fail "9: Event triggered after reset" + if [ $1 -ne 2 ] ; then +atf_fail "11b Event triggered after reset" + fi + evt=$( check_powerd_event ${cnt} "critical-under") + if [ -n "${evt}" ] ; then +atf_fail "11a: ${evt}" + fi fi fi @@ -295,7 +291,7 @@ } atf_init_test_cases() { - RUMP_SERVER="unix:///tmp/t_swsensor" ; export RUMP_SERVER + RUMP_SERVER="unix://t_swsensor_socket" ; export RUMP_SERVER atf_add_test_case simple_sensor atf_add_test_case limit_sensor atf_add_test_case alarm_sensor
CVS commit: src/usr.bin/audio/record
Module Name:src Committed By: wiz Date: Wed Dec 29 18:49:41 UTC 2010 Modified Files: src/usr.bin/audio/record: record.c Log Message: Sort usage. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/usr.bin/audio/record/record.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audio/record/record.c diff -u src/usr.bin/audio/record/record.c:1.49 src/usr.bin/audio/record/record.c:1.50 --- src/usr.bin/audio/record/record.c:1.49 Wed Dec 29 14:38:55 2010 +++ src/usr.bin/audio/record/record.c Wed Dec 29 18:49:41 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: record.c,v 1.49 2010/12/29 14:38:55 jmcneill Exp $ */ +/* $NetBSD: record.c,v 1.50 2010/12/29 18:49:41 wiz Exp $ */ /* * Copyright (c) 1999, 2002, 2003, 2005, 2010 Matthew R. Green @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: record.c,v 1.49 2010/12/29 14:38:55 jmcneill Exp $"); +__RCSID("$NetBSD: record.c,v 1.50 2010/12/29 18:49:41 wiz Exp $"); #endif @@ -779,8 +779,8 @@ fprintf(stderr, "Usage: %s [-afhqV] [options] {files ...|-}\n", getprogname()); fprintf(stderr, "Options:\n\t" - "-b balance (0-63)\n\t" "-B buffer size\n\t" + "-b balance (0-63)\n\t" "-c channels\n\t" "-d audio device\n\t" "-e encoding\n\t"
CVS commit: src/usr.bin/audio/play
Module Name:src Committed By: wiz Date: Wed Dec 29 18:48:56 UTC 2010 Modified Files: src/usr.bin/audio/play: audioplay.1 Log Message: Use better reference after sorting in -f description. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/audio/play/audioplay.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audio/play/audioplay.1 diff -u src/usr.bin/audio/play/audioplay.1:1.23 src/usr.bin/audio/play/audioplay.1:1.24 --- src/usr.bin/audio/play/audioplay.1:1.23 Wed Dec 29 18:46:48 2010 +++ src/usr.bin/audio/play/audioplay.1 Wed Dec 29 18:48:56 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: audioplay.1,v 1.23 2010/12/29 18:46:48 wiz Exp $ +.\" $NetBSD: audioplay.1,v 1.24 2010/12/29 18:48:56 wiz Exp $ .\" .\" Copyright (c) 1998, 1999, 2002, 2010 Matthew R. Green .\" All rights reserved. @@ -106,8 +106,13 @@ Force playing, even if the format is unknown. The .Fl f -flag can be used in addition with the following flags to -change the number of channels, encoding, precision and +flag can be used in addition with the +.Fl c , +.Fl e , +.Fl P , +and +.Fl s +flags to change the number of channels, encoding, precision, and sample rate. .It Fl h Print a help message.
CVS commit: src/usr.bin/audio/play
Module Name:src Committed By: wiz Date: Wed Dec 29 18:48:41 UTC 2010 Modified Files: src/usr.bin/audio/play: play.c Log Message: Sort usage. To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/usr.bin/audio/play/play.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audio/play/play.c diff -u src/usr.bin/audio/play/play.c:1.52 src/usr.bin/audio/play/play.c:1.53 --- src/usr.bin/audio/play/play.c:1.52 Wed Dec 29 14:38:54 2010 +++ src/usr.bin/audio/play/play.c Wed Dec 29 18:48:40 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: play.c,v 1.52 2010/12/29 14:38:54 jmcneill Exp $ */ +/* $NetBSD: play.c,v 1.53 2010/12/29 18:48:40 wiz Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002, 2010 Matthew R. Green @@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: play.c,v 1.52 2010/12/29 14:38:54 jmcneill Exp $"); +__RCSID("$NetBSD: play.c,v 1.53 2010/12/29 18:48:40 wiz Exp $"); #endif @@ -474,8 +474,8 @@ fprintf(stderr, "Usage: %s [-hiqV] [options] files\n", getprogname()); fprintf(stderr, "Options:\n\t" - "-b balance (0-63)\n\t" "-B buffer size\n\t" + "-b balance (0-63)\n\t" "-d audio device\n\t" "-f force settings\n\t" "\t-c forced channels\n\t"
CVS commit: src/usr.bin/audio
Module Name:src Committed By: wiz Date: Wed Dec 29 18:46:49 UTC 2010 Modified Files: src/usr.bin/audio/play: audioplay.1 src/usr.bin/audio/record: audiorecord.1 Log Message: Sort some more. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/usr.bin/audio/play/audioplay.1 cvs rdiff -u -r1.39 -r1.40 src/usr.bin/audio/record/audiorecord.1 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audio/play/audioplay.1 diff -u src/usr.bin/audio/play/audioplay.1:1.22 src/usr.bin/audio/play/audioplay.1:1.23 --- src/usr.bin/audio/play/audioplay.1:1.22 Wed Dec 29 13:09:03 2010 +++ src/usr.bin/audio/play/audioplay.1 Wed Dec 29 18:46:48 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: audioplay.1,v 1.22 2010/12/29 13:09:03 mrg Exp $ +.\" $NetBSD: audioplay.1,v 1.23 2010/12/29 18:46:48 wiz Exp $ .\" .\" Copyright (c) 1998, 1999, 2002, 2010 Matthew R. Green .\" All rights reserved. @@ -33,8 +33,8 @@ .Sh SYNOPSIS .Nm .Op Fl hiqV -.Op Fl b Ar balance .Op Fl B Ar buffersize +.Op Fl b Ar balance .Op Fl d Ar device .Op Fl p Ar port .Op Fl v Ar volume @@ -59,52 +59,23 @@ .Sh OPTIONS The following options are available: .Bl -tag -width 123456 -.It Fl b -Set the balance to -.Ar balance . -This value must be between 0 and 63. .It Fl B Set the write block size to .Ar buffersize . The default value is the play.buffer_size of the audio device. +.It Fl b +Set the balance to +.Ar balance . +This value must be between 0 and 63. +.It Fl c +When combined with the +.Fl f +option, sets the number of channels to its argument. .It Fl d Set the audio device to be .Ar device . The default is .Pa /dev/sound . -.It Fl h -Print a help message. -.It Fl i -If the audio device cannot be opened, exit now rather than wait for it. -.It Fl p -Set the output port to -.Ar port . -The valid values of -.Ar port -are -.Dq speaker , -.Dq headphone -and -.Dq line . -.It Fl q -Be quiet. -.It Fl v -Set the volume (gain) to -.Ar volume . -This value must be between 0 and 255. -.It Fl V -Be verbose. -.It Fl f -Force playing, even if the format is unknown. -The -.Fl f -flag can be used in addition with the following flags to -change the number of channels, encoding, precision and -sample rate. -.It Fl c -When combined with the -.Fl f -option, sets the number of channels to its argument. .It Fl e When combined with the .Fl f @@ -131,17 +102,46 @@ .Cm mpeg_l2_packets , and .Cm mpeg_l2_system . +.It Fl f +Force playing, even if the format is unknown. +The +.Fl f +flag can be used in addition with the following flags to +change the number of channels, encoding, precision and +sample rate. +.It Fl h +Print a help message. +.It Fl i +If the audio device cannot be opened, exit now rather than wait for it. .It Fl P When combined with the .Fl f option, sets the precision to its argument. This value must be either 4, 8, 16, 24 or 32. +.It Fl p +Set the output port to +.Ar port . +The valid values of +.Ar port +are +.Dq speaker , +.Dq headphone +and +.Dq line . +.It Fl q +Be quiet. .It Fl s When combined with the .Fl f option, sets the sample rate to its argument. This value must be a valid value for the audio device or an error will be returned. +.It Fl V +Be verbose. +.It Fl v +Set the volume (gain) to +.Ar volume . +This value must be between 0 and 255. .El .Sh ENVIRONMENT .Bl -tag -width AUDIOCTLDEVICE Index: src/usr.bin/audio/record/audiorecord.1 diff -u src/usr.bin/audio/record/audiorecord.1:1.39 src/usr.bin/audio/record/audiorecord.1:1.40 --- src/usr.bin/audio/record/audiorecord.1:1.39 Wed Dec 29 13:09:03 2010 +++ src/usr.bin/audio/record/audiorecord.1 Wed Dec 29 18:46:49 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: audiorecord.1,v 1.39 2010/12/29 13:09:03 mrg Exp $ +.\" $NetBSD: audiorecord.1,v 1.40 2010/12/29 18:46:49 wiz Exp $ .\" .\" Copyright (c) 1998, 1999, 2001, 2002, 2010 Matthew R. Green .\" All rights reserved. @@ -33,8 +33,8 @@ .Sh SYNOPSIS .Nm .Op Fl afhqV -.Op Fl b Ar balance .Op Fl B Ar buffersize +.Op Fl b Ar balance .Op Fl c Ar channels .Op Fl d Ar device .Op Fl e Ar encoding @@ -70,14 +70,14 @@ .Bl -tag -width XpXprecisionX .It Fl a Append to the specified file, rather than overwriting. -.It Fl b Ar balance -Set the balance to -.Ar balance . -This value must be between 0 and 63. .It Fl B Ar buffersize Set the audio device read buffer size to .Ar buffersize . The default value is the record.buffer_size of the audio device. +.It Fl b Ar balance +Set the balance to +.Ar balance . +This value must be between 0 and 63. .It Fl c Ar channels Set number of channels to .Ar channels . @@ -89,7 +89,7 @@ .It Fl e Ar encoding Set encoding to either .Dq alaw , -.Dq ulaw +.Dq ulaw , or .Dq linear , or any other value reported by
CVS commit: src/sys/arch/i386/stand
Module Name:src Committed By: jakllsch Date: Wed Dec 29 17:44:03 UTC 2010 Modified Files: src/sys/arch/i386/stand: Makefile src/sys/arch/i386/stand/bootxx: Makefile src/sys/arch/i386/stand/cdboot: Makefile Removed Files: src/sys/arch/i386/stand/bootxx/bootxx_cd9660: Makefile Log Message: bootxx_cd9660 (cdboot), like bootxx_fat16 (fatboot), is not a traditional libsa-based program. As such, build bootxx_cd9660 where its source lives. This has been done by moving bootxx/bootxx_cd9660/Makefile to cdboot/Makefile and adjusting the relative paths appropriately, so as to minimize binary change. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/i386/stand/Makefile cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/stand/bootxx/Makefile cvs rdiff -u -r1.12 -r0 src/sys/arch/i386/stand/bootxx/bootxx_cd9660/Makefile cvs rdiff -u -r1.9 -r1.10 src/sys/arch/i386/stand/cdboot/Makefile 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/i386/stand/Makefile diff -u src/sys/arch/i386/stand/Makefile:1.25 src/sys/arch/i386/stand/Makefile:1.26 --- src/sys/arch/i386/stand/Makefile:1.25 Sat Jan 6 20:48:59 2007 +++ src/sys/arch/i386/stand/Makefile Wed Dec 29 17:44:03 2010 @@ -1,9 +1,9 @@ -# $NetBSD: Makefile,v 1.25 2007/01/06 20:48:59 dsl Exp $ +# $NetBSD: Makefile,v 1.26 2010/12/29 17:44:03 jakllsch Exp $ SUBDIR= genprom .WAIT SUBDIR+= mbr boot -SUBDIR+= bootxx fatboot +SUBDIR+= bootxx cdboot fatboot SUBDIR+= dosboot misc SUBDIR+= netboot SUBDIR+= pxeboot Index: src/sys/arch/i386/stand/bootxx/Makefile diff -u src/sys/arch/i386/stand/bootxx/Makefile:1.13 src/sys/arch/i386/stand/bootxx/Makefile:1.14 --- src/sys/arch/i386/stand/bootxx/Makefile:1.13 Sat Sep 11 13:06:37 2010 +++ src/sys/arch/i386/stand/bootxx/Makefile Wed Dec 29 17:44:03 2010 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.13 2010/09/11 13:06:37 tsutsui Exp $ +# $NetBSD: Makefile,v 1.14 2010/12/29 17:44:03 jakllsch Exp $ -SUBDIR= bootxx_cd9660 bootxx_ffsv1 .WAIT bootxx_ffsv2 bootxx_lfsv1 bootxx_lfsv2 +SUBDIR= bootxx_ffsv1 .WAIT bootxx_ffsv2 bootxx_lfsv1 bootxx_lfsv2 SUBDIR+=bootxx_msdos bootxx_ustarfs # Ext2fs doesn't have enough free space (it has only 1KB) Index: src/sys/arch/i386/stand/cdboot/Makefile diff -u src/sys/arch/i386/stand/cdboot/Makefile:1.9 src/sys/arch/i386/stand/cdboot/Makefile:1.10 --- src/sys/arch/i386/stand/cdboot/Makefile:1.9 Sat Feb 14 13:52:51 2009 +++ src/sys/arch/i386/stand/cdboot/Makefile Wed Dec 29 17:44:03 2010 @@ -1,8 +1,10 @@ -# $NetBSD: Makefile,v 1.9 2009/02/14 13:52:51 abs Exp $ +# $NetBSD: Makefile,v 1.10 2010/12/29 17:44:03 jakllsch Exp $ -S= ${.CURDIR}/../../../.. +S= ${.CURDIR}/../../../.. NOMAN= # defined +.include + STRIPFLAG= # nothing LIBCRT0= # nothing @@ -10,59 +12,41 @@ LIBCRTEND= # nothing LIBC= # nothing -PRIMARY_LOAD_ADDRESS=0x600 -SECONDARY_LOAD_ADDRESS=0x1 - -PIE_CFLAGS= -PIE_LDFLAGS= -PIE_AFLAGS= - -.include - -PROG= cdboot -SRCS?= cdboot.S +PRIMARY_LOAD_ADDRESS= 0x600 +SECONDARY_LOAD_ADDRESS= 0x1 -BINDIR= /usr/mdec -BINMODE=444 +PROG= bootxx_cd9660 +SRCS?= cdboot.S -.PATH: ${.CURDIR}/.. +BINDIR= /usr/mdec +BINMODE= 444 -LDFLAGS+= -nostdlib -Wl,-e,start -CPPFLAGS+= -I. -I${.CURDIR}/../lib -I${S} -CPPFLAGS+= -DPRIMARY_LOAD_ADDRESS=${PRIMARY_LOAD_ADDRESS} -CPPFLAGS+= -DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS} -#CPPFLAGS+= -DDISABLE_KEYPRESS +.PATH: ${.CURDIR}/.. + +LDFLAGS+= -nostdlib -Wl,-e,start +CPPFLAGS+= -I. -I${.CURDIR}/../lib -I${S} +CPPFLAGS+= -DPRIMARY_LOAD_ADDRESS=${PRIMARY_LOAD_ADDRESS} +CPPFLAGS+= -DSECONDARY_LOAD_ADDRESS=${SECONDARY_LOAD_ADDRESS} +CPPFLAGS+= -DDISABLE_KEYPRESS .if ${MACHINE_ARCH} == "x86_64" -LDFLAGS+= -Wl,-m,elf_i386 -AFLAGS+= -m32 -.endif - -.if !make(obj) && !make(clean) && !make(cleandir) -.BEGIN: machine x86 -.NOPATH: machine x86 +LDFLAGS+= -Wl,-m,elf_i386 +AFLAGS+= -m32 .endif -realdepend realall: machine x86 -CLEANFILES+= machine x86 - -machine:: - -rm -f $@ - ln -s $S/arch/i386/include $@ - -x86:: - -rm -f $@ - ln -s $S/arch/x86/include $@ +BUILDSYMLINKS+= $S/arch/i386/include machine \ + $S/arch/x86/include x86 -${OBJS}: machine x86 +DPSRCS+= machine x86 -CLEANFILES+= ${PROG}.tmp +CLEANFILES+= ${PROG}.tmp ${PROG}: ${OBJS} ${_MKTARGET_LINK} - ${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,-Ttext,${PRIMARY_LOAD_ADDRESS} ${OBJS} + ${CC} -o ${PROG}.tmp ${LDFLAGS} -Wl,-Ttext,${PRIMARY_LOAD_ADDRESS} \ + ${OBJS} @ set -- $$( ${NM} -t d ${PROG}.tmp | grep '\' \ - | ${TOOL_SED} 's/^0*//' ); \ + | ${TOOL_SED} 's/^0*//' ); \ echo " There are $$1 free bytes in ${PROG}" ${OBJCOPY} -O binary ${PROG}.tmp ${PROG} rm -f ${PROG}.tmp
CVS commit: src/include
Module Name:src Committed By: pooka Date: Wed Dec 29 15:53:58 UTC 2010 Modified Files: src/include: paths.h Log Message: practice alphabet: "g before i except never" etc. To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/include/paths.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/include/paths.h diff -u src/include/paths.h:1.38 src/include/paths.h:1.39 --- src/include/paths.h:1.38 Sat Dec 25 16:49:08 2010 +++ src/include/paths.h Wed Dec 29 15:53:57 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: paths.h,v 1.38 2010/12/25 16:49:08 jmcneill Exp $ */ +/* $NetBSD: paths.h,v 1.39 2010/12/29 15:53:57 pooka Exp $ */ /* * Copyright (c) 1989, 1993 @@ -68,9 +68,9 @@ #define _PATH_DRUM "/dev/drum" #define _PATH_ESDB "/usr/share/i18n/esdb" #define _PATH_FTPUSERS "/etc/ftpusers" +#define _PATH_GETTYTAB "/etc/gettytab" #define _PATH_I18NMODULE "/usr/lib/i18n" #define _PATH_ICONV "/usr/share/i18n/iconv" -#define _PATH_GETTYTAB "/etc/gettytab" #define _PATH_KMEM "/dev/kmem" #define _PATH_KSYMS "/dev/ksyms" #define _PATH_KVMDB "/var/db/kvm.db" @@ -81,8 +81,8 @@ #define _PATH_MIXER "/dev/mixer" #define _PATH_MIXER0 "/dev/mixer0" #define _PATH_NOLOGIN "/etc/nologin" -#define _PATH_PRINTCAP "/etc/printcap" #define _PATH_POWER "/dev/power" +#define _PATH_PRINTCAP "/etc/printcap" #define _PATH_PUD "/dev/pud" #define _PATH_PUFFS "/dev/puffs" #define _PATH_RANDOM "/dev/random"
CVS commit: src/sys/kern
Module Name:src Committed By: pooka Date: Wed Dec 29 15:07:36 UTC 2010 Modified Files: src/sys/kern: kern_module.c Log Message: Pass potential prop dictionary to modcmd when reenabling a builtin module. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/kern/kern_module.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_module.c diff -u src/sys/kern/kern_module.c:1.73 src/sys/kern/kern_module.c:1.74 --- src/sys/kern/kern_module.c:1.73 Sat Oct 16 18:09:02 2010 +++ src/sys/kern/kern_module.c Wed Dec 29 15:07:36 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: kern_module.c,v 1.73 2010/10/16 18:09:02 pgoyette Exp $ */ +/* $NetBSD: kern_module.c,v 1.74 2010/12/29 15:07:36 pooka Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.73 2010/10/16 18:09:02 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_module.c,v 1.74 2010/12/29 15:07:36 pooka Exp $"); #define _MODULE_INTERNAL @@ -90,7 +90,7 @@ static int module_do_load(const char *, bool, int, prop_dictionary_t, module_t **, modclass_t class, bool); static int module_do_unload(const char *, bool); -static int module_do_builtin(const char *, module_t **); +static int module_do_builtin(const char *, module_t **, prop_dictionary_t); static int module_fetch_info(module_t *); static void module_thread(void *); @@ -252,7 +252,8 @@ /* finally, init (if required) */ if (init) { for (i = 0; i < nmodinfo; i++) { - rv = module_do_builtin(modp[i]->mod_info->mi_name,NULL); + rv = module_do_builtin(modp[i]->mod_info->mi_name, + NULL, NULL); /* throw in the towel, recovery hard & not worth it */ if (rv) panic("builtin module \"%s\" init failed: %d", @@ -461,7 +462,7 @@ * MODFLG_MUST_FORCE, don't try to override that!) */ if (mod->mod_flags & MODFLG_MUST_FORCE || - module_do_builtin(mi->mi_name, NULL) != 0) { + module_do_builtin(mi->mi_name, NULL, NULL) != 0) { TAILQ_REMOVE(&module_builtins, mod, mod_chain); TAILQ_INSERT_TAIL(&bi_fail, mod, mod_chain); } @@ -704,7 +705,7 @@ * already linked into the kernel. */ static int -module_do_builtin(const char *name, module_t **modp) +module_do_builtin(const char *name, module_t **modp, prop_dictionary_t props) { const char *p, *s; char buf[MAXMODNAME]; @@ -765,7 +766,7 @@ module_error("too many required modules"); return EINVAL; } - error = module_do_builtin(buf, &mod2); + error = module_do_builtin(buf, &mod2, NULL); if (error != 0) { return error; } @@ -778,7 +779,7 @@ */ prev_active = module_active; module_active = mod; - error = (*mi->mi_modcmd)(MODULE_CMD_INIT, NULL); + error = (*mi->mi_modcmd)(MODULE_CMD_INIT, props); module_active = prev_active; if (error != 0) { module_error("builtin module `%s' " @@ -870,7 +871,7 @@ depth--; return EPERM; } else { - error = module_do_builtin(name, NULL); + error = module_do_builtin(name, NULL, props); depth--; return error; }
CVS commit: src/usr.bin/audio
Module Name:src Committed By: jmcneill Date: Wed Dec 29 14:38:55 UTC 2010 Modified Files: src/usr.bin/audio/play: play.c src/usr.bin/audio/record: record.c Log Message: allow for buffer sizes < 32k To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/usr.bin/audio/play/play.c cvs rdiff -u -r1.48 -r1.49 src/usr.bin/audio/record/record.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audio/play/play.c diff -u src/usr.bin/audio/play/play.c:1.51 src/usr.bin/audio/play/play.c:1.52 --- src/usr.bin/audio/play/play.c:1.51 Wed Dec 29 13:09:03 2010 +++ src/usr.bin/audio/play/play.c Wed Dec 29 14:38:54 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: play.c,v 1.51 2010/12/29 13:09:03 mrg Exp $ */ +/* $NetBSD: play.c,v 1.52 2010/12/29 14:38:54 jmcneill Exp $ */ /* * Copyright (c) 1999, 2000, 2001, 2002, 2010 Matthew R. Green @@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: play.c,v 1.51 2010/12/29 13:09:03 mrg Exp $"); +__RCSID("$NetBSD: play.c,v 1.52 2010/12/29 14:38:54 jmcneill Exp $"); #endif @@ -184,10 +184,11 @@ if (ioctl(audiofd, AUDIO_GETINFO, &info) < 0) err(1, "failed to get audio info"); - if (bufsize == 0) + if (bufsize == 0) { bufsize = info.play.buffer_size; - if (bufsize < 32 * 1024) - bufsize = 32 * 1024; + if (bufsize < 32 * 1024) + bufsize = 32 * 1024; + } signal(SIGINT, cleanup); signal(SIGTERM, cleanup); Index: src/usr.bin/audio/record/record.c diff -u src/usr.bin/audio/record/record.c:1.48 src/usr.bin/audio/record/record.c:1.49 --- src/usr.bin/audio/record/record.c:1.48 Wed Dec 29 13:09:03 2010 +++ src/usr.bin/audio/record/record.c Wed Dec 29 14:38:55 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: record.c,v 1.48 2010/12/29 13:09:03 mrg Exp $ */ +/* $NetBSD: record.c,v 1.49 2010/12/29 14:38:55 jmcneill Exp $ */ /* * Copyright (c) 1999, 2002, 2003, 2005, 2010 Matthew R. Green @@ -32,7 +32,7 @@ #include #ifndef lint -__RCSID("$NetBSD: record.c,v 1.48 2010/12/29 13:09:03 mrg Exp $"); +__RCSID("$NetBSD: record.c,v 1.49 2010/12/29 14:38:55 jmcneill Exp $"); #endif @@ -246,10 +246,11 @@ */ if (ioctl(audiofd, AUDIO_GETINFO, &oinfo) < 0) err(1, "failed to get audio info"); - if (bufsize == 0) + if (bufsize == 0) { bufsize = oinfo.record.buffer_size; - if (bufsize < 32 * 1024) - bufsize = 32 * 1024; + if (bufsize < 32 * 1024) + bufsize = 32 * 1024; + } omonitor_gain = oinfo.monitor_gain; buffer = malloc(bufsize);
CVS commit: src/sys/arch/sh3/sh3
Module Name:src Committed By: nisimura Date: Wed Dec 29 13:49:32 UTC 2010 Modified Files: src/sys/arch/sh3/sh3: exception.c Log Message: one more line for lwp_getpcb() conversion. To generate a diff of this commit: cvs rdiff -u -r1.57 -r1.58 src/sys/arch/sh3/sh3/exception.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/sh3/sh3/exception.c diff -u src/sys/arch/sh3/sh3/exception.c:1.57 src/sys/arch/sh3/sh3/exception.c:1.58 --- src/sys/arch/sh3/sh3/exception.c:1.57 Wed Dec 29 13:43:58 2010 +++ src/sys/arch/sh3/sh3/exception.c Wed Dec 29 13:49:32 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: exception.c,v 1.57 2010/12/29 13:43:58 nisimura Exp $ */ +/* $NetBSD: exception.c,v 1.58 2010/12/29 13:49:32 nisimura Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved. @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.57 2010/12/29 13:43:58 nisimura Exp $"); +__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.58 2010/12/29 13:49:32 nisimura Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -282,7 +282,7 @@ int err, track, ftype; const char *panic_msg; - pcb = &l->l_addr->u_pcb; + pcb = lwp_getpcb(l); onfault = pcb->pcb_onfault; #define TLB_ASSERT(assert, msg)\
CVS commit: src/share/man/man4
Module Name:src Committed By: jmcneill Date: Wed Dec 29 13:48:22 UTC 2010 Modified Files: src/share/man/man4: cir.4 Log Message: show that cir attaches to irbus To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/cir.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/cir.4 diff -u src/share/man/man4/cir.4:1.2 src/share/man/man4/cir.4:1.3 --- src/share/man/man4/cir.4:1.2 Wed Apr 30 13:10:53 2008 +++ src/share/man/man4/cir.4 Wed Dec 29 13:48:22 2010 @@ -1,4 +1,4 @@ -.\" $NetBSD: cir.4,v 1.2 2008/04/30 13:10:53 martin Exp $ +.\" $NetBSD: cir.4,v 1.3 2010/12/29 13:48:22 jmcneill Exp $ .\" .\" Copyright (c) 2001 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -27,14 +27,14 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd December 2, 2001 +.Dd December 29, 2010 .Dt CIR 4 .Os .Sh NAME .Nm cir .Nd Consumer IR (remote control) driver .Sh SYNOPSIS -.Cd "cir* at XX?" +.Cd "cir* at irbus?" .Sh DESCRIPTION The .Nm
CVS commit: src/sys/arch/sh3/sh3
Module Name:src Committed By: nisimura Date: Wed Dec 29 13:43:58 UTC 2010 Modified Files: src/sys/arch/sh3/sh3: exception.c vm_machdep.c Log Message: use lwp_getpcb() to hide the detail about how struct pcb is populated. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/sh3/sh3/exception.c cvs rdiff -u -r1.67 -r1.68 src/sys/arch/sh3/sh3/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sh3/sh3/exception.c diff -u src/sys/arch/sh3/sh3/exception.c:1.56 src/sys/arch/sh3/sh3/exception.c:1.57 --- src/sys/arch/sh3/sh3/exception.c:1.56 Mon Dec 20 00:25:43 2010 +++ src/sys/arch/sh3/sh3/exception.c Wed Dec 29 13:43:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: exception.c,v 1.56 2010/12/20 00:25:43 matt Exp $ */ +/* $NetBSD: exception.c,v 1.57 2010/12/29 13:43:58 nisimura Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved. @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.56 2010/12/20 00:25:43 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: exception.c,v 1.57 2010/12/29 13:43:58 nisimura Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -139,6 +139,7 @@ { int expevt = tf->tf_expevt; bool usermode = !KERNELMODE(tf->tf_ssr); + struct pcb *pcb; ksiginfo_t ksi; uint32_t trapcode; #ifdef DDB @@ -191,8 +192,9 @@ case EXPEVT_ADDR_ERR_LD: /* FALLTHROUGH */ case EXPEVT_ADDR_ERR_ST: - KDASSERT(l->l_md.md_pcb->pcb_onfault != NULL); - tf->tf_spc = (int)l->l_md.md_pcb->pcb_onfault; + pcb = lwp_getpcb(l); + KDASSERT(pcb->pcb_onfault != NULL); + tf->tf_spc = (int)pcb->pcb_onfault; tf->tf_r0 = EFAULT; if (tf->tf_spc == 0) goto do_panic; Index: src/sys/arch/sh3/sh3/vm_machdep.c diff -u src/sys/arch/sh3/sh3/vm_machdep.c:1.67 src/sys/arch/sh3/sh3/vm_machdep.c:1.68 --- src/sys/arch/sh3/sh3/vm_machdep.c:1.67 Fri Apr 23 19:18:10 2010 +++ src/sys/arch/sh3/sh3/vm_machdep.c Wed Dec 29 13:43:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.67 2010/04/23 19:18:10 rmind Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.68 2010/12/29 13:43:58 nisimura Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. All rights reserved. @@ -81,7 +81,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.67 2010/04/23 19:18:10 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.68 2010/12/29 13:43:58 nisimura Exp $"); #include "opt_kstack_debug.h" @@ -134,6 +134,7 @@ cpu_lwp_fork(struct lwp *l1, struct lwp *l2, void *stack, size_t stacksize, void (*func)(void *), void *arg) { + struct pcb *pcb; struct switchframe *sf; #if 0 /* FIXME: probably wrong for yamt-idlelwp */ @@ -151,7 +152,8 @@ l2->l_md.md_regs->tf_r15 = (u_int)stack + stacksize; /* When l2 is switched to, jump to the trampoline */ - sf = &l2->l_md.md_pcb->pcb_sf; + pcb = lwp_getpcb(l2); + sf = &pcb->pcb_sf; sf->sf_pr = (int)lwp_trampoline; sf->sf_r10 = (int)l2; /* "new" lwp for lwp_startup() */ sf->sf_r11 = (int)arg; /* hook function/argument */ @@ -166,14 +168,14 @@ void cpu_setfunc(struct lwp *l, void (*func)(void *), void *arg) { - struct switchframe *sf; + struct pcb *pcb = lwp_getpcb(l); + struct switchframe *sf = &pcb->pcb_sf; sh3_setup_uarea(l); l->l_md.md_regs->tf_ssr = PSL_USERSET; /* When lwp is switched to, jump to the trampoline */ - sf = &l->l_md.md_pcb->pcb_sf; sf->sf_pr = (int)lwp_setfunc_trampoline; sf->sf_r11 = (int)arg; /* hook function/argument */ sf->sf_r12 = (int)func;
CVS commit: src/sys/dev/ir
Module Name:src Committed By: jmcneill Date: Wed Dec 29 13:43:16 UTC 2010 Modified Files: src/sys/dev/ir: cir.c Log Message: module needs to devsw_attach/devsw_detach To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/dev/ir/cir.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/ir/cir.c diff -u src/sys/dev/ir/cir.c:1.27 src/sys/dev/ir/cir.c:1.28 --- src/sys/dev/ir/cir.c:1.27 Tue Dec 28 14:45:30 2010 +++ src/sys/dev/ir/cir.c Wed Dec 29 13:43:16 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cir.c,v 1.27 2010/12/28 14:45:30 jmcneill Exp $ */ +/* $NetBSD: cir.c,v 1.28 2010/12/29 13:43:16 jmcneill Exp $ */ /* * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cir.c,v 1.27 2010/12/28 14:45:30 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cir.c,v 1.28 2010/12/29 13:43:16 jmcneill Exp $"); #include #include @@ -268,21 +268,31 @@ static int cir_modcmd(modcmd_t cmd, void *opaque) { + int error = 0; +#ifdef _MODULE + int bmaj = -1, cmaj = -1; +#endif + switch (cmd) { case MODULE_CMD_INIT: #ifdef _MODULE - return config_init_component(cfdriver_ioconf_cir, + error = config_init_component(cfdriver_ioconf_cir, cfattach_ioconf_cir, cfdata_ioconf_cir); -#else - return 0; + if (error) + return error; + error = devsw_attach("cir", NULL, &bmaj, &cir_cdevsw, &cmaj); + if (error) + config_fini_component(cfdriver_ioconf_cir, + cfattach_ioconf_cir, cfdata_ioconf_cir); #endif + return error; case MODULE_CMD_FINI: #ifdef _MODULE + devsw_detach(NULL, &cir_cdevsw); return config_fini_component(cfdriver_ioconf_cir, cfattach_ioconf_cir, cfdata_ioconf_cir); -#else - return 0; #endif + return error; default: return ENOTTY; }
CVS commit: src/usr.bin/audio
Module Name:src Committed By: mrg Date: Wed Dec 29 13:09:04 UTC 2010 Modified Files: src/usr.bin/audio/play: audioplay.1 play.c src/usr.bin/audio/record: audiorecord.1 record.c Log Message: add a new "-B buffersize" flag to both audioplay and audiorecord. suggested by jmcne...@. sort audioplay manual some. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/usr.bin/audio/play/audioplay.1 cvs rdiff -u -r1.50 -r1.51 src/usr.bin/audio/play/play.c cvs rdiff -u -r1.38 -r1.39 src/usr.bin/audio/record/audiorecord.1 cvs rdiff -u -r1.47 -r1.48 src/usr.bin/audio/record/record.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/usr.bin/audio/play/audioplay.1 diff -u src/usr.bin/audio/play/audioplay.1:1.21 src/usr.bin/audio/play/audioplay.1:1.22 --- src/usr.bin/audio/play/audioplay.1:1.21 Thu May 29 14:51:27 2008 +++ src/usr.bin/audio/play/audioplay.1 Wed Dec 29 13:09:03 2010 @@ -1,6 +1,6 @@ -.\" $NetBSD: audioplay.1,v 1.21 2008/05/29 14:51:27 mrg Exp $ +.\" $NetBSD: audioplay.1,v 1.22 2010/12/29 13:09:03 mrg Exp $ .\" -.\" Copyright (c) 1998-2002 Matthew R. Green +.\" Copyright (c) 1998, 1999, 2002, 2010 Matthew R. Green .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd January 13, 2002 +.Dd December 30, 2010 .Dt AUDIOPLAY 1 .Os .Sh NAME @@ -32,11 +32,12 @@ .Nd play audio files .Sh SYNOPSIS .Nm -.Op Fl iqVh -.Op Fl v Ar volume +.Op Fl hiqV .Op Fl b Ar balance -.Op Fl p Ar port +.Op Fl B Ar buffersize .Op Fl d Ar device +.Op Fl p Ar port +.Op Fl v Ar volume .Oo .Fl f .Op Fl c Ar channels @@ -58,22 +59,23 @@ .Sh OPTIONS The following options are available: .Bl -tag -width 123456 -.It Fl i -If the audio device cannot be opened, exit now rather than wait for it. -.It Fl q -Be quiet. -.It Fl V -Be verbose. -.It Fl h -Print a help message. -.It Fl v -Set the volume (gain) to -.Ar volume . -This value must be between 0 and 255. .It Fl b Set the balance to .Ar balance . This value must be between 0 and 63. +.It Fl B +Set the write block size to +.Ar buffersize . +The default value is the play.buffer_size of the audio device. +.It Fl d +Set the audio device to be +.Ar device . +The default is +.Pa /dev/sound . +.It Fl h +Print a help message. +.It Fl i +If the audio device cannot be opened, exit now rather than wait for it. .It Fl p Set the output port to .Ar port . @@ -84,11 +86,14 @@ .Dq headphone and .Dq line . -.It Fl d -Set the audio device to be -.Ar device . -The default is -.Pa /dev/sound . +.It Fl q +Be quiet. +.It Fl v +Set the volume (gain) to +.Ar volume . +This value must be between 0 and 255. +.It Fl V +Be verbose. .It Fl f Force playing, even if the format is unknown. The @@ -97,11 +102,11 @@ change the number of channels, encoding, precision and sample rate. .It Fl c -when combined with the +When combined with the .Fl f option, sets the number of channels to its argument. .It Fl e -when combined with the +When combined with the .Fl f option, sets the encoding to its argument. Possible values are @@ -127,12 +132,12 @@ and .Cm mpeg_l2_system . .It Fl P -when combined with the +When combined with the .Fl f option, sets the precision to its argument. This value must be either 4, 8, 16, 24 or 32. .It Fl s -when combined with the +When combined with the .Fl f option, sets the sample rate to its argument. This value must be a valid value for the audio device or an error will Index: src/usr.bin/audio/play/play.c diff -u src/usr.bin/audio/play/play.c:1.50 src/usr.bin/audio/play/play.c:1.51 --- src/usr.bin/audio/play/play.c:1.50 Sat Apr 11 10:43:09 2009 +++ src/usr.bin/audio/play/play.c Wed Dec 29 13:09:03 2010 @@ -1,7 +1,7 @@ -/* $NetBSD: play.c,v 1.50 2009/04/11 10:43:09 lukem Exp $ */ +/* $NetBSD: play.c,v 1.51 2010/12/29 13:09:03 mrg Exp $ */ /* - * Copyright (c) 1999 Matthew R. Green + * Copyright (c) 1999, 2000, 2001, 2002, 2010 Matthew R. Green * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: play.c,v 1.50 2009/04/11 10:43:09 lukem Exp $"); +__RCSID("$NetBSD: play.c,v 1.51 2010/12/29 13:09:03 mrg Exp $"); #endif @@ -87,13 +87,17 @@ const char *defdevice = _PATH_SOUND; const char *device = NULL; - while ((ch = getopt(argc, argv, "b:C:c:d:e:fhip:P:qs:Vv:")) != -1) { + while ((ch = getopt(argc, argv, "b:B:C:c:d:e:fhip:P:qs:Vv:")) != -1) { switch (ch) { case 'b': decode_int(optarg, &balance); if (balance < 0 || balance > 64) errx(1, "balance must be between 0 and 63"); break; + case 'B': + bufsize = strsuftoll("write buffer size", optarg, + 1, UINT_MAX); + break; case 'c': decode_int(optar
CVS commit: src
Module Name:src Committed By: jmcneill Date: Wed Dec 29 13:05:42 UTC 2010 Modified Files: src/distrib/sets/lists/modules: md.amd64 md.i386 mi src/sys/modules: Makefile Log Message: some platforms don't have bus_dma, so only build these modules on x86 To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/distrib/sets/lists/modules/md.amd64 cvs rdiff -u -r1.9 -r1.10 src/distrib/sets/lists/modules/md.i386 cvs rdiff -u -r1.19 -r1.20 src/distrib/sets/lists/modules/mi cvs rdiff -u -r1.55 -r1.56 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.8 src/distrib/sets/lists/modules/md.amd64:1.9 --- src/distrib/sets/lists/modules/md.amd64:1.8 Tue Oct 26 05:36:49 2010 +++ src/distrib/sets/lists/modules/md.amd64 Wed Dec 29 13:05:42 2010 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.8 2010/10/26 05:36:49 jruoho Exp $ +# $NetBSD: md.amd64,v 1.9 2010/12/29 13:05:42 jmcneill Exp $ ./@MODULEDIR@/acpiacadbase-kernel-modules kmod ./@MODULEDIR@/acpiacad/acpiacad.kmod base-kernel-modules kmod ./@MODULEDIR@/acpibatbase-kernel-modules kmod @@ -23,6 +23,10 @@ ./@MODULEDIR@/aibs/aibs.kmod base-kernel-modules kmod ./@MODULEDIR@/asusbase-kernel-modules kmod ./@MODULEDIR@/asus/asus.kmod base-kernel-modules kmod +./@MODULEDIR@/au8522base-kernel-modules kmod +./@MODULEDIR@/au8522/au8522.kmod base-kernel-modules kmod +./@MODULEDIR@/auvitekbase-kernel-modules kmod +./@MODULEDIR@/auvitek/auvitek.kmod base-kernel-modules kmod ./@MODULEDIR@/azaliabase-kernel-modules kmod ./@MODULEDIR@/azalia/azalia.kmod base-kernel-modules kmod ./@MODULEDIR@/compat_linux base-kernel-modules kmod @@ -53,3 +57,5 @@ ./@MODULEDIR@/wmihp/wmihp.kmod base-kernel-modules kmod ./@MODULEDIR@/wmimsibase-kernel-modules kmod ./@MODULEDIR@/wmimsi/wmimsi.kmod base-kernel-modules kmod +./@MODULEDIR@/xc5kbase-kernel-modules kmod +./@MODULEDIR@/xc5k/xc5k.kmod base-kernel-modules kmod Index: src/distrib/sets/lists/modules/md.i386 diff -u src/distrib/sets/lists/modules/md.i386:1.9 src/distrib/sets/lists/modules/md.i386:1.10 --- src/distrib/sets/lists/modules/md.i386:1.9 Tue Oct 26 05:36:49 2010 +++ src/distrib/sets/lists/modules/md.i386 Wed Dec 29 13:05:42 2010 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.9 2010/10/26 05:36:49 jruoho Exp $ +# $NetBSD: md.i386,v 1.10 2010/12/29 13:05:42 jmcneill Exp $ ./@MODULEDIR@/acpiacadbase-kernel-modules kmod ./@MODULEDIR@/acpiacad/acpiacad.kmod base-kernel-modules kmod ./@MODULEDIR@/acpibatbase-kernel-modules kmod @@ -23,6 +23,10 @@ ./@MODULEDIR@/aibs/aibs.kmod base-kernel-modules kmod ./@MODULEDIR@/asusbase-kernel-modules kmod ./@MODULEDIR@/asus/asus.kmod base-kernel-modules kmod +./@MODULEDIR@/au8522base-kernel-modules kmod +./@MODULEDIR@/au8522/au8522.kmod base-kernel-modules kmod +./@MODULEDIR@/auvitekbase-kernel-modules kmod +./@MODULEDIR@/auvitek/auvitek.kmod base-kernel-modules kmod ./@MODULEDIR@/azaliabase-kernel-modules kmod ./@MODULEDIR@/azalia/azalia.kmod base-kernel-modules kmod ./@MODULEDIR@/compat_freebsd base-kernel-modules kmod @@ -59,3 +63,5 @@ ./@MODULEDIR@/wmihp/wmihp.kmod base-kernel-modules kmod ./@MODULEDIR@/wmimsibase-kernel-modules kmod ./@MODULEDIR@/wmimsi/wmimsi.kmod base-kernel-modules kmod +./@MODULEDIR@/xc5kbase-kernel-modules kmod +./@MODULEDIR@/xc5k/xc5k.kmod base-kernel-modules kmod Index: src/distrib/sets/lists/modules/mi diff -u src/distrib/sets/lists/modules/mi:1.19 src/distrib/sets/lists/modules/mi:1.20 --- src/distrib/sets/lists/modules/mi:1.19 Mon Dec 27 15:48:28 2010 +++ src/distrib/sets/lists/modules/mi Wed Dec 29 13:05:42 2010 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.19 2010/12/27 15:48:28 jmcneill Exp $ +# $NetBSD: mi,v 1.20 2010/12/29 13:05:42 jmcneill Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. # @@ -14,10 +14,6 @@ ./@MODULEDIR@/adosfs/adosfs.kmod base-kernel-modules kmod ./@MODULEDIR@/aiobase-kernel-modules kmod ./@MODULEDIR@/aio/aio.kmod base-kernel-modules kmod -./@MODULEDIR@/au8522base-kernel-modules kmod -./@MODULEDIR@/au8522/au8522.kmod base-kernel-modules kmod -./@MODULEDIR@/auvitekbase-kernel-modules kmod -./@MODULEDIR@/auvitek/auvitek.kmod base-kernel-modules kmod ./@MODULEDIR@/bpfbase-kernel-modules kmod ./@MODULEDIR@/bpf/bpf.kmod base-kernel-modules kmod ./@MODULEDIR@/cd9660base-kernel-modules kmod @@ -138,7 +134,5 @@ ./@MODULEDIR@/usbverbose/usbverbose.kmod base-kernel-modules kmod ./@MODULEDIR@/vnd base-kernel-modules kmod ./@MODULEDIR@/vnd/vnd.kmod base-kernel-modules kmod -./@MODULEDIR@/xc5kbase-kernel-modules kmod -./@MODULEDIR@/xc5k/xc5k.kmod base-kernel-modules kmod ./@MODULEDIR@/zfsbase-kernel-modules kmod,zfs ./@MODULEDIR@/zfs/zf
CVS commit: src/external/gpl2/lvm2/dist/libdm
Module Name:src Committed By: haad Date: Wed Dec 29 10:39:28 UTC 2010 Modified Files: src/external/gpl2/lvm2/dist/libdm: libdm-common.c Log Message: Fix problem where chown was used on normal device in time when only raw device was created. While here do some cleanup. Problem find and reported by Martin Mersberger on current-us...@. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl2/lvm2/dist/libdm/libdm-common.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/lvm2/dist/libdm/libdm-common.c diff -u src/external/gpl2/lvm2/dist/libdm/libdm-common.c:1.6 src/external/gpl2/lvm2/dist/libdm/libdm-common.c:1.7 --- src/external/gpl2/lvm2/dist/libdm/libdm-common.c:1.6 Sun Dec 26 14:48:34 2010 +++ src/external/gpl2/lvm2/dist/libdm/libdm-common.c Wed Dec 29 10:39:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: libdm-common.c,v 1.6 2010/12/26 14:48:34 christos Exp $ */ +/* $NetBSD: libdm-common.c,v 1.7 2010/12/29 10:39:27 haad Exp $ */ /* * Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved. @@ -418,16 +418,16 @@ dev_t dev = MKDEV(major, minor); mode_t old_mask; - #ifdef __NetBSD__ +#ifdef __NetBSD__ char rpath[PATH_MAX]; uint32_t raw_major; dev_t rdev; char raw_devname[DM_NAME_LEN+1]; /* r + other device name */ - nbsd_get_dm_major(&raw_major,DM_CHAR_MAJOR); - rdev = MKDEV(raw_major,minor); + nbsd_get_dm_major(&raw_major, DM_CHAR_MAJOR); + rdev = MKDEV(raw_major, minor); - snprintf(raw_devname,sizeof(raw_devname),"r%s",dev_name); + snprintf(raw_devname, sizeof(raw_devname), "r%s", dev_name); _build_dev_path(rpath, sizeof(rpath), raw_devname); @@ -457,8 +457,8 @@ } umask(old_mask); - if (chown(path, uid, gid) < 0) { - log_sys_error("chown", rpath); + if (chown(rpath, uid, gid) < 0) { + log_sys_error("Raw device chown", rpath); return 0; } #endif
CVS commit: [matt-nb5-mips64] src/sys/arch/sbmips/include
Module Name:src Committed By: matt Date: Wed Dec 29 08:19:58 UTC 2010 Modified Files: src/sys/arch/sbmips/include [matt-nb5-mips64]: cpuvar.h Log Message: Add some per-cpu interrupts counters to cpuvar. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/sys/arch/sbmips/include/cpuvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sbmips/include/cpuvar.h diff -u src/sys/arch/sbmips/include/cpuvar.h:1.1.2.1 src/sys/arch/sbmips/include/cpuvar.h:1.1.2.2 --- src/sys/arch/sbmips/include/cpuvar.h:1.1.2.1 Thu Mar 11 22:26:56 2010 +++ src/sys/arch/sbmips/include/cpuvar.h Wed Dec 29 08:19:58 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: cpuvar.h,v 1.1.2.1 2010/03/11 22:26:56 matt Exp $ */ +/* $NetBSD: cpuvar.h,v 1.1.2.2 2010/12/29 08:19:58 matt Exp $ */ #ifndef _SBMIPS_CPUVAR_H_ #define _SBMIPS_CPUVAR_H_ @@ -12,6 +12,9 @@ vaddr_t sb1cpu_imr_base; uint64_t sb1cpu_imr_all; struct evcnt sb1cpu_intr_evcnts[64]; + struct evcnt sb1cpu_spurious_intrs[_IPL_N]; + struct evcnt sb1cpu_intrs[_IPL_N]; + struct evcnt sb1cpu_int5; }; #endif /* _LOCORE */
CVS commit: [matt-nb5-mips64] src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Wed Dec 29 08:19:20 UTC 2010 Added Files: src/sys/arch/evbmips/conf [matt-nb5-mips64]: MALTA32.MP Log Message: Add a N32 MP config for MALTA. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/evbmips/conf/MALTA32.MP Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/evbmips/conf/MALTA32.MP diff -u /dev/null src/sys/arch/evbmips/conf/MALTA32.MP:1.1.2.1 --- /dev/null Wed Dec 29 08:19:20 2010 +++ src/sys/arch/evbmips/conf/MALTA32.MP Wed Dec 29 08:19:19 2010 @@ -0,0 +1,8 @@ +# $NetBSD: MALTA32.MP,v 1.1.2.1 2010/12/29 08:19:19 matt Exp $ +# +include "arch/evbmips/conf/MALTA32" + +options MULTIPROCESSOR +options LOCKDEBUG + +pseudo-device lockstat
CVS commit: [matt-nb5-mips64] src/sys/arch/pmax/pmax
Module Name:src Committed By: matt Date: Wed Dec 29 08:18:29 UTC 2010 Modified Files: src/sys/arch/pmax/pmax [matt-nb5-mips64]: interrupt.c Log Message: Kill StudlyCaps To generate a diff of this commit: cvs rdiff -u -r1.15.18.3 -r1.15.18.4 src/sys/arch/pmax/pmax/interrupt.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/pmax/pmax/interrupt.c diff -u src/sys/arch/pmax/pmax/interrupt.c:1.15.18.3 src/sys/arch/pmax/pmax/interrupt.c:1.15.18.4 --- src/sys/arch/pmax/pmax/interrupt.c:1.15.18.3 Fri Dec 24 07:23:42 2010 +++ src/sys/arch/pmax/pmax/interrupt.c Wed Dec 29 08:18:29 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.15.18.3 2010/12/24 07:23:42 matt Exp $ */ +/* $NetBSD: interrupt.c,v 1.15.18.4 2010/12/29 08:18:29 matt Exp $ */ /*- * Copyright (c) 2001, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.15.18.3 2010/12/24 07:23:42 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.15.18.4 2010/12/29 08:18:29 matt Exp $"); #include #include @@ -59,8 +59,6 @@ EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "memerr", "intr"); EVCNT_ATTACH_STATIC(pmax_memerr_evcnt); -void MachFPInterrupt(uint32_t, uint32_t, uint32_t, struct trapframe *); - static const char * const intrnames[] = { "serial0", "serial1", @@ -109,9 +107,7 @@ "PC %#"PRIxVADDR", SR %#x", pc, status); pmax_fpu_evcnt.ev_count++; - MachFPInterrupt(status, - curlwp->l_md.md_utf->tf_regs[_R_CAUSE], pc, - curlwp->l_md.md_utf); + mips_fpu_intr(pc, curlwp->l_md.md_utf); } #endif }
CVS commit: [matt-nb5-mips64] src/sys/arch/cobalt/dev
Module Name:src Committed By: matt Date: Wed Dec 29 08:18:06 UTC 2010 Modified Files: src/sys/arch/cobalt/dev [matt-nb5-mips64]: panel.c Log Message: Sync with netbsd-5 To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.18.16.1 src/sys/arch/cobalt/dev/panel.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/cobalt/dev/panel.c diff -u src/sys/arch/cobalt/dev/panel.c:1.18 src/sys/arch/cobalt/dev/panel.c:1.18.16.1 --- src/sys/arch/cobalt/dev/panel.c:1.18 Fri May 9 10:59:55 2008 +++ src/sys/arch/cobalt/dev/panel.c Wed Dec 29 08:18:05 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: panel.c,v 1.18 2008/05/09 10:59:55 tsutsui Exp $ */ +/* $NetBSD: panel.c,v 1.18.16.1 2010/12/29 08:18:05 matt Exp $ */ /* * Copyright (c) 2002 Dennis I. Chernoivanov @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: panel.c,v 1.18 2008/05/09 10:59:55 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: panel.c,v 1.18.16.1 2010/12/29 08:18:05 matt Exp $"); #include #include @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -76,14 +77,18 @@ "NetBSD/cobalt ", "Starting up... " }; -static const struct lcd_message shutdown_message = { +static const struct lcd_message halt_message = { "NetBSD/cobalt ", - "Shutting down..." + "Halting... " +}; +static const struct lcd_message reboot_message = { + "NetBSD/cobalt ", + "Rebooting..." }; static int panel_match(device_t, cfdata_t, void *); static void panel_attach(device_t, device_t, void *); -static void panel_shutdown(void *); +static bool panel_shutdown(device_t, int); static void panel_soft(void *); @@ -139,6 +144,8 @@ bus_space_subregion(sc->sc_lcd.sc_iot, sc->sc_lcd.sc_ioir, DATA_OFFSET, 1, &sc->sc_lcd.sc_iodr); + printf("\n"); + sc->sc_lcd.sc_dev_ok = 1; sc->sc_lcd.sc_cols = PANEL_COLS; sc->sc_lcd.sc_vcols = PANEL_VCOLS; @@ -156,7 +163,7 @@ hd44780_ddram_io(&sc->sc_lcd, sc->sc_lcd.sc_curchip, &io, HD_DDRAM_WRITE); - shutdownhook_establish(panel_shutdown, sc); + pmf_device_register1(self, NULL, NULL, panel_shutdown); sc->sc_kp.sc_iot = maa->ma_iot; sc->sc_kp.sc_ioh = MIPS_PHYS_TO_KSEG1(PANEL_BASE); /* XXX */ @@ -169,22 +176,25 @@ callout_init(&sc->sc_callout, 0); selinit(&sc->sc_selq); - - printf("\n"); } -static void -panel_shutdown(void *arg) +static bool +panel_shutdown(device_t self, int howto) { - struct panel_softc *sc = arg; + struct panel_softc *sc = device_private(self); struct hd44780_io io; /* Goodbye World */ io.dat = 0; io.len = PANEL_VCOLS * PANEL_ROWS; - memcpy(io.buf, &shutdown_message, io.len); + if (howto & RB_HALT) + memcpy(io.buf, &halt_message, io.len); + else + memcpy(io.buf, &reboot_message, io.len); hd44780_ddram_io(&sc->sc_lcd, sc->sc_lcd.sc_curchip, &io, HD_DDRAM_WRITE); + + return true; } static uint8_t
CVS commit: [matt-nb5-mips64] src/sys/arch
Module Name:src Committed By: matt Date: Wed Dec 29 08:16:23 UTC 2010 Modified Files: src/sys/arch/ews4800mips/ews4800mips [matt-nb5-mips64]: autoconf.c interrupt.c mainbus.c tr2.c tr2_intr.c tr2a.c tr2a_intr.c src/sys/arch/ews4800mips/include [matt-nb5-mips64]: intr.h sbdvar.h src/sys/arch/hpcmips/hpcmips [matt-nb5-mips64]: autoconf.c hpcapm_machdep.c interrupt.c machdep.c src/sys/arch/hpcmips/include [matt-nb5-mips64]: intr.h sysconf.h src/sys/arch/hpcmips/tx [matt-nb5-mips64]: tx39.c src/sys/arch/hpcmips/vr [matt-nb5-mips64]: vr.c src/sys/arch/mipsco/include [matt-nb5-mips64]: intr.h sysconf.h src/sys/arch/mipsco/mipsco [matt-nb5-mips64]: autoconf.c interrupt.c machdep.c mips_3x30.c Log Message: Adapt to the new interrupt framework. (XXX hpcmips still has calls to _spllower which are not supported.) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.7.18.1 src/sys/arch/ews4800mips/ews4800mips/autoconf.c cvs rdiff -u -r1.4.18.1 -r1.4.18.2 \ src/sys/arch/ews4800mips/ews4800mips/interrupt.c cvs rdiff -u -r1.4 -r1.4.18.1 src/sys/arch/ews4800mips/ews4800mips/mainbus.c cvs rdiff -u -r1.3.18.1 -r1.3.18.2 src/sys/arch/ews4800mips/ews4800mips/tr2.c \ src/sys/arch/ews4800mips/ews4800mips/tr2a.c cvs rdiff -u -r1.10 -r1.10.18.1 \ src/sys/arch/ews4800mips/ews4800mips/tr2_intr.c cvs rdiff -u -r1.12 -r1.12.18.1 \ src/sys/arch/ews4800mips/ews4800mips/tr2a_intr.c cvs rdiff -u -r1.10 -r1.10.18.1 src/sys/arch/ews4800mips/include/intr.h cvs rdiff -u -r1.4 -r1.4.18.1 src/sys/arch/ews4800mips/include/sbdvar.h cvs rdiff -u -r1.21 -r1.21.28.1 src/sys/arch/hpcmips/hpcmips/autoconf.c cvs rdiff -u -r1.2 -r1.2.96.1 src/sys/arch/hpcmips/hpcmips/hpcapm_machdep.c cvs rdiff -u -r1.13 -r1.13.18.1 src/sys/arch/hpcmips/hpcmips/interrupt.c cvs rdiff -u -r1.96.10.5 -r1.96.10.6 src/sys/arch/hpcmips/hpcmips/machdep.c cvs rdiff -u -r1.22 -r1.22.28.1 src/sys/arch/hpcmips/include/intr.h cvs rdiff -u -r1.13 -r1.13.62.1 src/sys/arch/hpcmips/include/sysconf.h cvs rdiff -u -r1.39.18.1 -r1.39.18.2 src/sys/arch/hpcmips/tx/tx39.c cvs rdiff -u -r1.51.22.1 -r1.51.22.2 src/sys/arch/hpcmips/vr/vr.c cvs rdiff -u -r1.16.36.1 -r1.16.36.2 src/sys/arch/mipsco/include/intr.h cvs rdiff -u -r1.4 -r1.4.62.1 src/sys/arch/mipsco/include/sysconf.h cvs rdiff -u -r1.18 -r1.18.36.1 src/sys/arch/mipsco/mipsco/autoconf.c cvs rdiff -u -r1.6.18.1 -r1.6.18.2 src/sys/arch/mipsco/mipsco/interrupt.c cvs rdiff -u -r1.58.10.3 -r1.58.10.4 src/sys/arch/mipsco/mipsco/machdep.c cvs rdiff -u -r1.10.18.1 -r1.10.18.2 src/sys/arch/mipsco/mipsco/mips_3x30.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/ews4800mips/ews4800mips/autoconf.c diff -u src/sys/arch/ews4800mips/ews4800mips/autoconf.c:1.7 src/sys/arch/ews4800mips/ews4800mips/autoconf.c:1.7.18.1 --- src/sys/arch/ews4800mips/ews4800mips/autoconf.c:1.7 Mon Apr 28 20:23:18 2008 +++ src/sys/arch/ews4800mips/ews4800mips/autoconf.c Wed Dec 29 08:16:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.7 2008/04/28 20:23:18 martin Exp $ */ +/* $NetBSD: autoconf.c,v 1.7.18.1 2010/12/29 08:16:21 matt Exp $ */ /*- * Copyright (c) 2001, 2004 The NetBSD Foundation, Inc. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.7 2008/04/28 20:23:18 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.7.18.1 2010/12/29 08:16:21 matt Exp $"); #include "opt_sbd.h" @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -50,7 +51,7 @@ splhigh(); if (config_rootfound("mainbus", NULL) == NULL) panic("no mainbus found"); - _splnone(); + spl0(); } void Index: src/sys/arch/ews4800mips/ews4800mips/interrupt.c diff -u src/sys/arch/ews4800mips/ews4800mips/interrupt.c:1.4.18.1 src/sys/arch/ews4800mips/ews4800mips/interrupt.c:1.4.18.2 --- src/sys/arch/ews4800mips/ews4800mips/interrupt.c:1.4.18.1 Fri Feb 5 07:39:53 2010 +++ src/sys/arch/ews4800mips/ews4800mips/interrupt.c Wed Dec 29 08:16:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.4.18.1 2010/02/05 07:39:53 matt Exp $ */ +/* $NetBSD: interrupt.c,v 1.4.18.2 2010/12/29 08:16:21 matt Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.4.18.1 2010/02/05 07:39:53 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.4.18.2 2010/12/29 08:16:21 matt Exp $"); #include #include @@ -39,8 +39,7 @@ #include -const uint32_t *ipl_sr_bits; -static void (*platform_intr)(uint32_t, uint32_t, uint32_t, uint32_t); +static void (*platform_intr)(int, vaddr_t, uint32_t); void intr_init(void) @@ -65,21 +64,9 @@ } void -cpu_intr(uint32_t status, uint32_t cause, uint32_t pc, uint32_t ipending) +cpu_intr(int ppl, vaddr_t pc, uint32_t status) { - struct cpu_info *ci; - - ci = curcpu(
CVS commit: [matt-nb5-mips64] src/sys/arch/newsmips
Module Name:src Committed By: matt Date: Wed Dec 29 08:14:43 UTC 2010 Modified Files: src/sys/arch/newsmips/apbus [matt-nb5-mips64]: apbus.c if_snvar.h src/sys/arch/newsmips/dev [matt-nb5-mips64]: hb.c scsi_1185.c src/sys/arch/newsmips/include [matt-nb5-mips64]: intr.h src/sys/arch/newsmips/newsmips [matt-nb5-mips64]: autoconf.c clock.c machdep.c news3400.c news5000.c Log Message: Adapt to the new interrupt framework. Use mips_set_wbflush instead of playing preprocessor games. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.21.22.1 src/sys/arch/newsmips/apbus/apbus.c cvs rdiff -u -r1.12 -r1.12.22.1 src/sys/arch/newsmips/apbus/if_snvar.h cvs rdiff -u -r1.18 -r1.18.22.1 src/sys/arch/newsmips/dev/hb.c cvs rdiff -u -r1.19 -r1.19.22.1 src/sys/arch/newsmips/dev/scsi_1185.c cvs rdiff -u -r1.23 -r1.23.18.1 src/sys/arch/newsmips/include/intr.h cvs rdiff -u -r1.32 -r1.32.28.1 src/sys/arch/newsmips/newsmips/autoconf.c cvs rdiff -u -r1.15 -r1.15.78.1 src/sys/arch/newsmips/newsmips/clock.c cvs rdiff -u -r1.98.10.5 -r1.98.10.6 src/sys/arch/newsmips/newsmips/machdep.c cvs rdiff -u -r1.19.36.1 -r1.19.36.2 \ src/sys/arch/newsmips/newsmips/news3400.c cvs rdiff -u -r1.17 -r1.17.36.1 src/sys/arch/newsmips/newsmips/news5000.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/newsmips/apbus/apbus.c diff -u src/sys/arch/newsmips/apbus/apbus.c:1.21 src/sys/arch/newsmips/apbus/apbus.c:1.21.22.1 --- src/sys/arch/newsmips/apbus/apbus.c:1.21 Wed Apr 9 15:40:30 2008 +++ src/sys/arch/newsmips/apbus/apbus.c Wed Dec 29 08:14:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: apbus.c,v 1.21 2008/04/09 15:40:30 tsutsui Exp $ */ +/* $NetBSD: apbus.c,v 1.21.22.1 2010/12/29 08:14:42 matt Exp $ */ /*- * Copyright (C) 1999 SHIMIZU Ryo. All rights reserved. @@ -27,13 +27,16 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.21 2008/04/09 15:40:30 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: apbus.c,v 1.21.22.1 2010/12/29 08:14:42 matt Exp $"); + +#define __INTR_PRIVATE #include #include #include #include #include +#include #include @@ -41,7 +44,6 @@ #include #define _NEWSMIPS_BUS_DMA_PRIVATE #include -#include #include static int apbusmatch(device_t, cfdata_t, void *); @@ -97,6 +99,8 @@ struct newsmips_intr *ip; int i; + mips_set_wbflush(apbus_wbflush); + *(volatile uint32_t *)(NEWS5000_APBUS_INTST) = 0x; *(volatile uint32_t *)(NEWS5000_APBUS_INTMSK) = 0x; *(volatile uint32_t *)(NEWS5000_APBUS_CTRL) = 0x0004; @@ -176,9 +180,10 @@ void apbus_wbflush(void) { - volatile int32_t *wbflush = (uint32_t *)NEWS5000_WBFLUSH; + volatile int32_t * const our_wbflush = (int32_t *)NEWS5000_WBFLUSH; - (void)*wbflush; + (*mips_locore_jumpvec.ljv_wbflush)(); + (void)*our_wbflush; } /* Index: src/sys/arch/newsmips/apbus/if_snvar.h diff -u src/sys/arch/newsmips/apbus/if_snvar.h:1.12 src/sys/arch/newsmips/apbus/if_snvar.h:1.12.22.1 --- src/sys/arch/newsmips/apbus/if_snvar.h:1.12 Wed Apr 9 15:40:30 2008 +++ src/sys/arch/newsmips/apbus/if_snvar.h Wed Dec 29 08:14:42 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: if_snvar.h,v 1.12 2008/04/09 15:40:30 tsutsui Exp $ */ +/* $NetBSD: if_snvar.h,v 1.12.22.1 2010/12/29 08:14:42 matt Exp $ */ /* * Copyright (c) 1991 Algorithmics Ltd (http://www.algor.co.uk) @@ -32,14 +32,6 @@ #define SN_REGSIZE (SN_NREGS * 4) #include -#undef wbflush /* XXX */ - -static inline void -wbflush(void) -{ - mips3_wbflush(); - apbus_wbflush(); -}; /* * buffer sizes in 32 bit mode Index: src/sys/arch/newsmips/dev/hb.c diff -u src/sys/arch/newsmips/dev/hb.c:1.18 src/sys/arch/newsmips/dev/hb.c:1.18.22.1 --- src/sys/arch/newsmips/dev/hb.c:1.18 Wed Apr 9 15:40:30 2008 +++ src/sys/arch/newsmips/dev/hb.c Wed Dec 29 08:14:43 2010 @@ -1,15 +1,16 @@ -/* $NetBSD: hb.c,v 1.18 2008/04/09 15:40:30 tsutsui Exp $ */ +/* $NetBSD: hb.c,v 1.18.22.1 2010/12/29 08:14:43 matt Exp $ */ #include -__KERNEL_RCSID(0, "$NetBSD: hb.c,v 1.18 2008/04/09 15:40:30 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hb.c,v 1.18.22.1 2010/12/29 08:14:43 matt Exp $"); +#define __INTR_PRIVATE #include #include #include #include +#include #include -#include #include Index: src/sys/arch/newsmips/dev/scsi_1185.c diff -u src/sys/arch/newsmips/dev/scsi_1185.c:1.19 src/sys/arch/newsmips/dev/scsi_1185.c:1.19.22.1 --- src/sys/arch/newsmips/dev/scsi_1185.c:1.19 Wed Apr 9 15:40:30 2008 +++ src/sys/arch/newsmips/dev/scsi_1185.c Wed Dec 29 08:14:43 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: scsi_1185.c,v 1.19 2008/04/09 15:40:30 tsutsui Exp $ */ +/* $NetBSD: scsi_1185.c,v 1.19.22.1 2010/12/29 08:14:43 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -53,11 +53,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: scsi_1185.c,v 1.19 2008/04/09 15:40:30 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: scsi_1185.c,v 1.19.22.1 201
CVS commit: [matt-nb5-mips64] src/sys/arch/mips
Module Name:src Committed By: matt Date: Wed Dec 29 08:13:38 UTC 2010 Modified Files: src/sys/arch/mips/include [matt-nb5-mips64]: locore.h src/sys/arch/mips/mips [matt-nb5-mips64]: locore_mips1.S mipsX_subr.S Log Message: Add wbflush to jumpvec while leaving it in locoresw. This allows to overwrite wbflush in locoresw but still be able to call it via jumpvec. To generate a diff of this commit: cvs rdiff -u -r1.78.36.1.2.27 -r1.78.36.1.2.28 \ src/sys/arch/mips/include/locore.h cvs rdiff -u -r1.64.26.1.2.11 -r1.64.26.1.2.12 \ src/sys/arch/mips/mips/locore_mips1.S cvs rdiff -u -r1.26.36.1.2.38 -r1.26.36.1.2.39 \ src/sys/arch/mips/mips/mipsX_subr.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/include/locore.h diff -u src/sys/arch/mips/include/locore.h:1.78.36.1.2.27 src/sys/arch/mips/include/locore.h:1.78.36.1.2.28 --- src/sys/arch/mips/include/locore.h:1.78.36.1.2.27 Wed Dec 29 00:39:39 2010 +++ src/sys/arch/mips/include/locore.h Wed Dec 29 08:13:37 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.h,v 1.78.36.1.2.27 2010/12/29 00:39:39 matt Exp $ */ +/* $NetBSD: locore.h,v 1.78.36.1.2.28 2010/12/29 08:13:37 matt Exp $ */ /* * This file should not be included by MI code!!! @@ -332,6 +332,7 @@ void (*ljv_cpu_switch_resume)(struct lwp *); intptr_t ljv_lwp_trampoline; intptr_t ljv_setfunc_trampoline; + void (*ljv_wbflush)(void); void (*ljv_tlb_set_asid)(uint32_t pid); void (*ljv_tlb_invalidate_asids)(uint32_t, uint32_t); void (*ljv_tlb_invalidate_addr)(vaddr_t); @@ -350,6 +351,9 @@ void stacktrace(void); void logstacktrace(void); +struct cpu_info; +struct splsw; + struct locoresw { void (*lsw_wbflush)(void); void (*lsw_cpu_idle)(void); @@ -370,11 +374,8 @@ */ extern mips_locore_jumpvec_t mips_locore_jumpvec; extern struct locoresw mips_locoresw; -struct lwpsw; extern void mips_vector_init(const struct splsw *); -/* cpu_switch_resume is called inside locore.S */ - /* * CPU identification, from PRID register. */ Index: src/sys/arch/mips/mips/locore_mips1.S diff -u src/sys/arch/mips/mips/locore_mips1.S:1.64.26.1.2.11 src/sys/arch/mips/mips/locore_mips1.S:1.64.26.1.2.12 --- src/sys/arch/mips/mips/locore_mips1.S:1.64.26.1.2.11 Wed Dec 29 00:39:39 2010 +++ src/sys/arch/mips/mips/locore_mips1.S Wed Dec 29 08:13:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: locore_mips1.S,v 1.64.26.1.2.11 2010/12/29 00:39:39 matt Exp $ */ +/* $NetBSD: locore_mips1.S,v 1.64.26.1.2.12 2010/12/29 08:13:38 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -1639,6 +1639,7 @@ PTR_WORD _C_LABEL(MIPSX(cpu_switch_resume)) PTR_WORD _C_LABEL(MIPSX(lwp_trampoline)) PTR_WORD _C_LABEL(MIPSX(setfunc_trampoline)) + PTR_WORD _C_LABEL(MIPSX(wbflush)) # wbflush PTR_WORD _C_LABEL(MIPSX(tlb_set_asid)) PTR_WORD _C_LABEL(MIPSX(tlb_invalidate_asids)) PTR_WORD _C_LABEL(MIPSX(tlb_invalidate_addr)) Index: src/sys/arch/mips/mips/mipsX_subr.S diff -u src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.38 src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.39 --- src/sys/arch/mips/mips/mipsX_subr.S:1.26.36.1.2.38 Wed Dec 29 00:39:39 2010 +++ src/sys/arch/mips/mips/mipsX_subr.S Wed Dec 29 08:13:38 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: mipsX_subr.S,v 1.26.36.1.2.38 2010/12/29 00:39:39 matt Exp $ */ +/* $NetBSD: mipsX_subr.S,v 1.26.36.1.2.39 2010/12/29 08:13:38 matt Exp $ */ /* * Copyright 2002 Wasabi Systems, Inc. @@ -2645,6 +2645,7 @@ PTR_WORD _C_LABEL(MIPSX(cpu_switch_resume)) PTR_WORD _C_LABEL(MIPSX(lwp_trampoline)) PTR_WORD _C_LABEL(MIPSX(setfunc_trampoline)) + PTR_WORD _C_LABEL(MIPSX(wbflush)) # wbflush PTR_WORD _C_LABEL(MIPSX(tlb_set_asid)) PTR_WORD _C_LABEL(MIPSX(tlb_invalidate_asids)) PTR_WORD _C_LABEL(MIPSX(tlb_invalidate_addr))