svn commit: r194941 - head/sys/kern
Author: rwatson Date: Thu Jun 25 07:16:10 2009 New Revision: 194941 URL: http://svn.freebsd.org/changeset/base/194941 Log: oshmctl() now requires a sysv_shm.c-local function prototype. Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c == --- head/sys/kern/sysv_shm.cThu Jun 25 04:25:26 2009(r194940) +++ head/sys/kern/sysv_shm.cThu Jun 25 07:16:10 2009(r194941) @@ -116,6 +116,10 @@ struct shmmap_state { int shmid; }; +#if defined(__i386__) && (defined(COMPAT_FREEBSD4) || defined(COMPAT_43)) +struct oshmctl_args; +static int oshmctl(struct thread *td, struct oshmctl_args *uap); +#endif static void shm_deallocate_segment(struct shmid_kernel *); static int shm_find_segment_by_key(key_t); static struct shmid_kernel *shm_find_segment_by_shmid(int); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194942 - head/sys/i386/ibcs2
Author: rwatson Date: Thu Jun 25 07:25:39 2009 New Revision: 194942 URL: http://svn.freebsd.org/changeset/base/194942 Log: Fix ibcs2_ipc.c build by adding missing limits.h include. Submitted by: keramida Modified: head/sys/i386/ibcs2/ibcs2_ipc.c Modified: head/sys/i386/ibcs2/ibcs2_ipc.c == --- head/sys/i386/ibcs2/ibcs2_ipc.c Thu Jun 25 07:16:10 2009 (r194941) +++ head/sys/i386/ibcs2/ibcs2_ipc.c Thu Jun 25 07:25:39 2009 (r194942) @@ -28,6 +28,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194927 - in head: share/man/man4 sys/net
On Thu, 25 Jun 2009, Daniel O'Connor wrote: On Thu, 25 Jun 2009, Bjoern A. Zeeb wrote: Author: bz Date: Wed Jun 24 22:21:30 2009 New Revision: 194927 URL: http://svn.freebsd.org/changeset/base/194927 Log: Merge from p4: CH154790,154793,154874 Import if_epair(4), a virtual cross-over Ethernet-like interface pair. Can't you already do this pretty easily with netgraph? ie connect 2 ng_eiface's together. Although that said, the ng docs leave a bit to be desired if you want to actually do it ;) Yes, but this explicitly there to avoid the mandaotry dependency of netgraph for vnets once you are out of physical interfaces. The much I like netgraph for some things the much people like to be able to avoid it, also for simplicitly, if they do neither need nor know it. /bz -- Bjoern A. Zeeb The greatest risk is not taking one. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194943 - head/sys/netinet6
Author: rwatson Date: Thu Jun 25 08:37:38 2009 New Revision: 194943 URL: http://svn.freebsd.org/changeset/base/194943 Log: Clean up reference management in in6_update_ifa and in6_unlink_ifa, and in particular, add a reference for in6_ifaddrhead since we do remove a reference for it when an IPv6 address is removed. This fixes ifconfig delete of an IPv6 alias. Reported by: tegge MFC after:6 weeks Modified: head/sys/netinet6/in6.c Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Thu Jun 25 07:25:39 2009(r194942) +++ head/sys/netinet6/in6.c Thu Jun 25 08:37:38 2009(r194943) @@ -831,6 +831,7 @@ in6_update_ifa(struct ifnet *ifp, struct TAILQ_INSERT_TAIL(&ifp->if_addrhead, &ia->ia_ifa, ifa_link); IF_ADDR_UNLOCK(ifp); + ifa_ref(&ia->ia_ifa); /* in6_if_addrhead */ TAILQ_INSERT_TAIL(&V_in6_ifaddrhead, ia, ia_link); } @@ -1147,8 +1148,8 @@ in6_update_ifa(struct ifnet *ifp, struct * anyway. */ if (hostIsNew) { - ifa_free(&ia->ia_ifa); in6_unlink_ifa(ia, ifp); + ifa_free(&ia->ia_ifa); } return (error); @@ -1376,6 +1377,7 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st ifa_free(&ia->ia_ifa); /* if_addrhead */ TAILQ_REMOVE(&V_in6_ifaddrhead, ia, ia_link); + ifa_free(&ia->ia_ifa); /* in6_ifaddrhead */ /* * Release the reference to the base prefix. There should be a @@ -1399,12 +1401,6 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st pfxlist_onlink_check(); } - /* -* release another refcnt for the link from in6_ifaddr. -* Note that we should decrement the refcnt at least once for all *BSD. -*/ - ifa_free(&ia->ia_ifa); - splx(s); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194944 - in head/sys/gnu/fs/xfs: . FreeBSD
Author: rdivacky Date: Thu Jun 25 08:52:20 2009 New Revision: 194944 URL: http://svn.freebsd.org/changeset/base/194944 Log: Switch cmd argument of ioctl to u_long as elsewhere in the kernel. Propagate this change down the callchain. Approved by: kan (maintainer) Approved by: ed (mentor) Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c head/sys/gnu/fs/xfs/FreeBSD/xfs_iops.h head/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h head/sys/gnu/fs/xfs/xfs_rw.h head/sys/gnu/fs/xfs/xfs_vnodeops.c Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c == --- head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Thu Jun 25 08:37:38 2009 (r194943) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Thu Jun 25 08:52:20 2009 (r194944) @@ -703,7 +703,7 @@ xfs_ioc_space( xfs_vnode_t *vp, struct file *filp, int flags, - unsigned intcmd, + u_long cmd, void__user *arg); STATIC int @@ -749,7 +749,7 @@ xfs_ioctl( struct inode*inode, struct file *filp, int ioflags, - unsigned intcmd, + u_long cmd, void*arg) { int error; @@ -1021,7 +1021,7 @@ xfs_ioc_space( xfs_vnode_t *vp, struct file *filp, int ioflags, - unsigned intcmd, + u_long cmd, void__user *arg) { xfs_flock64_t bf; @@ -1455,7 +1455,7 @@ xfs_ioctl( struct inode*inode, struct file *filp, int ioflags, - unsigned intcmd, + u_long cmd, unsigned long arg) { return EINVAL; Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_iops.h == --- head/sys/gnu/fs/xfs/FreeBSD/xfs_iops.h Thu Jun 25 08:37:38 2009 (r194943) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_iops.h Thu Jun 25 08:52:20 2009 (r194944) @@ -56,6 +56,6 @@ typedef struct xattr_namespace { extern struct xattr_namespace *xfs_namespaces; extern int xfs_ioctl(struct bhv_desc *, struct inode *, struct file *, - int, unsigned int, void *); + int, u_long, void *); #endif /* __XFS_IOPS_H__ */ Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h == --- head/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h Thu Jun 25 08:37:38 2009 (r194943) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_vnode.h Thu Jun 25 08:52:20 2009 (r194944) @@ -182,7 +182,7 @@ typedef int (*xfs_vop_open_t)(bhv_desc_t typedef ssize_t (*xfs_vop_read_t)(bhv_desc_t *, uio_t *, int, struct cred *); typedef ssize_t (*xfs_vop_write_t)(bhv_desc_t *, uio_t *, int, struct cred *); typedef int(*xfs_vop_ioctl_t)(bhv_desc_t *, struct inode *, struct file *, - int, unsigned int, void *); + int, u_long, void *); typedef int(*xfs_vop_getattr_t)(bhv_desc_t *, struct xfs_vattr *, int, struct cred *); typedef int(*xfs_vop_setattr_t)(bhv_desc_t *, struct xfs_vattr *, int, Modified: head/sys/gnu/fs/xfs/xfs_rw.h == --- head/sys/gnu/fs/xfs/xfs_rw.hThu Jun 25 08:37:38 2009 (r194943) +++ head/sys/gnu/fs/xfs/xfs_rw.hThu Jun 25 08:52:20 2009 (r194944) @@ -90,7 +90,7 @@ extern void xfs_ioerror_alert(char *func extern int xfs_rwlock(bhv_desc_t *bdp, vrwlock_t write_lock); extern void xfs_rwunlock(bhv_desc_t *bdp, vrwlock_t write_lock); extern int xfs_setattr(bhv_desc_t *bdp, xfs_vattr_t *vap, int flags, cred_t *credp); -extern int xfs_change_file_space(bhv_desc_t *bdp, int cmd, xfs_flock64_t *bf, +extern int xfs_change_file_space(bhv_desc_t *bdp, u_long cmd, xfs_flock64_t *bf, xfs_off_t offset, cred_t *credp, int flags); extern int xfs_set_dmattrs(bhv_desc_t *bdp, u_int evmask, u_int16_t state, cred_t *credp); Modified: head/sys/gnu/fs/xfs/xfs_vnodeops.c == --- head/sys/gnu/fs/xfs/xfs_vnodeops.c Thu Jun 25 08:37:38 2009 (r194943) +++ head/sys/gnu/fs/xfs/xfs_vnodeops.c Thu Jun 25 08:52:20 2009 (r194944) @@ -4506,7 +4506,7 @@ xfs_free_file_space( int xfs_change_file_space( bhv_desc_t *bdp, - int cmd, + u_long cmd, xfs_flock64_t *bf, xfs_off_t offset, cred_t *cre
svn commit: r194945 - stable/7/usr.sbin/syslogd
Author: avg Date: Thu Jun 25 09:07:40 2009 New Revision: 194945 URL: http://svn.freebsd.org/changeset/base/194945 Log: MFC r194037: syslog.conf(5): correct example Modified: stable/7/usr.sbin/syslogd/ (props changed) stable/7/usr.sbin/syslogd/syslog.conf.5 Modified: stable/7/usr.sbin/syslogd/syslog.conf.5 == --- stable/7/usr.sbin/syslogd/syslog.conf.5 Thu Jun 25 08:52:20 2009 (r194944) +++ stable/7/usr.sbin/syslogd/syslog.conf.5 Thu Jun 25 09:07:40 2009 (r194945) @@ -476,16 +476,16 @@ uucp,news.crit /var/log/spoolerr # Pipe all authentication messages to a filter. auth.* |exec /usr/local/sbin/authfilter -# Save ftpd transactions along with mail and news -!ftpd -*.*/var/log/spoolerr - # Log all security messages to a separate file. security.* /var/log/security # Log all writes to /dev/console to a separate file. console.* /var/log/console.log +# Save ftpd transactions along with mail and news +!ftpd +*.*/var/log/spoolerr + # Log ipfw messages without syncing after every message. !ipfw *.*-/var/log/ipfw ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194946 - in stable/7/contrib/gdb: . gdb
Author: avg Date: Thu Jun 25 09:17:50 2009 New Revision: 194946 URL: http://svn.freebsd.org/changeset/base/194946 Log: MFC r194061: gdb: make 'thread apply all bt' always work on all threads Modified: stable/7/contrib/gdb/ (props changed) stable/7/contrib/gdb/gdb/stack.c Modified: stable/7/contrib/gdb/gdb/stack.c == --- stable/7/contrib/gdb/gdb/stack.cThu Jun 25 09:07:40 2009 (r194945) +++ stable/7/contrib/gdb/gdb/stack.cThu Jun 25 09:17:50 2009 (r194946) @@ -1230,6 +1230,22 @@ backtrace_command_1 (char *count_exp, in printf_filtered ("(More stack frames follow...)\n"); } +struct backtrace_command_args + { +char *count_exp; +int show_locals; +int from_tty; + }; + +/* Stub to call backtrace_command_1 by way of an error catcher. */ +static int +backtrace_command_stub (void *data) +{ + struct backtrace_command_args *args = (struct backtrace_command_args *)data; + backtrace_command_1 (args->count_exp, args->show_locals, args->from_tty); + return 0; +} + static void backtrace_command (char *arg, int from_tty) { @@ -1237,6 +1253,7 @@ backtrace_command (char *arg, int from_t char **argv = (char **) NULL; int argIndicatingFullTrace = (-1), totArgLen = 0, argc = 0; char *argPtr = arg; + struct backtrace_command_args btargs; if (arg != (char *) NULL) { @@ -1286,7 +1303,10 @@ backtrace_command (char *arg, int from_t } } - backtrace_command_1 (argPtr, (argIndicatingFullTrace >= 0), from_tty); + btargs.count_exp = argPtr; + btargs.show_locals = (argIndicatingFullTrace >= 0); + btargs.from_tty = from_tty; + catch_errors (backtrace_command_stub, (char *)&btargs, "", RETURN_MASK_ERROR); if (argIndicatingFullTrace >= 0 && totArgLen > 0) xfree (argPtr); @@ -1299,7 +1319,11 @@ static void backtrace_full_command (char static void backtrace_full_command (char *arg, int from_tty) { - backtrace_command_1 (arg, 1, from_tty); + struct backtrace_command_args btargs; + btargs.count_exp = arg; + btargs.show_locals = 1; + btargs.from_tty = from_tty; + catch_errors (backtrace_command_stub, (char *)&btargs, "", RETURN_MASK_ERROR); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194947 - head/share/man/man8
Author: luigi Date: Thu Jun 25 09:28:04 2009 New Revision: 194947 URL: http://svn.freebsd.org/changeset/base/194947 Log: update the manpage to track existing options (including --iso), and alphabetize them. MFC after:3 days Modified: head/share/man/man8/picobsd.8 Modified: head/share/man/man8/picobsd.8 == --- head/share/man/man8/picobsd.8 Thu Jun 25 09:17:50 2009 (r194946) +++ head/share/man/man8/picobsd.8 Thu Jun 25 09:28:04 2009 (r194947) @@ -1,6 +1,6 @@ .\" -*- nroff-fill -*- .\" $FreeBSD$ -.Dd January 31, 2006 +.Dd June 25, 2009 .Os .Dt PICOBSD 8 .Sh NAME @@ -49,9 +49,83 @@ After the boot phase, the system runs en .Pp The following options are available (but also check the .Nm -script for more details): +script for more details). +The most important options for common operations are +.Fl src , +.Fl init , +.Fl n and +.Fl v. .Pp .Bl -tag -width indent +.\" +.It Fl -all_in_mfs +Put the entire contents of the file system in the +memory file system image which is contained in the +kernel. +This is the default behaviour, and is +extremely useful as the kernel itself can be loaded, +using +.Xr etherboot +or +.Xr pxeboot 8 , +.\" +.It Fl c , Fl clean +Clean the product of previous builds. +.\" +.It Fl -cfg Ar file +Specify a file that contains additional config commands. +.\" +.It Fl -floppy_size Ar size +Set the size of the disk image. +Typical values for a floppy disk are 1440 or 2880, +but other values can be used for other media (flash memories, +CDROM, network booted kernels). +Note that this option is overridden by the content of the +config files (config in the image tree, or the one +specified with +.Fl Fl cfg ) +.\" +.It Fl -init +When used together with the +.Fl -src +option, this initializes the +.Ao Ar SRC_PATH Ac Ns Pa /../usr +subtree as necessary to subsequently build +.Nm +images. +.\" +.It Fl -iso +Generate an ISO image, picobsd.iso, in addition to the disk image picobsd.bin +.\" +.It Fl -modules +Also build kernel modules. +These are not stored on the +.Nm +image but are left available in the build directory. +.\" +.It Fl n +Make the script non-interactive, skipping the initial menu +and proceeding with the build process without requiring user input. +.\" +.It Fl -no_all_in_mfs +Leaves files contained in the +.Pa floppy.tree +on the +.Nm +image, so they can be loaded separately +from the kernel (and updated individually to +customize the image). +.\" +.It Fl -no_loader +Omit /boot/loader, just rely on boot2 to load the kernel. +This saves some space but may have problems with kernels > 4MB. +.\" +.It Fl -objdir Ar directory +Specify a directory with the result of a previous buildworld. +This saves the need for an +.Fl Fl init +call before creating an image. +.\" .It Fl -src Ar SRC_PATH Use the source tree at .Ar SRC_PATH @@ -66,7 +140,7 @@ with the correct header files, libraries .Xr config 8 program) that are necessary for the cross-build (see the .Fl -init -option below). +option). The source files are unmodified by the .Nm script. @@ -78,53 +152,13 @@ its subdirectories, and also the process .Pa usr subtree touches some parts of the source tree (this is a bug in the release build scripts which might go away with time). -.It Fl -init -When used together with the -.Fl -src -option, this initializes the -.Ao Ar SRC_PATH Ac Ns Pa /../usr -subtree as necessary to subsequently build -.Nm -images. -.It Fl -modules -Also build kernel modules. -These are not stored on the -.Nm -image but are left available in the build directory. -.It Fl n -Make the script non-interactive, skipping the initial menu -and proceeding with the build process without requiring user input. +.\" .It Fl v Make the script verbose, showing commands to be executed and waiting for user input before executing each of them. Useful for debugging. -.It Fl -all_in_mfs -Put the entire contents of the file system in the -memory file system image which is contained in the -kernel. -This is the default behaviour, and is -extremely useful as the kernel itself can be loaded, -using -.Xr etherboot -or -.Xr pxeboot 8 , as a fully functional system. -.It Fl -no_all_in_mfs -Leaves files contained in the -.Pa floppy.tree -on the -.Nm -image, so they can be loaded separately -from the kernel (and updated individually to -customize the image). -.It Fl -floppy_size Ar size -Set the size of the disk image. -Typical values for a floppy disk are 1440 or 2880, -but other values can be used for other media (flash memories, -CDROM, network booted kernels). -.It Fl c , clean -Clean the product of previous builds. .El .Sh ENVIRONMENT As a result of extreme size limitations, the @@ -414,24 +448,12 @@ Note that the image size can be smaller (indicated as partition .Dq Li c: ) . .Ss CDROM Install -Another option is to put the image on a CDROM. -Assuming your image -for disk type -.Pa foo -is in the dir
svn commit: r194948 - stable/7/release/picobsd/build
Author: luigi Date: Thu Jun 25 09:28:44 2009 New Revision: 194948 URL: http://svn.freebsd.org/changeset/base/194948 Log: MFC: enable creation of ISO images Modified: stable/7/release/picobsd/build/picobsd Modified: stable/7/release/picobsd/build/picobsd == --- stable/7/release/picobsd/build/picobsd Thu Jun 25 09:28:04 2009 (r194947) +++ stable/7/release/picobsd/build/picobsd Thu Jun 25 09:28:44 2009 (r194948) @@ -140,6 +140,7 @@ set_defaults() {# no arguments # mountpoint used to build memory filesystems c_fs=fs.PICOBSD# filename used for the memory filesystem c_img=picobsd.bin # filename used for the picobsd image +c_iso=picobsd.iso # filename used for the ISO image generate_iso="NO" # don't generate the iso image # select the right disklabel program @@ -276,15 +277,7 @@ set_msgs() { # OK \t3. Site-info: ${SITE}\n\t4. Full-path: ${MY_TREE}\n" } -# build the iso image -build_iso_image() { -log "build_iso_image()" -clear -set_msgs -printf "${MSG}---> Build the iso image not ready yet\n\n" -} - -# Main build procedure. +# Main build procedure. Builds both the disk image and the ISO build_image() { log "build_image() <${name}>" [ -n "${name}" ] || fail $? bad_type @@ -902,6 +895,16 @@ fill_floppy_image() { fi log "image used `du -s ${dst}` of ${blocks}k" +if [ "${generate_iso}" = "YES" ]; then + logverbose "generate_iso ${generate_iso}" + # build_iso_image # XXX not implemented yet + (cd ${BUILDDIR} + cp -p /boot/cdboot ${dst}/boot || fail $? no_space "copying cdboot" + mkisofs -b boot/cdboot -no-emul-boot -J -r -ldots -l -L \ + -o ${c_iso} ${dst} + ) +fi + (cd ${BUILDDIR} makefs -t ffs -o bsize=4096 -o fsize=512 \ -s ${blocks}k -f 50 ${c_img} ${dst} @@ -918,11 +921,6 @@ fill_floppy_image() { ) echo "BUILDDIR ${BUILDDIR}" -if [ "${generate_iso}" = "YES" ]; then - echo "generate_iso ${generate_iso}" - # build_iso_image # XXX not implemented yet - exit 1 -fi # dump the primary and secondary boot # XXX primary is 512 bytes ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194949 - in head/sys/arm/mv: . discovery kirkwood orion
Author: raj Date: Thu Jun 25 10:03:51 2009 New Revision: 194949 URL: http://svn.freebsd.org/changeset/base/194949 Log: Enable all populated TWSI (I2C) controllers on Marvell SOCs. Obtained from:Semihalf Modified: head/sys/arm/mv/discovery/discovery.c head/sys/arm/mv/kirkwood/kirkwood.c head/sys/arm/mv/mvwin.h head/sys/arm/mv/orion/orion.c Modified: head/sys/arm/mv/discovery/discovery.c == --- head/sys/arm/mv/discovery/discovery.c Thu Jun 25 09:28:44 2009 (r194948) +++ head/sys/arm/mv/discovery/discovery.c Thu Jun 25 10:03:51 2009 (r194949) @@ -126,7 +126,11 @@ struct obio_device obio_devices[] = { { -1 }, CPU_PM_CTRL_GE1 }, - { "twsi", MV_TWSI_BASE, MV_TWSI_SIZE, + { "twsi", MV_TWSI0_BASE, MV_TWSI_SIZE, + { -1 }, { -1 }, + CPU_PM_CTRL_NONE + }, + { "twsi", MV_TWSI1_BASE, MV_TWSI_SIZE, { -1 }, { -1 }, CPU_PM_CTRL_NONE }, Modified: head/sys/arm/mv/kirkwood/kirkwood.c == --- head/sys/arm/mv/kirkwood/kirkwood.c Thu Jun 25 09:28:44 2009 (r194948) +++ head/sys/arm/mv/kirkwood/kirkwood.c Thu Jun 25 10:03:51 2009 (r194949) @@ -95,7 +95,7 @@ struct obio_device obio_devices[] = { { -1 }, CPU_PM_CTRL_GE0 }, - { "twsi", MV_TWSI_BASE, MV_TWSI_SIZE, + { "twsi", MV_TWSI0_BASE, MV_TWSI_SIZE, { -1 }, { -1 }, CPU_PM_CTRL_NONE }, Modified: head/sys/arm/mv/mvwin.h == --- head/sys/arm/mv/mvwin.h Thu Jun 25 09:28:44 2009(r194948) +++ head/sys/arm/mv/mvwin.h Thu Jun 25 10:03:51 2009(r194949) @@ -91,7 +91,8 @@ #define MV_GPIO_SIZE 0x20 #define MV_RTC_BASE(MV_BASE + 0x10300) #define MV_RTC_SIZE0x08 -#define MV_TWSI_BASE (MV_BASE + 0x11000) +#define MV_TWSI0_BASE (MV_BASE + 0x11000) +#define MV_TWSI1_BASE (MV_BASE + 0x11100) #define MV_TWSI_SIZE 0x20 #define MV_UART0_BASE (MV_BASE + 0x12000) #define MV_UART1_BASE (MV_BASE + 0x12100) Modified: head/sys/arm/mv/orion/orion.c == --- head/sys/arm/mv/orion/orion.c Thu Jun 25 09:28:44 2009 (r194948) +++ head/sys/arm/mv/orion/orion.c Thu Jun 25 10:03:51 2009 (r194949) @@ -88,7 +88,7 @@ struct obio_device obio_devices[] = { { -1 }, CPU_PM_CTRL_NONE }, - { "twsi", MV_TWSI_BASE, MV_TWSI_SIZE, + { "twsi", MV_TWSI0_BASE, MV_TWSI_SIZE, { -1 }, { -1 }, CPU_PM_CTRL_NONE }, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194950 - head/sys/powerpc/conf
Author: raj Date: Thu Jun 25 10:07:21 2009 New Revision: 194950 URL: http://svn.freebsd.org/changeset/base/194950 Log: Include SMP support in the MPC85XX kernel by default. Modified: head/sys/powerpc/conf/MPC85XX Modified: head/sys/powerpc/conf/MPC85XX == --- head/sys/powerpc/conf/MPC85XX Thu Jun 25 10:03:51 2009 (r194949) +++ head/sys/powerpc/conf/MPC85XX Thu Jun 25 10:07:21 2009 (r194950) @@ -43,6 +43,7 @@ options NFSLOCKD optionsPROCFS optionsPSEUDOFS optionsSCHED_4BSD +optionsSMP optionsSYSVMSG optionsSYSVSEM optionsSYSVSHM ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194844 - in head/sys: conf dev/ata
Rafal Jaworowski wrote: Author: raj Date: Wed Jun 24 15:38:17 2009 New Revision: 194844 URL: http://svn.freebsd.org/changeset/base/194844 Log: Move non-PCI prototypes from ata-pci.h -> ata-all.h. This removes unnecessary PCI #includes dependency for systems with ATA controllers living at non-PCI buses. Submitted by: Piotr Ziecik Obtained from:Semihalf Modified: head/sys/conf/files == --- head/sys/conf/files Wed Jun 24 15:33:33 2009(r194843) +++ head/sys/conf/files Wed Jun 24 15:38:17 2009(r194844) @@ -491,12 +491,12 @@ dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore dev/ata/ata-lowlevel.c optional ata | atacore dev/ata/ata-queue.coptional ata | atacore +dev/ata/ata-dma.c optional ata | atadma +dev/ata/ata-sata.c optional ata | atasata What is atadma and atasata here, kernel options? What for are they needed? You will not be able to build most of drivers without them, while enabling them for others will not give you any benefit, just bigger code size. I think dependency must be reviewed there. -- Alexander Motin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194844 - in head/sys: conf dev/ata
On 2009-06-25, at 12:19, Alexander Motin wrote: Rafal Jaworowski wrote: Modified: head/sys/conf/files = = = = = = = = = = --- head/sys/conf/files Wed Jun 24 15:33:33 2009(r194843) +++ head/sys/conf/files Wed Jun 24 15:38:17 2009(r194844) @@ -491,12 +491,12 @@ dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore dev/ata/ata-lowlevel.c optional ata | atacore dev/ata/ata-queue.c optional ata | atacore +dev/ata/ata-dma.c optional ata | atadma +dev/ata/ata-sata.c optional ata | atasata What is atadma and atasata here, kernel options? What for are they needed? You will not be able to build most of drivers without them, while enabling them for others will not give you any benefit, just bigger code size. I think dependency must be reviewed there. This was supposed to follow the fine grained kernel options route for various ata subsystems. Both ata-dma.c and ata-sata.c seem orthogonal to the rest of the ata framework (think ata controller without DMA, which is often seen in embedded). They could also be made mandatory under atacore, I have no problem with this approach too. Rafal ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194930 - in head: sbin/ipfw sys/netinet sys/netinet/ipfw
On Wed, Jun 24, 2009 at 07:44:04PM -0400, Ben Kaduk wrote: > There's a grammar error and a style error, here. I'm actually not > entirely sure what > the intended meaning is, so it's a bit hard to fix the grammar error. It's no wonder - my english writing skill is poor. > Looking at the code, it seems that in burst mode, extra data will be > allowed to be sent, though > it is capped to not exceed the pipe bandwidth. > Perhaps "... bytes of data is allowed to bypass the dummynet scheduler > (...), though > the transmission rate will still be capped so as to not exceed the > pipe's bandwidth."? Let me explain. For example, we have pipe with bw 1Mbit/s and burst size is 5GByte. If we try to download 10Gbyte through this pipe following will happen: 1) 1st 5Gbyte of data will go with 'wire speed'. 2) last 5Gbyte will be shaped to 1Mbit/s Could you please mail me whole 'burst' part (as it should be), and i will fix it. > > The style error is that the new sentence ("Effective burst size ...") > should start > on a new line. > > I would also prefer to see the new sentence be an actual complete sentence > (i.e., "The effective burst size is calculated as follows"), though > there appears > to be at least one other bug of this form in the file already (see, > for example, the > quoted text at the beginning of this hunk: "Default value is no delay.", which > would benefit from a "the".) > > > Unrelated to this commit, there is a grammar error early in the file: > > 312 Once > 313 .Fl p > 314 has been specified, any additional arguments as passed on to the > preproc > essor > 315 for interpretation. > > The 'as' in line 314 should be 'are'. > (This is from CVS r1.220, so the line numbers may not be current.) > > > Thanks, > > Ben Kaduk > > > > +MAX( > > +.Ar size > > +, > > +.Nm bw > > +* pipe_idle_time). > > +.Pp > > .It Cm profile Ar filename > > A file specifying the additional overhead incurred in the transmission > > of a packet on the link. > > -- Oleg. === Oleg Bulyzhin -- OBUL-RIPN -- OBUL-RIPE -- o...@rinet.ru === ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194951 - in head/sys: fs/nfsclient net netinet netipsec nfsclient
Author: rwatson Date: Thu Jun 25 11:52:33 2009 New Revision: 194951 URL: http://svn.freebsd.org/changeset/base/194951 Log: Add a new global rwlock, in_ifaddr_lock, which will synchronize use of the in_ifaddrhead and INADDR_HASH address lists. Previously, these lists were used unsynchronized as they were effectively never changed in steady state, but we've seen increasing reports of writer-writer races on very busy VPN servers as core count has gone up (and similar configurations where address lists change frequently and concurrently). For the time being, use rwlocks rather than rmlocks in order to take advantage of their better lock debugging support. As a result, we don't enable ip_input()'s read-locking of INADDR_HASH until an rmlock conversion is complete and a performance analysis has been done. This means that one class of reader-writer races still exists. MFC after: 6 weeks Reviewed by:bz Modified: head/sys/fs/nfsclient/nfs_clvnops.c head/sys/net/if_spppsubr.c head/sys/net/if_stf.c head/sys/netinet/if_ether.c head/sys/netinet/in.c head/sys/netinet/in_gif.c head/sys/netinet/in_mcast.c head/sys/netinet/in_pcb.c head/sys/netinet/in_var.h head/sys/netinet/ip_carp.c head/sys/netinet/ip_icmp.c head/sys/netinet/ip_input.c head/sys/netinet/raw_ip.c head/sys/netipsec/key.c head/sys/nfsclient/nfs_vnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c == --- head/sys/fs/nfsclient/nfs_clvnops.c Thu Jun 25 10:07:21 2009 (r194950) +++ head/sys/fs/nfsclient/nfs_clvnops.c Thu Jun 25 11:52:33 2009 (r194951) @@ -1400,11 +1400,15 @@ again: CURVNET_SET(P_TO_VNET(&proc0)); #ifdef INET INIT_VNET_INET(curvnet); + IN_IFADDR_RLOCK(); if (!TAILQ_EMPTY(&V_in_ifaddrhead)) cverf.lval[0] = IA_SIN(TAILQ_FIRST(&V_in_ifaddrhead))->sin_addr.s_addr; else #endif cverf.lval[0] = create_verf; +#ifdef INET + IN_IFADDR_RUNLOCK(); +#endif cverf.lval[1] = ++create_verf; CURVNET_RESTORE(); error = nfsrpc_create(dvp, cnp->cn_nameptr, cnp->cn_namelen, Modified: head/sys/net/if_spppsubr.c == --- head/sys/net/if_spppsubr.c Thu Jun 25 10:07:21 2009(r194950) +++ head/sys/net/if_spppsubr.c Thu Jun 25 11:52:33 2009(r194951) @@ -4973,8 +4973,10 @@ sppp_set_ip_addr(struct sppp *sp, u_long /* set new address */ si->sin_addr.s_addr = htonl(src); ia = ifatoia(ifa); + IN_IFADDR_WLOCK(); LIST_REMOVE(ia, ia_hash); LIST_INSERT_HEAD(INADDR_HASH(si->sin_addr.s_addr), ia, ia_hash); + IN_IFADDR_WUNLOCK(); /* add new route */ error = rtinit(ifa, (int)RTM_ADD, RTF_HOST); Modified: head/sys/net/if_stf.c == --- head/sys/net/if_stf.c Thu Jun 25 10:07:21 2009(r194950) +++ head/sys/net/if_stf.c Thu Jun 25 11:52:33 2009(r194951) @@ -620,15 +620,19 @@ stf_checkaddr4(sc, in, inifp) /* * reject packets with broadcast */ + IN_IFADDR_RLOCK(); for (ia4 = TAILQ_FIRST(&V_in_ifaddrhead); ia4; ia4 = TAILQ_NEXT(ia4, ia_link)) { if ((ia4->ia_ifa.ifa_ifp->if_flags & IFF_BROADCAST) == 0) continue; - if (in->s_addr == ia4->ia_broadaddr.sin_addr.s_addr) + if (in->s_addr == ia4->ia_broadaddr.sin_addr.s_addr) { + IN_IFADDR_RUNLOCK(); return -1; + } } + IN_IFADDR_RUNLOCK(); /* * perform ingress filter Modified: head/sys/netinet/if_ether.c == --- head/sys/netinet/if_ether.c Thu Jun 25 10:07:21 2009(r194950) +++ head/sys/netinet/if_ether.c Thu Jun 25 11:52:33 2009(r194951) @@ -509,11 +509,13 @@ in_arpinput(struct mbuf *m) * request for the virtual host ip. * XXX: This is really ugly! */ + IN_IFADDR_RLOCK(); LIST_FOREACH(ia, INADDR_HASH(itaddr.s_addr), ia_hash) { if (((bridged && ia->ia_ifp->if_bridge != NULL) || ia->ia_ifp == ifp) && itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) { ifa_ref(&ia->ia_ifa); + IN_IFADDR_RUNLOCK(); goto match; } #ifdef DEV_CARP @@ -522,6 +524,7 @@ in_arpinput(struct mbuf *m) itaddr.s_addr == ia->ia_addr.sin_addr.s_addr) { carp_match = 1; ifa_ref(&ia->ia_ifa); + IN_IFADD
svn commit: r194953 - head/usr.sbin/sysinstall
Author: jhb Date: Thu Jun 25 12:34:05 2009 New Revision: 194953 URL: http://svn.freebsd.org/changeset/base/194953 Log: Raise the default size of the EFI partition on ia64 from 100MB to 400MB. A fresh install of a current 8.0 snapshot uses 156MB with a single kernel and having the filesystem too small prevented the system from booting. Reviewed by: marcel MFC after:1 week Modified: head/usr.sbin/sysinstall/label.c Modified: head/usr.sbin/sysinstall/label.c == --- head/usr.sbin/sysinstall/label.cThu Jun 25 12:21:49 2009 (r194952) +++ head/usr.sbin/sysinstall/label.cThu Jun 25 12:34:05 2009 (r194953) @@ -1389,7 +1389,7 @@ try_auto_label(Device **devs, Device *de #ifdef __ia64__ AutoEfi = NULL; if (EfiChunk == NULL) { - sz = 100 * ONE_MEG; + sz = 400 * ONE_MEG; AutoEfi = Create_Chunk_DWIM(label_chunk_info[here].c->disk, label_chunk_info[here].c, sz, efi, 0, 0); if (AutoEfi == NULL) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194954 - stable/7/sys/dev/usb
Author: n_hibma Date: Thu Jun 25 12:34:44 2009 New Revision: 194954 URL: http://svn.freebsd.org/changeset/base/194954 Log: Don't send multiple commands. Sending the ZTE switch command is sufficient. Modified: stable/7/sys/dev/usb/u3g.c Modified: stable/7/sys/dev/usb/u3g.c == --- stable/7/sys/dev/usb/u3g.c Thu Jun 25 12:34:05 2009(r194953) +++ stable/7/sys/dev/usb/u3g.c Thu Jun 25 12:34:44 2009(r194954) @@ -684,8 +684,6 @@ u3gstub_do_init(void *priv) device_printf(sc->sc_dev, "changing ZTE STOR modem to modem mode\n"); u3gstub_BBB_cmd(sc, ztestor_cmd); - u3gstub_BBB_cmd(sc, scsi_test_unit_ready); - u3gstub_BBB_cmd(sc, scsi_start_stop_unit); break; case U3GINIT_CMOTECH: if (bootverbose) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194955 - in head: lib/libc/posix1e lib/libc/sys sys/sys
Author: trasz Date: Thu Jun 25 12:46:59 2009 New Revision: 194955 URL: http://svn.freebsd.org/changeset/base/194955 Log: Add NFSv4 ACL support to libc. This adds the following functions to the acl(3) API: acl_add_flag_np, acl_clear_flags_np, acl_create_entry_np, acl_delete_entry_np, acl_delete_flag_np, acl_get_extended_np, acl_get_flag_np, acl_get_flagset_np, acl_set_extended_np, acl_set_flagset_np, acl_to_text_np, acl_is_trivial_np, acl_strip_np, acl_get_brand_np. Most of them are similar to what Darwin does. There are no backward-incompatible changes. Approved by:rwatson@ Added: head/lib/libc/posix1e/acl_add_flag_np.3 (contents, props changed) head/lib/libc/posix1e/acl_branding.c (contents, props changed) head/lib/libc/posix1e/acl_clear_flags_np.3 (contents, props changed) head/lib/libc/posix1e/acl_delete_flag_np.3 (contents, props changed) head/lib/libc/posix1e/acl_flag.c (contents, props changed) head/lib/libc/posix1e/acl_from_text_nfs4.c (contents, props changed) head/lib/libc/posix1e/acl_get_brand_np.3 (contents, props changed) head/lib/libc/posix1e/acl_get_entry_type_np.3 (contents, props changed) head/lib/libc/posix1e/acl_get_flag_np.3 (contents, props changed) head/lib/libc/posix1e/acl_get_flagset_np.3 (contents, props changed) head/lib/libc/posix1e/acl_is_trivial_np.3 (contents, props changed) head/lib/libc/posix1e/acl_set_entry_type_np.3 (contents, props changed) head/lib/libc/posix1e/acl_set_flagset_np.3 (contents, props changed) head/lib/libc/posix1e/acl_strip.c (contents, props changed) head/lib/libc/posix1e/acl_strip_np.3 (contents, props changed) head/lib/libc/posix1e/acl_support_nfs4.c (contents, props changed) head/lib/libc/posix1e/acl_to_text_nfs4.c (contents, props changed) Modified: head/lib/libc/posix1e/Makefile.inc head/lib/libc/posix1e/Symbol.map head/lib/libc/posix1e/acl.3 head/lib/libc/posix1e/acl_add_perm.3 head/lib/libc/posix1e/acl_calc_mask.c head/lib/libc/posix1e/acl_copy.c head/lib/libc/posix1e/acl_create_entry.3 head/lib/libc/posix1e/acl_delete_entry.3 head/lib/libc/posix1e/acl_delete_entry.c head/lib/libc/posix1e/acl_entry.c head/lib/libc/posix1e/acl_from_text.c head/lib/libc/posix1e/acl_get.3 head/lib/libc/posix1e/acl_get.c head/lib/libc/posix1e/acl_init.c head/lib/libc/posix1e/acl_set.3 head/lib/libc/posix1e/acl_set.c head/lib/libc/posix1e/acl_set_tag_type.3 head/lib/libc/posix1e/acl_support.c head/lib/libc/posix1e/acl_support.h head/lib/libc/posix1e/acl_to_text.3 head/lib/libc/posix1e/acl_to_text.c head/lib/libc/posix1e/acl_valid.c head/lib/libc/sys/pathconf.2 head/sys/sys/acl.h head/sys/sys/unistd.h Modified: head/lib/libc/posix1e/Makefile.inc == --- head/lib/libc/posix1e/Makefile.inc Thu Jun 25 12:34:44 2009 (r194954) +++ head/lib/libc/posix1e/Makefile.inc Thu Jun 25 12:46:59 2009 (r194955) @@ -4,52 +4,74 @@ CFLAGS+=-D_ACL_PRIVATE -SRCS+= acl_calc_mask.c \ +# Copy kern/subr_acl_nfs4.c to the libc object directory. +subr_acl_nfs4.c: ${.CURDIR}/../../sys/kern/subr_acl_nfs4.c + cat ${.ALLSRC} > ${.TARGET} + +SRCS+= acl_branding.c \ + acl_calc_mask.c \ acl_copy.c \ acl_compat.c\ acl_delete.c\ acl_delete_entry.c \ acl_entry.c \ + acl_flag.c \ acl_free.c \ acl_from_text.c \ + acl_from_text_nfs4.c\ acl_get.c \ acl_init.c \ acl_perm.c \ acl_set.c \ + acl_strip.c \ acl_support.c \ + acl_support_nfs4.c \ acl_to_text.c \ + acl_to_text_nfs4.c \ acl_valid.c \ extattr.c \ mac.c \ mac_exec.c \ mac_get.c \ - mac_set.c + mac_set.c \ + subr_acl_nfs4.c SYM_MAPS+=${.CURDIR}/posix1e/Symbol.map MAN+= acl.3 \ + acl_add_flag_np.3 \ acl_add_perm.3 \ acl_calc_mask.3 \ + acl_clear_flags_np.3\ acl_clear_perms.3 \ acl_copy_entry.3\ acl_create_entry.3 \ acl_delete.3\ acl_delete_entry.3 \ + acl_delete_flag_np.3\ acl_delete_perm.3 \ acl_dup.3 \
svn commit: r194956 - in head/lib/libc: posix1e sys
Author: trasz Date: Thu Jun 25 12:53:50 2009 New Revision: 194956 URL: http://svn.freebsd.org/changeset/base/194956 Log: Bump manual page timestamps. Modified: head/lib/libc/posix1e/acl.3 head/lib/libc/posix1e/acl_add_flag_np.3 head/lib/libc/posix1e/acl_add_perm.3 head/lib/libc/posix1e/acl_clear_flags_np.3 head/lib/libc/posix1e/acl_create_entry.3 head/lib/libc/posix1e/acl_delete_entry.3 head/lib/libc/posix1e/acl_get.3 head/lib/libc/posix1e/acl_get_brand_np.3 head/lib/libc/posix1e/acl_get_entry_type_np.3 head/lib/libc/posix1e/acl_get_flag_np.3 head/lib/libc/posix1e/acl_get_flagset_np.3 head/lib/libc/posix1e/acl_is_trivial_np.3 head/lib/libc/posix1e/acl_set.3 head/lib/libc/posix1e/acl_set_entry_type_np.3 head/lib/libc/posix1e/acl_set_flagset_np.3 head/lib/libc/posix1e/acl_set_tag_type.3 head/lib/libc/posix1e/acl_strip_np.3 head/lib/libc/posix1e/acl_to_text.3 head/lib/libc/sys/pathconf.2 Modified: head/lib/libc/posix1e/acl.3 == --- head/lib/libc/posix1e/acl.3 Thu Jun 25 12:46:59 2009(r194955) +++ head/lib/libc/posix1e/acl.3 Thu Jun 25 12:53:50 2009(r194956) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 18, 2002 +.Dd June 25, 2009 .Dt ACL 3 .Os .Sh NAME Modified: head/lib/libc/posix1e/acl_add_flag_np.3 == --- head/lib/libc/posix1e/acl_add_flag_np.3 Thu Jun 25 12:46:59 2009 (r194955) +++ head/lib/libc/posix1e/acl_add_flag_np.3 Thu Jun 25 12:53:50 2009 (r194956) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2001 +.Dd June 25, 2009 .Dt ACL_ADD_FLAG_NP 3 .Os .Sh NAME Modified: head/lib/libc/posix1e/acl_add_perm.3 == --- head/lib/libc/posix1e/acl_add_perm.3Thu Jun 25 12:46:59 2009 (r194955) +++ head/lib/libc/posix1e/acl_add_perm.3Thu Jun 25 12:53:50 2009 (r194956) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2001 +.Dd June 25, 2009 .Dt ACL_ADD_PERM 3 .Os .Sh NAME Modified: head/lib/libc/posix1e/acl_clear_flags_np.3 == --- head/lib/libc/posix1e/acl_clear_flags_np.3 Thu Jun 25 12:46:59 2009 (r194955) +++ head/lib/libc/posix1e/acl_clear_flags_np.3 Thu Jun 25 12:53:50 2009 (r194956) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2001 +.Dd June 25, 2009 .Dt ACL_CLEAR_FLAGS_NP 3 .Os .Sh NAME Modified: head/lib/libc/posix1e/acl_create_entry.3 == --- head/lib/libc/posix1e/acl_create_entry.3Thu Jun 25 12:46:59 2009 (r194955) +++ head/lib/libc/posix1e/acl_create_entry.3Thu Jun 25 12:53:50 2009 (r194956) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 16, 2001 +.Dd June 25, 2009 .Dt ACL_CREATE_ENTRY 3 .Os .Sh NAME Modified: head/lib/libc/posix1e/acl_delete_entry.3 == --- head/lib/libc/posix1e/acl_delete_entry.3Thu Jun 25 12:46:59 2009 (r194955) +++ head/lib/libc/posix1e/acl_delete_entry.3Thu Jun 25 12:53:50 2009 (r194956) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2001 +.Dd June 25, 2009 .Dt ACL_DELETE_ENTRY 3 .Os .Sh NAME Modified: head/lib/libc/posix1e/acl_get.3 == --- head/lib/libc/posix1e/acl_get.3 Thu Jun 25 12:46:59 2009 (r194955) +++ head/lib/libc/posix1e/acl_get.3 Thu Jun 25 12:53:50 2009 (r194956) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 29, 2002 +.Dd June 25, 2009 .Dt ACL_GET 3 .Os .Sh NAME Modified: head/lib/libc/posix1e/acl_get_brand_np.3 == --- head/lib/libc/posix1e/acl_get_brand_np.3Thu Jun 25 12:46:59 2009 (r194955) +++ head/lib/libc/posix1e/acl_get_brand_np.3Thu Jun 25 12:53:50 2009 (r194956) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2001 +.Dd June 25, 2009 .Dt ACL_GET_BRAND_NP 3 .Os .Sh NAME Modified: head/lib/libc/posix1e/acl_get_entry_type_np.3 == --- head/lib/libc/posix1e/acl_get_entry_type_np.3 Thu Jun 25 12:46:59 2009(r194955) +++ head/lib/libc/posix1e/acl_get_entry_type_np.3 Thu Jun 25 12:53:50 2009(r194956) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 10, 2001 +.Dd June 25, 2009 .Dt ACL_GET_ENTRY_TYPE_NP 3 .Os .Sh NAME Modified: head/lib/libc/posix1e/acl_get_flag_np.3 == --- head/lib/libc/posix1e/acl_get_flag_np.3 Thu Jun 25 12:46:59 2009 (r194955)
svn commit: r194957 - head/lib/libc/posix1e
Author: trasz Date: Thu Jun 25 13:08:02 2009 New Revision: 194957 URL: http://svn.freebsd.org/changeset/base/194957 Log: Fix c194955 - somehow I managed all the new files, tripling their contents. Modified: head/lib/libc/posix1e/acl_add_flag_np.3 head/lib/libc/posix1e/acl_branding.c head/lib/libc/posix1e/acl_clear_flags_np.3 head/lib/libc/posix1e/acl_delete_flag_np.3 head/lib/libc/posix1e/acl_flag.c head/lib/libc/posix1e/acl_from_text_nfs4.c head/lib/libc/posix1e/acl_get_brand_np.3 head/lib/libc/posix1e/acl_get_entry_type_np.3 head/lib/libc/posix1e/acl_get_flag_np.3 head/lib/libc/posix1e/acl_get_flagset_np.3 head/lib/libc/posix1e/acl_is_trivial_np.3 head/lib/libc/posix1e/acl_set_entry_type_np.3 head/lib/libc/posix1e/acl_set_flagset_np.3 head/lib/libc/posix1e/acl_strip.c head/lib/libc/posix1e/acl_strip_np.3 head/lib/libc/posix1e/acl_support_nfs4.c head/lib/libc/posix1e/acl_to_text_nfs4.c Modified: head/lib/libc/posix1e/acl_add_flag_np.3 == --- head/lib/libc/posix1e/acl_add_flag_np.3 Thu Jun 25 12:53:50 2009 (r194956) +++ head/lib/libc/posix1e/acl_add_flag_np.3 Thu Jun 25 13:08:02 2009 (r194957) @@ -96,199 +96,3 @@ The .Fn acl_add_flag_np function was written by .An Edward Tomasz Napierala Aq tr...@freebsd.org . -.\"- -.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\"notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\"notice, this list of conditions and the following disclaimer in the -.\"documentation and/or other materials provided with the distribution. -.\" -.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND -.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE VOICES IN HIS HEAD BE -.\" LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -.\" POSSIBILITY OF SUCH DAMAGE. -.\" -.\" $FreeBSD$ -.\" -.Dd March 10, 2001 -.Dt ACL_ADD_FLAG_NP 3 -.Os -.Sh NAME -.Nm acl_add_flag_np -.Nd add flags to a flagset -.Sh LIBRARY -.Lb libc -.Sh SYNOPSIS -.In sys/types.h -.In sys/acl.h -.Ft int -.Fn acl_add_flag_np "acl_flagset_t flagset_d" "acl_flag_t flag" -.Sh DESCRIPTION -The -.Fn acl_add_flag_np -function -is a non-portable call that adds the flags contained in -.Fa flags -to the flagset -.Fa flagset_d . -.Pp -Note: it is not considered an error to attempt to add flags -that already exist in the flagset. -.Pp -Valid values are: -.Pp -.Bl -column -offset 3n "ACL_ENTRY_NO_PROPAGATE_INHERIT" -.It ACL_ENTRY_FILE_INHERIT Will be inherited by files. -.It ACL_ENTRY_DIRECTORY_INHERITWill be inherited by directories. -.It ACL_ENTRY_NO_PROPAGATE_INHERIT Will not propagate. -.It ACL_ENTRY_INHERIT_ONLY Inherit-only. -.El -.Sh RETURN VALUES -.Rv -std acl_add_flag_np -.Sh ERRORS -The -.Fn acl_add_flag_np -function fails if: -.Bl -tag -width Er -.It Bq Er EINVAL -Argument -.Fa flagset_d -is not a valid descriptor for a flagset within an ACL entry. -Argument -.Fa flag -does not contain a valid -.Vt acl_flag_t -value. -.El -.Sh SEE ALSO -.Xr acl 3 , -.Xr acl_clear_flags_np 3 , -.Xr acl_delete_flag_np 3 , -.Xr acl_get_flagset_np 3 , -.Xr acl_set_flagset_np 3 , -.Xr posix1e 3 -.Sh STANDARDS -POSIX.1e is described in IEEE POSIX.1e draft 17. -.Sh HISTORY -POSIX.1e support was introduced in -.Fx 4.0 . -The -.Fn acl_add_flag_np -function was added in -.Fx 8.0 . -.Sh AUTHORS -The -.Fn acl_add_flag_np -function was written by -.An Edward Tomasz Napierala Aq tr...@freebsd.org . -.\"- -.\" Copyright (c) 2008, 2009 Edward Tomasz Napierala -.\" All rights reserved. -.\" -.\" Redistribution and use in source and binary forms, with or without -.\" modification, are permitted provided that the following conditions -.\" are met: -.\" 1. Redistributions of source code must retain the above copyright -.\"notice, this list of conditions and the following disclaimer. -.\" 2. Redistributions in binary form must reproduce the above copyright -.\"notice, this list of conditions and the following disclaimer in the -.\"documentation a
svn commit: r194958 - head/tools/tools/nanobsd
Author: n_hibma Date: Thu Jun 25 13:15:20 2009 New Revision: 194958 URL: http://svn.freebsd.org/changeset/base/194958 Log: - Make pprint print through fd 3, so it can be used in customisation functions to print something to the screen. - Prefix each line with the running time (bikeshed). Submitted by: Rick van der Zwet (Wireless Leiden) Modified: head/tools/tools/nanobsd/nanobsd.sh Modified: head/tools/tools/nanobsd/nanobsd.sh == --- head/tools/tools/nanobsd/nanobsd.sh Thu Jun 25 13:08:02 2009 (r194957) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Jun 25 13:15:20 2009 (r194958) @@ -664,7 +664,8 @@ late_customize_cmd () { # Print $2 at level $1. pprint() { if [ "$1" -le $PPLEVEL ]; then - printf "%.${1}s %s\n" "#" "$2" + runtime=$(( `date +%s` - $NANO_STARTTIME )) + printf "%s %.${1}s %s\n" "`date -u -r $runtime +%H:%M:%S`" "#" "$2" 1>&3 fi } @@ -806,6 +807,10 @@ export NANO_BOOTLOADER ### # And then it is as simple as that... +# File descriptor 3 is used for logging output, see pprint +exec 3>&1 + +NANO_STARTTIME=`date +%s` pprint 1 "NanoBSD image ${NANO_NAME} build starting" if $do_world ; then ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194766 - in head/sys: dev/md fs/procfs fs/tmpfs kern security/mac_biba security/mac_lomac sys vm
On Tue, 2009-06-23 at 20:45 +, Konstantin Belousov wrote: > Author: kib > Date: Tue Jun 23 20:45:22 2009 > New Revision: 194766 > URL: http://svn.freebsd.org/changeset/base/194766 > > Log: > Implement global and per-uid accounting of the anonymous memory. Add > rlimit RLIMIT_SWAP that limits the amount of swap that may be reserved > for the uid. This commit also breaks sparc64 for me, stock kernel with no local changes. r194765 boots successfully. This is on a dual-CPU E250 with 1G RAM. jumping to kernel entry at 0xc0088000. GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2009 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.0-CURRENT #3 r194766: Thu Jun 25 13:08:26 BST 2009 r...@milla.x.y.z:/usr/obj/usr/src/sys/GENERIC WARNING: WITNESS option enabled, expect reduced performance. panic: trap_pfault: vmspace NULL cpuid = 0 KDB: enter: panic [thread pid 0 tid 0 ] Stopped at 0xc03aa4c0: ta %xcc, 1 db> bt Tracing pid 0 tid 0 td 0xc08d6f90 (null)() at 0xc03726ac (null)() at 0xc06a0b34 (null)() at 0xc06a1294 (null)() at 0xc0088ff8 (null)() at 0xc0625130 (null)() at 0xc0634f48 (null)() at 0xc0635864 (null)() at 0xc06990e0 (null)() at 0xc0632054 (null)() at 0xc031cd0c (null)() at 0xc0088030 db> reset Resetting ... milla# addr2line -e /boot/kernel/kernel.symbols 0xc03726ac /usr/src/sys/kern/kern_shutdown.c:558 milla# addr2line -e /boot/kernel/kernel.symbols 0xc06a0b34 /usr/src/sys/sparc64/sparc64/trap.c:420 milla# addr2line -e /boot/kernel/kernel.symbols 0xc06a1294 /usr/src/sys/sparc64/sparc64/trap.c:351 milla# addr2line -e /boot/kernel/kernel.symbols 0xc0088ff8 /usr/src/sys/sparc64/sparc64/exception.S:2723 milla# addr2line -e /boot/kernel/kernel.symbols 0xc0625130 /usr/src/sys/vm/swap_pager.c:173 milla# addr2line -e /boot/kernel/kernel.symbols 0xc0634f48 /usr/src/sys/vm/vm_map.c:1137 milla# addr2line -e /boot/kernel/kernel.symbols 0xc0635864 /usr/src/sys/vm/vm_map.c:1405 milla# addr2line -e /boot/kernel/kernel.symbols 0xc06990e0 /usr/src/sys/sparc64/sparc64/pmap.c:627 milla# addr2line -e /boot/kernel/kernel.symbols 0xc0632054 /usr/src/sys/vm/vm_init.c:126 milla# addr2line -e /boot/kernel/kernel.symbols 0xc031cd0c /usr/src/sys/kern/init_main.c:252 milla# addr2line -e /boot/kernel/kernel.symbols 0xc0088030 /usr/src/sys/sparc64/sparc64/locore.S:84 The next few lines of the dmesg would usually be: Preloaded elf kernel "/boot/kernel.old/kernel" at 0xc0c0a000. real memory = 1073741824 (1024 MB) avail memory = 1027825664 (980 MB) machine: SUNW,Ultra-250 cpu0: Sun Microsystems UltraSparc-II Processor (400.00 MHz CPU) mask=0x90 maxtl=5 maxwin=7 initalizing intr_countp cpu1: Sun Microsystems UltraSparc-II Processor (400.00 MHz CPU) mask=0xa0 maxtl=5 maxwin=7 INTR: Adding CPU 1 as a target FreeBSD/SMP: Multiprocessor System Detected: 2 CPUs Gavin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194766 - in head/sys: dev/md fs/procfs fs/tmpfs kern security/mac_biba security/mac_lomac sys vm
On 25.06.09 15:27, Gavin Atkinson wrote: On Tue, 2009-06-23 at 20:45 +, Konstantin Belousov wrote: Author: kib Date: Tue Jun 23 20:45:22 2009 New Revision: 194766 URL: http://svn.freebsd.org/changeset/base/194766 Log: Implement global and per-uid accounting of the anonymous memory. Add rlimit RLIMIT_SWAP that limits the amount of swap that may be reserved for the uid. This commit also breaks sparc64 for me, stock kernel with no local changes. r194765 boots successfully. This is on a dual-CPU E250 with 1G RAM. Sorry we forgot to follow up on this thread. This was fixed in r194858 . Cheers, Florian ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194959 - head/sys/kern
Author: jhb Date: Thu Jun 25 13:36:57 2009 New Revision: 194959 URL: http://svn.freebsd.org/changeset/base/194959 Log: Tweak the oshmctl() compile fix: convert the K&R definition to ANSI. Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c == --- head/sys/kern/sysv_shm.cThu Jun 25 13:15:20 2009(r194958) +++ head/sys/kern/sysv_shm.cThu Jun 25 13:36:57 2009(r194959) @@ -116,10 +116,6 @@ struct shmmap_state { int shmid; }; -#if defined(__i386__) && (defined(COMPAT_FREEBSD4) || defined(COMPAT_43)) -struct oshmctl_args; -static int oshmctl(struct thread *td, struct oshmctl_args *uap); -#endif static void shm_deallocate_segment(struct shmid_kernel *); static int shm_find_segment_by_key(key_t); static struct shmid_kernel *shm_find_segment_by_shmid(int); @@ -901,9 +897,7 @@ struct oshmctl_args { }; static int -oshmctl(td, uap) - struct thread *td; - struct oshmctl_args *uap; +oshmctl(struct thread *td, struct oshmctl_args *uap) { #ifdef COMPAT_43 int error = 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194844 - in head/sys: conf dev/ata
Rafal Jaworowski wrote: On 2009-06-25, at 12:19, Alexander Motin wrote: Rafal Jaworowski wrote: = --- head/sys/conf/filesWed Jun 24 15:33:33 2009(r194843) +++ head/sys/conf/filesWed Jun 24 15:38:17 2009(r194844) @@ -491,12 +491,12 @@ dev/ata/ata_if.moptional ata | atacore dev/ata/ata-all.coptional ata | atacore dev/ata/ata-lowlevel.coptional ata | atacore dev/ata/ata-queue.coptional ata | atacore +dev/ata/ata-dma.coptional ata | atadma +dev/ata/ata-sata.coptional ata | atasata What is atadma and atasata here, kernel options? What for are they needed? You will not be able to build most of drivers without them, while enabling them for others will not give you any benefit, just bigger code size. I think dependency must be reviewed there. This was supposed to follow the fine grained kernel options route for various ata subsystems. Both ata-dma.c and ata-sata.c seem orthogonal to the rest of the ata framework (think ata controller without DMA, which is often seen in embedded). They could also be made mandatory under atacore, I have no problem with this approach too. There is move for fine-grained PCI drivers modularization. But ata-dma.c and ata-sata.c are not a drivers and are not a kernel modules. They are not orthogonal, but mandatory requisites of some drivers (all PCI, plus may be some others). All kernel build dependencies must be tracked without user influence. So please, or, as you said, add them both to the atacore, or, as I would prefer, ata-dma.c to atapci and any other requiring drivers, and ata-sata.c to atacore. -- Alexander Motin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194766 - in head/sys: dev/md fs/procfs fs/tmpfs kern security/mac_biba security/mac_lomac sys vm
On Thu, 2009-06-25 at 15:29 +0200, Florian Smeets wrote: > On 25.06.09 15:27, Gavin Atkinson wrote: > > On Tue, 2009-06-23 at 20:45 +, Konstantin Belousov wrote: > >> Author: kib > >> Date: Tue Jun 23 20:45:22 2009 > >> New Revision: 194766 > >> URL: http://svn.freebsd.org/changeset/base/194766 > >> > >> Log: > >>Implement global and per-uid accounting of the anonymous memory. Add > >>rlimit RLIMIT_SWAP that limits the amount of swap that may be reserved > >>for the uid. > > > > This commit also breaks sparc64 for me, stock kernel with no local > > changes. r194765 boots successfully. This is on a dual-CPU E250 with > > 1G RAM. > > > > Sorry we forgot to follow up on this thread. This was fixed in r194858 Ah, cool. I'm chasing another bug at the moment unrelated to this and bumped into this on the way, so hadn't had a chance to take the machine to top-of-tree. Sorry for the noise, and thanks for the rapid fix! Gavin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194918 - head/sys/net
On Jun 24, 2009, at 17:53 , Navdeep Parhar wrote: Author: np Date: Wed Jun 24 21:53:25 2009 New Revision: 194918 URL: http://svn.freebsd.org/changeset/base/194918 Log: Add 10Gbase-T to known ethernet media types. Approved by: gnn (mentor) MFC after: 1 week. Modified: head/sys/net/if_media.h Modified: head/sys/net/if_media.h = = = = = = = = == --- head/sys/net/if_media.h Wed Jun 24 21:51:42 2009(r194917) +++ head/sys/net/if_media.h Wed Jun 24 21:53:25 2009(r194918) @@ -149,6 +149,7 @@ uint64_tifmedia_baudrate(int); #define IFM_10G_TWINAX_LONG 23 /* 10GBase Twinax Long copper */ #define IFM_10G_LRM 24 /* 10GBase-LRM 850nm Multi-mode */ #define IFM_UNKNOWN 25 /* media types not defined yet */ +#define IFM_10G_T 26 /* 10GBase-T - RJ45 */ /* note 31 is the max! */ @@ -358,6 +359,7 @@ struct ifmedia_description { { IFM_10G_TWINAX, "10Gbase-Twinax" }, \ { IFM_10G_TWINAX_LONG, "10Gbase-Twinax-Long" }, \ { IFM_UNKNOWN, "Unknown" }, \ + { IFM_10G_T,"10Gbase-T" },\ { 0, NULL },\ } @@ -615,6 +617,7 @@ struct ifmedia_baudrate { { IFM_ETHER | IFM_10G_TWINAX, IF_Gbps(10ULL) }, \ { IFM_ETHER | IFM_10G_TWINAX_LONG, IF_Gbps(10ULL) }, \ { IFM_ETHER | IFM_10G_LRM, IF_Gbps(10ULL) }, \ + { IFM_ETHER | IFM_10G_T,IF_Gbps(10ULL) }, \ \ { IFM_TOKEN | IFM_TOK_STP4, IF_Mbps(4) }, \ { IFM_TOKEN | IFM_TOK_STP16,IF_Mbps(16) }, \ Howdy, John Baldwin pointed out to me that UNKNOWN really should have been pushed up to the end. Can you make a small patch and send it to me? Increase the number and move its string to the end of the array? Best, George ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194960 - head/sys/dev/drm
Author: rnoland Date: Thu Jun 25 14:15:45 2009 New Revision: 194960 URL: http://svn.freebsd.org/changeset/base/194960 Log: Ensure that we always hold the lock when calling vblank_disable_fn() MFC after:3 days Modified: head/sys/dev/drm/drm_irq.c Modified: head/sys/dev/drm/drm_irq.c == --- head/sys/dev/drm/drm_irq.c Thu Jun 25 13:36:57 2009(r194959) +++ head/sys/dev/drm/drm_irq.c Thu Jun 25 14:15:45 2009(r194960) @@ -70,6 +70,9 @@ static void vblank_disable_fn(void *arg) struct drm_device *dev = (struct drm_device *)arg; int i; + /* Make sure that we are called with the lock held */ + mtx_assert(&dev->vbl_lock, MA_OWNED); + if (callout_pending(&dev->vblank_disable_timer)) { /* callout was reset */ return; @@ -109,7 +112,9 @@ void drm_vblank_cleanup(struct drm_devic callout_drain(&dev->vblank_disable_timer); + DRM_SPINLOCK(&dev->vbl_lock); vblank_disable_fn((void *)dev); + DRM_SPINUNLOCK(&dev->vbl_lock); free(dev->vblank, DRM_MEM_DRIVER); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194962 - head/sys/netinet
Author: rwatson Date: Thu Jun 25 14:44:00 2009 New Revision: 194962 URL: http://svn.freebsd.org/changeset/base/194962 Log: Initialize in_ifaddr_lock using RW_SYSINIT() instead of in ip_init(), so that it doesn't run multiple times if VIMAGE is being used. Discussed with: bz MFC after:6 weeks Modified: head/sys/netinet/in_var.h head/sys/netinet/ip_input.c Modified: head/sys/netinet/in_var.h == --- head/sys/netinet/in_var.h Thu Jun 25 14:41:42 2009(r194961) +++ head/sys/netinet/in_var.h Thu Jun 25 14:44:00 2009(r194962) @@ -116,7 +116,6 @@ extern u_long in_ifaddrhmask; /* mask extern struct rwlock in_ifaddr_lock; -#defineIN_IFADDR_LOCK_INIT() rw_init(&in_ifaddr_lock, "in_ifaddr_lock") #defineIN_IFADDR_LOCK_ASSERT() rw_assert(&in_ifaddr_lock, RA_LOCKED) #defineIN_IFADDR_RLOCK() rw_rlock(&in_ifaddr_lock) #defineIN_IFADDR_RLOCK_ASSERT()rw_assert(&in_ifaddr_lock, RA_RLOCKED) Modified: head/sys/netinet/ip_input.c == --- head/sys/netinet/ip_input.c Thu Jun 25 14:41:42 2009(r194961) +++ head/sys/netinet/ip_input.c Thu Jun 25 14:44:00 2009(r194962) @@ -117,7 +117,9 @@ static int maxfragsperpacket; intipstealth; static int nipq; /* Total # of reass queues */ #endif + struct rwlock in_ifaddr_lock; +RW_SYSINIT(in_ifaddr_lock, &in_ifaddr_lock, "in_ifaddr_lock"); SYSCTL_V_INT(V_NET, vnet_inet, _net_inet_ip, IPCTL_FORWARDING, forwarding, CTLFLAG_RW, ipforwarding, 0, @@ -326,7 +328,6 @@ ip_init(void) TAILQ_INIT(&V_in_ifaddrhead); V_in_ifaddrhashtbl = hashinit(INADDR_NHASH, M_IFADDR, &V_in_ifaddrhmask); - IN_IFADDR_LOCK_INIT(); /* Initialize IP reassembly queue. */ for (i = 0; i < IPREASS_NHASH; i++) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194963 - head/sys/dev/drm
Author: rnoland Date: Thu Jun 25 15:30:25 2009 New Revision: 194963 URL: http://svn.freebsd.org/changeset/base/194963 Log: Additional vblank cleanups. Use the vbl_lock when maniputlating the refcount. Eventually I want to convert this to use our internal refcount code. Continue to use atomic ops for manipulating vblank count since we access it often just for reading. MFC after:3 days Modified: head/sys/dev/drm/drm_irq.c Modified: head/sys/dev/drm/drm_irq.c == --- head/sys/dev/drm/drm_irq.c Thu Jun 25 14:44:00 2009(r194962) +++ head/sys/dev/drm/drm_irq.c Thu Jun 25 15:30:25 2009(r194963) @@ -136,13 +136,14 @@ int drm_vblank_init(struct drm_device *d DRM_DEBUG("\n"); /* Zero per-crtc vblank stuff */ + DRM_SPINLOCK(&dev->vbl_lock); for (i = 0; i < num_crtcs; i++) { DRM_INIT_WAITQUEUE(&dev->vblank[i].queue); - atomic_set(&dev->vblank[i].count, 0); - atomic_set(&dev->vblank[i].refcount, 0); + dev->vblank[i].refcount = 0; + atomic_set_rel_32(&dev->vblank[i].count, 0); } - dev->vblank_disable_allowed = 0; + DRM_SPINUNLOCK(&dev->vbl_lock); return 0; @@ -275,7 +276,7 @@ int drm_control(struct drm_device *dev, u32 drm_vblank_count(struct drm_device *dev, int crtc) { - return atomic_read(&dev->vblank[crtc].count); + return atomic_load_acq_32(&dev->vblank[crtc].count); } static void drm_update_vblank_count(struct drm_device *dev, int crtc) @@ -301,45 +302,44 @@ static void drm_update_vblank_count(stru DRM_DEBUG("enabling vblank interrupts on crtc %d, missed %d\n", crtc, diff); - atomic_add(diff, &dev->vblank[crtc].count); + atomic_add_rel_32(&dev->vblank[crtc].count, diff); } int drm_vblank_get(struct drm_device *dev, int crtc) { int ret = 0; - DRM_SPINLOCK(&dev->vbl_lock); + /* Make sure that we are called with the lock held */ + mtx_assert(&dev->vbl_lock, MA_OWNED); + /* Going from 0->1 means we have to enable interrupts again */ - atomic_add_acq_int(&dev->vblank[crtc].refcount, 1); - if (dev->vblank[crtc].refcount == 1 && + if (++dev->vblank[crtc].refcount == 1 && !dev->vblank[crtc].enabled) { ret = dev->driver->enable_vblank(dev, crtc); DRM_DEBUG("enabling vblank on crtc %d, ret: %d\n", crtc, ret); if (ret) - atomic_dec(&dev->vblank[crtc].refcount); + --dev->vblank[crtc].refcount; else { dev->vblank[crtc].enabled = 1; drm_update_vblank_count(dev, crtc); } } - DRM_SPINUNLOCK(&dev->vbl_lock); return ret; } void drm_vblank_put(struct drm_device *dev, int crtc) { - KASSERT(atomic_read(&dev->vblank[crtc].refcount) > 0, + /* Make sure that we are called with the lock held */ + mtx_assert(&dev->vbl_lock, MA_OWNED); + + KASSERT(dev->vblank[crtc].refcount > 0, ("invalid refcount")); /* Last user schedules interrupt disable */ - atomic_subtract_acq_int(&dev->vblank[crtc].refcount, 1); - - DRM_SPINLOCK(&dev->vbl_lock); - if (dev->vblank[crtc].refcount == 0) + if (--dev->vblank[crtc].refcount == 0) callout_reset(&dev->vblank_disable_timer, 5 * DRM_HZ, (timeout_t *)vblank_disable_fn, (void *)dev); - DRM_SPINUNLOCK(&dev->vbl_lock); } int drm_modeset_ctl(struct drm_device *dev, void *data, @@ -348,13 +348,11 @@ int drm_modeset_ctl(struct drm_device *d struct drm_modeset_ctl *modeset = data; int crtc, ret = 0; - DRM_DEBUG("num_crtcs=%d\n", dev->num_crtcs); /* If drm_vblank_init() hasn't been called yet, just no-op */ if (!dev->num_crtcs) goto out; crtc = modeset->crtc; - DRM_DEBUG("crtc=%d\n", crtc); if (crtc >= dev->num_crtcs) { ret = EINVAL; goto out; @@ -369,25 +367,25 @@ int drm_modeset_ctl(struct drm_device *d */ switch (modeset->cmd) { case _DRM_PRE_MODESET: - DRM_DEBUG("pre-modeset\n"); + DRM_DEBUG("pre-modeset, crtc %d\n", crtc); + DRM_SPINLOCK(&dev->vbl_lock); if (!dev->vblank[crtc].inmodeset) { dev->vblank[crtc].inmodeset = 0x1; if (drm_vblank_get(dev, crtc) == 0) dev->vblank[crtc].inmodeset |= 0x2; } + DRM_SPINUNLOCK(&dev->vbl_lock); break; case _DRM_POST_MODESET: - DRM_DEBUG("post-modeset\n"); + DRM_DEBUG("post-modeset, crtc %d\n", crtc); + DRM_SPINLOCK(&dev->vbl_lock);
svn commit: r194964 - stable/7/usr.bin/ncal
Author: ume Date: Thu Jun 25 15:34:17 2009 New Revision: 194964 URL: http://svn.freebsd.org/changeset/base/194964 Log: MFC 194366, 194447: Fix column width of weekday names for multibyte locales. Modified: stable/7/usr.bin/ncal/ (props changed) stable/7/usr.bin/ncal/ncal.c Modified: stable/7/usr.bin/ncal/ncal.c == --- stable/7/usr.bin/ncal/ncal.cThu Jun 25 15:30:25 2009 (r194963) +++ stable/7/usr.bin/ncal/ncal.cThu Jun 25 15:34:17 2009 (r194964) @@ -417,13 +417,18 @@ printmonth(int y, int m, int jd_flag) { struct monthlines month; struct weekdays wds; - int i; + int i, len; mkmonth(y, m - 1, jd_flag, &month); mkweekdays(&wds); printf("%ls %d\n", month.name, y); - for (i = 0; i != 7; i++) - wprintf(L"%.2ls%s\n", wds.names[i], month.lines[i]); + for (i = 0; i != 7; i++) { + len = wcslen(wds.names[i]); + if (wcswidth(wds.names[i], len) == len) + wprintf(L"%.2ls%s\n", wds.names[i], month.lines[i]); + else + wprintf(L"%.1ls%s\n", wds.names[i], month.lines[i]); + } if (flag_weeks) printf(" %s\n", month.weeks); } @@ -759,7 +764,7 @@ mkmonthb(int y, int m, int jd_flag, stru void mkweekdays(struct weekdays *wds) { - int i, len; + int i, len, width = 0; struct tm tm; wchar_t buf[20]; @@ -768,11 +773,15 @@ mkweekdays(struct weekdays *wds) for (i = 0; i != 7; i++) { tm.tm_wday = (i+1) % 7; wcsftime(buf, sizeof(buf), L"%a", &tm); - len = wcslen(buf); - if (len > 2) - len = 2; - wcscpy(wds->names[i], L" "); - wcsncpy(wds->names[i] + 2 - len, buf, len); + for (len = 2; len > 0; --len) { + if ((width = wcswidth(buf, len)) <= 2) + break; + } + wmemset(wds->names[i], L'\0', 4); + if (width == 1) + wds->names[i][0] = L' '; + wcsncat(wds->names[i], buf, len); + wcsncat(wds->names[i], L" ", 1); } } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194965 - head/sys/dev/drm
Author: rnoland Date: Thu Jun 25 15:36:11 2009 New Revision: 194965 URL: http://svn.freebsd.org/changeset/base/194965 Log: Fix one use of atomic for refcount missed in last commit. MFC after:3 days Modified: head/sys/dev/drm/drm_irq.c Modified: head/sys/dev/drm/drm_irq.c == --- head/sys/dev/drm/drm_irq.c Thu Jun 25 15:34:17 2009(r194964) +++ head/sys/dev/drm/drm_irq.c Thu Jun 25 15:36:11 2009(r194965) @@ -89,7 +89,7 @@ static void vblank_disable_fn(void *arg) return; for (i = 0; i < dev->num_crtcs; i++) { - if (atomic_read(&dev->vblank[i].refcount) == 0 && + if (dev->vblank[i].refcount == 0 && dev->vblank[i].enabled && !dev->vblank[i].inmodeset) { DRM_DEBUG("disabling vblank on crtc %d\n", i); dev->vblank[i].last = ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194966 - head/sys/dev/drm
Author: rnoland Date: Thu Jun 25 15:47:32 2009 New Revision: 194966 URL: http://svn.freebsd.org/changeset/base/194966 Log: Keep track of the hardware counter more aggressively while interrupts are enabled. This should help to reduce cases where the hardware counter reference jumps by large amounts. MFC after:3 days Modified: head/sys/dev/drm/drm_irq.c Modified: head/sys/dev/drm/drm_irq.c == --- head/sys/dev/drm/drm_irq.c Thu Jun 25 15:36:11 2009(r194965) +++ head/sys/dev/drm/drm_irq.c Thu Jun 25 15:47:32 2009(r194966) @@ -325,6 +325,10 @@ int drm_vblank_get(struct drm_device *de } } + if (dev->vblank[crtc].enabled) + dev->vblank[crtc].last = + dev->driver->get_vblank_counter(dev, crtc); + return ret; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194925 - head/sys/dev/e1000
On Wednesday 24 June 2009 6:16:02 pm Jack F Vogel wrote: > Author: jfv > Date: Wed Jun 24 22:16:02 2009 > New Revision: 194925 > URL: http://svn.freebsd.org/changeset/base/194925 > > Log: > need to make intr_bind call architecture specific for > global builds (failing sun4v lint build) You should be able to use BUS_BIND_INTR() instead which is not machine-dependent. It accepts the IRQ resource directly as well which is a bit cleaner. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194967 - in stable/7/sys: . contrib/pf kern
Author: jhb Date: Thu Jun 25 16:10:04 2009 New Revision: 194967 URL: http://svn.freebsd.org/changeset/base/194967 Log: MFC: Fix a deadlock in the getpeername() method for UNIX domain sockets. Modified: stable/7/sys/ (props changed) stable/7/sys/contrib/pf/ (props changed) stable/7/sys/kern/uipc_usrreq.c Modified: stable/7/sys/kern/uipc_usrreq.c == --- stable/7/sys/kern/uipc_usrreq.c Thu Jun 25 15:47:32 2009 (r194966) +++ stable/7/sys/kern/uipc_usrreq.c Thu Jun 25 16:10:04 2009 (r194967) @@ -672,7 +672,7 @@ uipc_peeraddr(struct socket *so, struct KASSERT(unp != NULL, ("uipc_peeraddr: unp == NULL")); *nam = malloc(sizeof(struct sockaddr_un), M_SONAME, M_WAITOK); - UNP_PCB_LOCK(unp); + UNP_GLOBAL_RLOCK(); /* * XXX: It seems that this test always fails even when connection is * established. So, this else clause is added as workaround to @@ -682,7 +682,7 @@ uipc_peeraddr(struct socket *so, struct if (unp2 != NULL) { UNP_PCB_LOCK(unp2); if (unp2->unp_addr != NULL) - sa = (struct sockaddr *) unp->unp_conn->unp_addr; + sa = (struct sockaddr *) unp2->unp_addr; else sa = &sun_noname; bcopy(sa, *nam, sa->sa_len); @@ -691,7 +691,7 @@ uipc_peeraddr(struct socket *so, struct sa = &sun_noname; bcopy(sa, *nam, sa->sa_len); } - UNP_PCB_UNLOCK(unp); + UNP_GLOBAL_RUNLOCK(); return (0); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194968 - in head: share/man/man8 usr.bin/ypcat usr.bin/ypmatch usr.bin/ypwhich usr.sbin/ypserv
Author: brian Date: Thu Jun 25 16:15:39 2009 New Revision: 194968 URL: http://svn.freebsd.org/changeset/base/194968 Log: Support shadow.byname and shadow.byuid maps, protecting them by insisting on privileged port access. Include /var/yp/Makefile.local if it exists and suggest using it to override /var/yp/Makefile behaviour. Approved by: re (kib) MFC after:3 weeks Modified: head/share/man/man8/yp.8 head/usr.bin/ypcat/ypcat.c head/usr.bin/ypmatch/ypmatch.c head/usr.bin/ypwhich/ypwhich.c head/usr.sbin/ypserv/Makefile.yp head/usr.sbin/ypserv/yp_access.c head/usr.sbin/ypserv/ypserv.8 Modified: head/share/man/man8/yp.8 == --- head/share/man/man8/yp.8Thu Jun 25 16:10:04 2009(r194967) +++ head/share/man/man8/yp.8Thu Jun 25 16:15:39 2009(r194968) @@ -28,7 +28,7 @@ .\" from: @(#)yp.8 1.0 (deraadt) 4/26/93 .\" $FreeBSD$ .\" -.Dd April 5, 1993 +.Dd June 25, 2009 .Dt YP 8 .Os .Sh NAME @@ -310,9 +310,15 @@ The .Tn NIS .Pa Makefile .Pq Pa /var/yp/Makefile -will do this automatically if the administrator comments out the -line which says -.Dq Li NOPUSH=true +will do this automatically if the administrator creates +.Pa /var/yp/Makefile.local +and empties the +.Va NOPUSH +variable: +.Bd -literal -offset four +.Li NOPUSH= +.Ed +.Pp .Va ( NOPUSH is set to true by default because the default configuration is for a small network with only one @@ -394,9 +400,11 @@ To help prevent this, .Fx Ns 's .Tn NIS server handles the shadow password maps -.Pa ( master.passwd.byname +.Pa ( master.passwd.byname , +.Pa master.passwd.byuid , +.Pa shadow.byname and -.Pa master.passwd.byuid ) +.Pa shadow.byuid ) in a special way: the server will only provide access to these maps in response to requests that originate on privileged ports. Since only the super-user is allowed to bind to a privileged port, Modified: head/usr.bin/ypcat/ypcat.c == --- head/usr.bin/ypcat/ypcat.c Thu Jun 25 16:10:04 2009(r194967) +++ head/usr.bin/ypcat/ypcat.c Thu Jun 25 16:15:39 2009(r194968) @@ -52,6 +52,7 @@ struct ypalias { } ypaliases[] = { { "passwd", "passwd.byname" }, { "master.passwd", "master.passwd.byname" }, + { "shadow", "shadow.byname" }, { "group", "group.byname" }, { "networks", "networks.byaddr" }, { "hosts", "hosts.byaddr" }, Modified: head/usr.bin/ypmatch/ypmatch.c == --- head/usr.bin/ypmatch/ypmatch.c Thu Jun 25 16:10:04 2009 (r194967) +++ head/usr.bin/ypmatch/ypmatch.c Thu Jun 25 16:15:39 2009 (r194968) @@ -52,6 +52,7 @@ struct ypalias { } ypaliases[] = { { "passwd", "passwd.byname" }, { "master.passwd", "master.passwd.byname" }, + { "shadow", "shadow.byname" }, { "group", "group.byname" }, { "networks", "networks.byaddr" }, { "hosts", "hosts.byname" }, Modified: head/usr.bin/ypwhich/ypwhich.c == --- head/usr.bin/ypwhich/ypwhich.c Thu Jun 25 16:10:04 2009 (r194967) +++ head/usr.bin/ypwhich/ypwhich.c Thu Jun 25 16:15:39 2009 (r194968) @@ -64,6 +64,7 @@ struct ypalias { } ypaliases[] = { { "passwd", "passwd.byname" }, { "master.passwd", "master.passwd.byname" }, + { "shadow", "shadow.byname" }, { "group", "group.byname" }, { "networks", "networks.byaddr" }, { "hosts", "hosts.byaddr" }, Modified: head/usr.sbin/ypserv/Makefile.yp == --- head/usr.sbin/ypserv/Makefile.ypThu Jun 25 16:10:04 2009 (r194967) +++ head/usr.sbin/ypserv/Makefile.ypThu Jun 25 16:15:39 2009 (r194968) @@ -11,33 +11,40 @@ # This Makefile can be modified to support more NIS maps if desired. # -# If this machine is an NIS master, comment out this next line so -# that changes to the NIS maps can be propagated to the slave servers. -# (By default we assume that we are only serving a small domain with -# only one server.) +# If this machine is an NIS master, reset this variable (NOPUSH=) +# in Makefile.local so that changes to the NIS maps can be propagated to +# the slave servers. (By default we assume that we are only serving a +# small domain with only one server.) # NOPUSH = "True" +# If this machine does not wish to generate a linux-style shadow map +# from the master.passwd file, reset this variable (SHADOW=) in +# Makefile.local. +SHADOW = "True" + # If you want to use a FreeBSD NIS server to serve non-FreeBSD clients # (i.e. clients who expect the password field in the passwd maps to be -# valid) then uncomment this line. This will cause $YPDIR/passwd to -# be generated with v
svn commit: r194969 - head/sys/dev/drm
Author: rnoland Date: Thu Jun 25 16:17:07 2009 New Revision: 194969 URL: http://svn.freebsd.org/changeset/base/194969 Log: Initialize max_vblank_count earlier. Small cleanup of the error paths while I'm here. MFC after:3 days Modified: head/sys/dev/drm/radeon_cp.c head/sys/dev/drm/radeon_irq.c Modified: head/sys/dev/drm/radeon_cp.c == --- head/sys/dev/drm/radeon_cp.cThu Jun 25 16:15:39 2009 (r194968) +++ head/sys/dev/drm/radeon_cp.cThu Jun 25 16:17:07 2009 (r194969) @@ -2064,16 +2064,22 @@ int radeon_driver_load(struct drm_device drm_get_resource_len(dev, 2), _DRM_REGISTERS, _DRM_READ_ONLY | _DRM_DRIVER, &dev_priv->mmio); if (ret != 0) - return ret; + goto error; ret = drm_vblank_init(dev, 2); - if (ret) { - radeon_driver_unload(dev); - return ret; - } + if (ret != 0) + goto error; + + dev->max_vblank_count = 0x001f; DRM_DEBUG("%s card detected\n", - ((dev_priv->flags & RADEON_IS_AGP) ? "AGP" : (((dev_priv->flags & RADEON_IS_PCIE) ? "PCIE" : "PCI"; + ((dev_priv->flags & RADEON_IS_AGP) ? "AGP" : + (((dev_priv->flags & RADEON_IS_PCIE) ? "PCIE" : "PCI"; + + return ret; + +error: + radeon_driver_unload(dev); return ret; } Modified: head/sys/dev/drm/radeon_irq.c == --- head/sys/dev/drm/radeon_irq.c Thu Jun 25 16:15:39 2009 (r194968) +++ head/sys/dev/drm/radeon_irq.c Thu Jun 25 16:17:07 2009 (r194969) @@ -380,8 +380,6 @@ int radeon_driver_irq_postinstall(struct atomic_set(&dev_priv->swi_emitted, 0); DRM_INIT_WAITQUEUE(&dev_priv->swi_queue); - dev->max_vblank_count = 0x001f; - radeon_irq_set_state(dev, RADEON_SW_INT_ENABLE, 1); return 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194925 - head/sys/dev/e1000
Oh, hmmm, wasn't aware of that, I'll take a look at it today. Thanks John, Jack On Thu, Jun 25, 2009 at 5:21 AM, John Baldwin wrote: > On Wednesday 24 June 2009 6:16:02 pm Jack F Vogel wrote: > > Author: jfv > > Date: Wed Jun 24 22:16:02 2009 > > New Revision: 194925 > > URL: http://svn.freebsd.org/changeset/base/194925 > > > > Log: > > need to make intr_bind call architecture specific for > > global builds (failing sun4v lint build) > > You should be able to use BUS_BIND_INTR() instead which is not > machine-dependent. It accepts the IRQ resource directly as well which is a > bit cleaner. > > -- > John Baldwin > ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194970 - head/lib/libc/posix1e
Author: trasz Date: Thu Jun 25 16:34:29 2009 New Revision: 194970 URL: http://svn.freebsd.org/changeset/base/194970 Log: Manual page tweaks. Modified: head/lib/libc/posix1e/acl.3 Modified: head/lib/libc/posix1e/acl.3 == --- head/lib/libc/posix1e/acl.3 Thu Jun 25 16:17:07 2009(r194969) +++ head/lib/libc/posix1e/acl.3 Thu Jun 25 16:34:29 2009(r194970) @@ -130,7 +130,7 @@ and may be used to free userland working This function is described in .Xr acl_from_text 3 , and may be used to convert a text-form ACL into working ACL state, if -the ACL has POSIX.1e semantics. +the ACL has POSIX.1e or NFSv4 semantics. .It Fn acl_get_entry This function is described in .Xr acl_get_entry 3 , @@ -211,7 +211,7 @@ and may be used to remove extended entri .Xc These functions are described in .Xr acl_to_text 3 , -and may be used to generate a text-form of a POSIX.1e semantics ACL. +and may be used to generate a text-form of a POSIX.1e or NFSv4 semantics ACL. .It Xo .Fn acl_valid , .Fn acl_valid_fd_np , ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194971 - in head/sys: netinet netinet6 netipsec
Author: rwatson Date: Thu Jun 25 16:35:28 2009 New Revision: 194971 URL: http://svn.freebsd.org/changeset/base/194971 Log: Add address list locking for in6_ifaddrhead/ia_link: as with locking for in_ifaddrhead, we stick with an rwlock for the time being, which we will revisit in the future with a possible move to rmlocks. Some pieces of code require significant further reworking to be safe from all classes of writer-writer races. Reviewed by: bz MFC after:6 weeks Modified: head/sys/netinet/ip_carp.c head/sys/netinet6/in6.c head/sys/netinet6/in6_ifattach.c head/sys/netinet6/in6_src.c head/sys/netinet6/in6_var.h head/sys/netinet6/ip6_input.c head/sys/netinet6/nd6.c head/sys/netinet6/nd6_rtr.c head/sys/netipsec/key.c Modified: head/sys/netinet/ip_carp.c == --- head/sys/netinet/ip_carp.c Thu Jun 25 16:34:29 2009(r194970) +++ head/sys/netinet/ip_carp.c Thu Jun 25 16:35:28 2009(r194971) @@ -1680,6 +1680,7 @@ carp_set_addr6(struct carp_softc *sc, st /* we have to do it by hands to check we won't match on us */ ia_if = NULL; own = 0; + IN6_IFADDR_RLOCK(); TAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) { int i; @@ -1702,14 +1703,20 @@ carp_set_addr6(struct carp_softc *sc, st } } - if (!ia_if) + if (!ia_if) { + IN6_IFADDR_RUNLOCK(); return (EADDRNOTAVAIL); + } ia = ia_if; + ifa_ref(&ia->ia_ifa); + IN6_IFADDR_RUNLOCK(); ifp = ia->ia_ifp; if (ifp == NULL || (ifp->if_flags & IFF_MULTICAST) == 0 || - (im6o->im6o_multicast_ifp && im6o->im6o_multicast_ifp != ifp)) + (im6o->im6o_multicast_ifp && im6o->im6o_multicast_ifp != ifp)) { + ifa_free(&ia->ia_ifa); return (EADDRNOTAVAIL); + } if (!sc->sc_naddrs6) { struct in6_multi *in6m; @@ -1811,12 +1818,14 @@ carp_set_addr6(struct carp_softc *sc, st carp_setrun(sc, 0); CARP_UNLOCK(cif); + ifa_free(&ia->ia_ifa); /* XXXRW: should hold reference for softc. */ return (0); cleanup: if (!sc->sc_naddrs6) carp_multicast6_cleanup(sc); + ifa_free(&ia->ia_ifa); return (error); } Modified: head/sys/netinet6/in6.c == --- head/sys/netinet6/in6.c Thu Jun 25 16:34:29 2009(r194970) +++ head/sys/netinet6/in6.c Thu Jun 25 16:35:28 2009(r194971) @@ -831,8 +831,10 @@ in6_update_ifa(struct ifnet *ifp, struct TAILQ_INSERT_TAIL(&ifp->if_addrhead, &ia->ia_ifa, ifa_link); IF_ADDR_UNLOCK(ifp); - ifa_ref(&ia->ia_ifa); /* in6_if_addrhead */ + ifa_ref(&ia->ia_ifa); /* in6_ifaddrhead */ + IN6_IFADDR_WLOCK(); TAILQ_INSERT_TAIL(&V_in6_ifaddrhead, ia, ia_link); + IN6_IFADDR_WUNLOCK(); } /* update timestamp */ @@ -1376,7 +1378,9 @@ in6_unlink_ifa(struct in6_ifaddr *ia, st IF_ADDR_UNLOCK(ifp); ifa_free(&ia->ia_ifa); /* if_addrhead */ + IN6_IFADDR_WLOCK(); TAILQ_REMOVE(&V_in6_ifaddrhead, ia, ia_link); + IN6_IFADDR_WUNLOCK(); ifa_free(&ia->ia_ifa); /* in6_ifaddrhead */ /* @@ -1917,12 +1921,15 @@ in6_localaddr(struct in6_addr *in6) if (IN6_IS_ADDR_LOOPBACK(in6) || IN6_IS_ADDR_LINKLOCAL(in6)) return 1; + IN6_IFADDR_RLOCK(); TAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) { if (IN6_ARE_MASKED_ADDR_EQUAL(in6, &ia->ia_addr.sin6_addr, &ia->ia_prefixmask.sin6_addr)) { + IN6_IFADDR_RUNLOCK(); return 1; } } + IN6_IFADDR_RUNLOCK(); return (0); } @@ -1933,14 +1940,18 @@ in6_is_addr_deprecated(struct sockaddr_i INIT_VNET_INET6(curvnet); struct in6_ifaddr *ia; + IN6_IFADDR_RLOCK(); TAILQ_FOREACH(ia, &V_in6_ifaddrhead, ia_link) { if (IN6_ARE_ADDR_EQUAL(&ia->ia_addr.sin6_addr, &sa6->sin6_addr) && - (ia->ia6_flags & IN6_IFF_DEPRECATED) != 0) + (ia->ia6_flags & IN6_IFF_DEPRECATED) != 0) { + IN6_IFADDR_RUNLOCK(); return (1); /* true */ + } /* XXX: do we still have to go thru the rest of the list? */ } + IN6_IFADDR_RUNLOCK(); return (0); /* false */ } @@ -2074,7 +2085,9 @@ in6_ifawithifp(struct ifnet *ifp, struct IF_ADDR_UNLOCK(ifp); return (besta); } + IF_ADDR_UNLOCK(ifp); + IN6_IFADDR_RLOCK()
svn commit: r194972 - head/sys/sys
Author: trasz Date: Thu Jun 25 16:36:57 2009 New Revision: 194972 URL: http://svn.freebsd.org/changeset/base/194972 Log: Tweak comment. Modified: head/sys/sys/vnode.h Modified: head/sys/sys/vnode.h == --- head/sys/sys/vnode.hThu Jun 25 16:35:28 2009(r194971) +++ head/sys/sys/vnode.hThu Jun 25 16:36:57 2009(r194972) @@ -316,8 +316,8 @@ struct vattr { #defineVADMIN 0001 /* being the file owner */ #defineVAPPEND 0004 /* permission to write/append */ /* - * VEXPLICIT_DENY makes VOP_ACCESS(9) return EPERM or EACCES only - * if permission was denied explicitly, by a "deny" rule in NFS4 ACL, + * VEXPLICIT_DENY makes VOP_ACCESSX(9) return EPERM or EACCES only + * if permission was denied explicitly, by a "deny" rule in NFSv4 ACL, * and 0 otherwise. This never happens with ordinary unix access rights * or POSIX.1e ACLs. Obviously, VEXPLICIT_DENY must be OR-ed with * some other V* constant. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194973 - head/sys/dev/cas
Author: marius Date: Thu Jun 25 16:38:16 2009 New Revision: 194973 URL: http://svn.freebsd.org/changeset/base/194973 Log: Don't use the preprocessor while inside function-like macro invocations as doing so violates the C specification. This fixes the build with Clang. Submitted by: ed Modified: head/sys/dev/cas/if_cas.c Modified: head/sys/dev/cas/if_cas.c == --- head/sys/dev/cas/if_cas.c Thu Jun 25 16:36:57 2009(r194972) +++ head/sys/dev/cas/if_cas.c Thu Jun 25 16:38:16 2009(r194973) @@ -1697,14 +1697,16 @@ cas_rint(struct cas_softc *sc) refcount_acquire(&rxds->rxds_refcount); bus_dmamap_sync(sc->sc_rdmatag, rxds->rxds_dmamap, BUS_DMASYNC_POSTREAD); +#if __FreeBSD_version < 800016 MEXTADD(m, (caddr_t)rxds->rxds_buf + off * 256 + ETHER_ALIGN, len, cas_free, -#if __FreeBSD_version < 800016 - rxds, + rxds, M_RDONLY, EXT_NET_DRV); #else + MEXTADD(m, (caddr_t)rxds->rxds_buf + + off * 256 + ETHER_ALIGN, len, cas_free, sc, (void *)(uintptr_t)idx, -#endif M_RDONLY, EXT_NET_DRV); +#endif if ((m->m_flags & M_EXT) == 0) { m_freem(m); m = NULL; @@ -1740,14 +1742,16 @@ cas_rint(struct cas_softc *sc) m->m_len = min(CAS_PAGE_SIZE - off, len); bus_dmamap_sync(sc->sc_rdmatag, rxds->rxds_dmamap, BUS_DMASYNC_POSTREAD); - MEXTADD(m, (caddr_t)rxds->rxds_buf + off, - m->m_len, cas_free, #if __FreeBSD_version < 800016 - rxds, + MEXTADD(m, (caddr_t)rxds->rxds_buf + off, + m->m_len, cas_free, rxds, M_RDONLY, + EXT_NET_DRV); #else - sc, (void *)(uintptr_t)idx, + MEXTADD(m, (caddr_t)rxds->rxds_buf + off, + m->m_len, cas_free, sc, + (void *)(uintptr_t)idx, M_RDONLY, + EXT_NET_DRV); #endif - M_RDONLY, EXT_NET_DRV); if ((m->m_flags & M_EXT) == 0) { m_freem(m); m = NULL; @@ -1774,14 +1778,16 @@ cas_rint(struct cas_softc *sc) bus_dmamap_sync(sc->sc_rdmatag, rxds2->rxds_dmamap, BUS_DMASYNC_POSTREAD); - MEXTADD(m2, (caddr_t)rxds2->rxds_buf, - m2->m_len, cas_free, #if __FreeBSD_version < 800016 - rxds2, + MEXTADD(m2, (caddr_t)rxds2->rxds_buf, + m2->m_len, cas_free, rxds2, + M_RDONLY, EXT_NET_DRV); #else + MEXTADD(m2, (caddr_t)rxds2->rxds_buf, + m2->m_len, cas_free, sc, (void *)(uintptr_t)idx2, -#endif M_RDONLY, EXT_NET_DRV); +#endif if ((m2->m_flags & M_EXT) == 0) { m_freem(m2); m2 = NULL; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194975 - head/bin/sh
Author: jilles Date: Thu Jun 25 17:10:51 2009 New Revision: 194975 URL: http://svn.freebsd.org/changeset/base/194975 Log: Improve IFS expansion using code from NetBSD. We now pass the ifs.sh testsuite. PR: standards/79067 Approved by: ed (mentor) (implicit) Obtained from:NetBSD Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c == --- head/bin/sh/expand.cThu Jun 25 16:48:13 2009(r194974) +++ head/bin/sh/expand.cThu Jun 25 17:10:51 2009(r194975) @@ -82,7 +82,7 @@ struct ifsregion { struct ifsregion *next; /* next region in list */ int begoff; /* offset of start of region */ int endoff; /* offset of end of region */ - int nulonly;/* search for nul bytes only */ + int inquotes; /* search for nul bytes only */ }; @@ -936,13 +936,19 @@ numvar: */ STATIC void -recordregion(int start, int end, int nulonly) +recordregion(int start, int end, int inquotes) { struct ifsregion *ifsp; if (ifslastp == NULL) { ifsp = &ifsfirst; } else { + if (ifslastp->endoff == start + && ifslastp->inquotes == inquotes) { + /* extend previous area */ + ifslastp->endoff = end; + return; + } ifsp = (struct ifsregion *)ckmalloc(sizeof (struct ifsregion)); ifslastp->next = ifsp; } @@ -950,7 +956,7 @@ recordregion(int start, int end, int nul ifslastp->next = NULL; ifslastp->begoff = start; ifslastp->endoff = end; - ifslastp->nulonly = nulonly; + ifslastp->inquotes = inquotes; } @@ -969,75 +975,88 @@ ifsbreakup(char *string, struct arglist char *p; char *q; char *ifs; - int ifsspc; - int nulonly; - + const char *ifsspc; + int had_param_ch = 0; start = string; - ifsspc = 0; - nulonly = 0; - if (ifslastp != NULL) { - ifsp = &ifsfirst; - do { - p = string + ifsp->begoff; - nulonly = ifsp->nulonly; - ifs = nulonly ? nullstr : - ( ifsset() ? ifsval() : " \t\n" ); - ifsspc = 0; - while (p < string + ifsp->endoff) { - q = p; - if (*p == CTLESC) + + if (ifslastp == NULL) { + /* Return entire argument, IFS doesn't apply to any of it */ + sp = (struct strlist *)stalloc(sizeof *sp); + sp->text = start; + *arglist->lastp = sp; + arglist->lastp = &sp->next; + return; + } + + ifs = ifsset() ? ifsval() : " \t\n"; + + for (ifsp = &ifsfirst; ifsp != NULL; ifsp = ifsp->next) { + p = string + ifsp->begoff; + while (p < string + ifsp->endoff) { + had_param_ch = 1; + q = p; + if (*p == CTLESC) + p++; + if (ifsp->inquotes) { + /* Only NULs (should be from "$@") end args */ + if (*p != 0) { p++; - if (strchr(ifs, *p)) { - if (!nulonly) - ifsspc = (strchr(" \t\n", *p) != NULL); - /* Ignore IFS whitespace at start */ - if (q == start && ifsspc) { - p++; - start = p; - continue; - } - *q = '\0'; - sp = (struct strlist *)stalloc(sizeof *sp); - sp->text = start; - *arglist->lastp = sp; - arglist->lastp = &sp->next; + continue; + } + ifsspc = NULL; + } else { + if (!strchr(ifs, *p)) { p++; - if (!nulonly) { - for (;;) { - if (p >= string + ifsp->endoff) { - break; -
svn commit: r194976 - head/sys/kern
Author: jhb Date: Thu Jun 25 17:11:27 2009 New Revision: 194976 URL: http://svn.freebsd.org/changeset/base/194976 Log: Use the correct cast for the arguments passed to freebsd_shmctl() in oshmctl(). Submitted by: kib Modified: head/sys/kern/sysv_shm.c Modified: head/sys/kern/sysv_shm.c == --- head/sys/kern/sysv_shm.cThu Jun 25 17:10:51 2009(r194975) +++ head/sys/kern/sysv_shm.cThu Jun 25 17:11:27 2009(r194976) @@ -936,7 +936,7 @@ oshmctl(struct thread *td, struct oshmct goto done2; break; default: - error = freebsd7_shmctl(td, (struct shmctl_args *)uap); + error = freebsd7_shmctl(td, (struct freebsd7_shmctl_args *)uap); break; } done2: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194918 - head/sys/net
On Thu, Jun 25, 2009 at 09:18:47AM -0400, George Neville-Neil wrote: > > On Jun 24, 2009, at 17:53 , Navdeep Parhar wrote: > > >== > >--- head/sys/net/if_media.h Wed Jun 24 21:51:42 2009(r194917) > >+++ head/sys/net/if_media.h Wed Jun 24 21:53:25 2009(r194918) > >@@ -149,6 +149,7 @@ uint64_t ifmedia_baudrate(int); > >#define IFM_10G_TWINAX_LONG 23 /* 10GBase Twinax Long copper */ > >#define IFM_10G_LRM 24 /* 10GBase-LRM 850nm Multi-mode */ > >#define IFM_UNKNOWN 25 /* media types not defined yet */ > >+#define IFM_10G_T 26 /* 10GBase-T - RJ45 */ > > > > > >/* note 31 is the max! */ > >@@ -358,6 +359,7 @@ struct ifmedia_description { > > { IFM_10G_TWINAX, "10Gbase-Twinax" }, \ > > { IFM_10G_TWINAX_LONG, "10Gbase-Twinax-Long" },\ > > { IFM_UNKNOWN, "Unknown" },\ > >+{ IFM_10G_T,"10Gbase-T" }, \ > > { 0, NULL },\ > >} > > > >@@ -615,6 +617,7 @@ struct ifmedia_baudrate { > > { IFM_ETHER | IFM_10G_TWINAX, IF_Gbps(10ULL) }, \ > > { IFM_ETHER | IFM_10G_TWINAX_LONG, IF_Gbps(10ULL) }, \ > > { IFM_ETHER | IFM_10G_LRM, IF_Gbps(10ULL) }, \ > >+{ IFM_ETHER | IFM_10G_T,IF_Gbps(10ULL) }, \ > > \ > > { IFM_TOKEN | IFM_TOK_STP4, IF_Mbps(4) }, \ > > { IFM_TOKEN | IFM_TOK_STP16,IF_Mbps(16) }, \ > > > Howdy, > > John Baldwin pointed out to me that UNKNOWN really should have been > pushed up to the end. Mostly for cosmetic reasons, correct? I'm not sure if pushing it to the end has any functional impact. I'd deliberately left it where it was, simply to avoid gratuitous differences between 7 and 8 #define's. [I don't think we can reorder the #define's on 7 without having to rebuild its ifconfig too]. > > Can you make a small patch and send it to me? Increase the number and > move its string to the end of the array? If you'd still like them reordered - should we simply swap IFM_UNKNOWN/25 and IFM_10G_T/26 or should we #define IFM_UNKNOWN to be 31, the max allowed? That way we can add more types and not have to bother with IFM_UNKNOWN again. Regards, Navdeep ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194974 - head/sys/gnu/fs/xfs/FreeBSD
Author: rdivacky Date: Thu Jun 25 16:48:13 2009 New Revision: 194974 URL: http://svn.freebsd.org/changeset/base/194974 Log: Fix the build by using proper format. Pointy hat: me Approved by: kib Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Modified: head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c == --- head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Thu Jun 25 16:38:16 2009 (r194973) +++ head/sys/gnu/fs/xfs/FreeBSD/xfs_ioctl.c Thu Jun 25 16:48:13 2009 (r194974) @@ -760,7 +760,7 @@ xfs_ioctl( // vp = vn_from_inode(inode); vp = BHV_TO_VNODE(bdp); - printf("xfs_ioctl: bdp %p flags 0x%x cmd 0x%x basecmd 0x%x arg %p\n", + printf("xfs_ioctl: bdp %p flags 0x%x cmd 0x%lx basecmd 0x%lx arg %p\n", bdp, ioflags, cmd, IOCBASECMD(cmd), arg); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194977 - head/bin/sh
Author: jilles Date: Thu Jun 25 17:14:06 2009 New Revision: 194977 URL: http://svn.freebsd.org/changeset/base/194977 Log: Fix some weirdnesses in the NetBSD IFS code, in particular "$@"$ifschar if the final positional parameter is empty. With the NetBSD code, adding the $ifschar removes a parameter. PR: standards/79067 Approved by: ed (mentor) (implicit) Modified: head/bin/sh/expand.c Modified: head/bin/sh/expand.c == --- head/bin/sh/expand.cThu Jun 25 17:11:27 2009(r194976) +++ head/bin/sh/expand.cThu Jun 25 17:14:06 2009(r194977) @@ -994,12 +994,12 @@ ifsbreakup(char *string, struct arglist for (ifsp = &ifsfirst; ifsp != NULL; ifsp = ifsp->next) { p = string + ifsp->begoff; while (p < string + ifsp->endoff) { - had_param_ch = 1; q = p; if (*p == CTLESC) p++; if (ifsp->inquotes) { /* Only NULs (should be from "$@") end args */ + had_param_ch = 1; if (*p != 0) { p++; continue; @@ -1007,10 +1007,10 @@ ifsbreakup(char *string, struct arglist ifsspc = NULL; } else { if (!strchr(ifs, *p)) { + had_param_ch = 1; p++; continue; } - had_param_ch = 0; ifsspc = strchr(" \t\n", *p); /* Ignore IFS whitespace at start */ @@ -1019,6 +1019,7 @@ ifsbreakup(char *string, struct arglist start = p; continue; } + had_param_ch = 0; } /* Save this argument... */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194978 - head/sys/dev/ixgbe
Author: jfv Date: Thu Jun 25 17:16:26 2009 New Revision: 194978 URL: http://svn.freebsd.org/changeset/base/194978 Log: Change intr_bind to bus_bind_intr, thanks to John Baldwin for pointing out this simplification. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Thu Jun 25 17:14:06 2009(r194977) +++ head/sys/dev/ixgbe/ixgbe.c Thu Jun 25 17:16:26 2009(r194978) @@ -2152,13 +2152,12 @@ ixgbe_allocate_msix(struct adapter *adap return (error); } txr->msix = vector; -#if defined(__i386__) || defined(__amd64__) /* ** Bind the msix vector, and thus the ** ring to the corresponding cpu. */ - intr_bind(rman_get_start(txr->res), i); -#endif + bus_bind_intr(dev, txr->res, i); + TASK_INIT(&txr->tx_task, 0, ixgbe_handle_tx, txr); txr->tq = taskqueue_create_fast("ixgbe_txq", M_NOWAIT, taskqueue_thread_enqueue, &txr->tq); @@ -2189,13 +2188,12 @@ ixgbe_allocate_msix(struct adapter *adap rxr->msix = vector; /* used in local timer */ adapter->rx_mask |= (u64)(1 << vector); -#if defined(__i386__) || defined(__amd64__) /* ** Bind the msix vector, and thus the ** ring to the corresponding cpu. */ - intr_bind(rman_get_start(rxr->res), i); -#endif + bus_bind_intr(dev, rxr->res, i); + TASK_INIT(&rxr->rx_task, 0, ixgbe_handle_rx, rxr); rxr->tq = taskqueue_create_fast("ixgbe_rxq", M_NOWAIT, taskqueue_thread_enqueue, &rxr->tq); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194979 - head/sys/dev/e1000
Author: jfv Date: Thu Jun 25 17:21:12 2009 New Revision: 194979 URL: http://svn.freebsd.org/changeset/base/194979 Log: Change intr_bind to bus_bind_intr, also limit this to multiqueue setup which is not the shipping default for igb (its set to 1). Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c == --- head/sys/dev/e1000/if_igb.c Thu Jun 25 17:16:26 2009(r194978) +++ head/sys/dev/e1000/if_igb.c Thu Jun 25 17:21:12 2009(r194979) @@ -2189,13 +2189,12 @@ igb_allocate_msix(struct adapter *adapte txr->eims = E1000_EICR_TX_QUEUE0 << i; else txr->eims = 1 << vector; -#if defined(__i386__) || defined(__amd64__) /* ** Bind the msix vector, and thus the ** ring to the corresponding cpu. */ - intr_bind(rman_get_start(txr->res), i); -#endif + if (adapter->num_queues > 1) + bus_bind_intr(dev, txr->res, i); } /* RX Setup */ @@ -2226,7 +2225,6 @@ igb_allocate_msix(struct adapter *adapte rxr->eims = 1 << vector; /* Get a mask for local timer */ adapter->rx_mask |= rxr->eims; -#if defined(__i386__) || defined(__amd64__) /* ** Bind the msix vector, and thus the ** ring to the corresponding cpu. @@ -2234,8 +2232,8 @@ igb_allocate_msix(struct adapter *adapte ** bound to each CPU, limited by the MSIX ** vectors. */ - intr_bind(rman_get_start(rxr->res), i); -#endif + if (adapter->num_queues > 1) + bus_bind_intr(dev, rxr->res, i); } /* And Link */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194980 - head/share/man/man4
Author: thompsa Date: Thu Jun 25 17:24:36 2009 New Revision: 194980 URL: http://svn.freebsd.org/changeset/base/194980 Log: Rename man4/if_bridge.4 to man4/bridge.4 in order to be consistent with other peueso interfaces. The .Nm name hasnt been changed and all xrefs are still valid. Added: head/share/man/man4/bridge.4 - copied unchanged from r194929, head/share/man/man4/if_bridge.4 Deleted: head/share/man/man4/if_bridge.4 Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileThu Jun 25 17:21:12 2009 (r194979) +++ head/share/man/man4/MakefileThu Jun 25 17:24:36 2009 (r194980) @@ -53,6 +53,7 @@ MAN= aac.4 \ bktr.4 \ blackhole.4 \ bpf.4 \ + bridge.4 \ bt.4 \ bwi.4 \ cardbus.4 \ @@ -130,7 +131,6 @@ MAN=aac.4 \ ida.4 \ idt.4 \ ieee80211.4 \ - if_bridge.4 \ ifmib.4 \ igb.4 \ igmp.4 \ @@ -474,6 +474,7 @@ MLINKS+=bce.4 if_bce.4 MLINKS+=bfe.4 if_bfe.4 MLINKS+=bge.4 if_bge.4 MLINKS+=bktr.4 brooktree.4 +MLINKS+=bridge.4 if_bridge.4 MLINKS+=bwi.4 if_bwi.4 MLINKS+=cas.4 if_cas.4 MLINKS+=crypto.4 cryptodev.4 @@ -506,7 +507,6 @@ MLINKS+=hatm.4 if_hatm.4 MLINKS+=hme.4 if_hme.4 MLINKS+=${_hptrr.4} ${_rr232x.4} MLINKS+=idt.4 if_idt.4 -MLINKS+=if_bridge.4 bridge.4 MLINKS+=igb.4 if_igb.4 MLINKS+=ip.4 rawip.4 MLINKS+=ipfirewall.4 ipaccounting.4 \ Copied: head/share/man/man4/bridge.4 (from r194929, head/share/man/man4/if_bridge.4) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/bridge.4Thu Jun 25 17:24:36 2009 (r194980, copy of r194929, head/share/man/man4/if_bridge.4) @@ -0,0 +1,449 @@ +.\"$NetBSD: bridge.4,v 1.5 2004/01/31 20:14:11 jdc Exp $ +.\" +.\" Copyright 2001 Wasabi Systems, Inc. +.\" All rights reserved. +.\" +.\" Written by Jason R. Thorpe for Wasabi Systems, Inc. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" 3. All advertising materials mentioning features or use of this software +.\"must display the following acknowledgement: +.\"This product includes software developed for the NetBSD Project by +.\"Wasabi Systems, Inc. +.\" 4. The name of Wasabi Systems, Inc. may not be used to endorse +.\"or promote products derived from this software without specific prior +.\"written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 8, 2009 +.Dt IF_BRIDGE 4 +.Os +.Sh NAME +.Nm if_bridge +.Nd network bridge device +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device if_bridge" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following lines in +.Xr loader.conf 5 : +.Bd -literal -offset indent +if_bridge_load="YES" +bridgestp_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +driver creates a logical link between two or more IEEE 802 networks +that use the same (or +.Dq "similar enough" ) +framing format. +For example, it is possible to bridge Ethernet and 802.11 networks together, +but it is not possible to bridge Ethernet and Token Ring together. +.Pp +Each +.Nm +interface is created at runtime using interface cloning. +This is +most easily done with the +.Xr ifconfig 8 +.Cm create +command or using the +.Va cloned_interfaces +variable in +.Xr rc.conf 5 . +.Pp +The +.Nm +interface randomly chooses a link (MAC) address in the range reserved for +locally administered addresses when i
svn commit: r194981 - head/tools/regression/bin/sh/expansion
Author: jilles Date: Thu Jun 25 17:36:08 2009 New Revision: 194981 URL: http://svn.freebsd.org/changeset/base/194981 Log: Add some tests for r194975 and r194977. Approved by: ed (mentor) (implicit) Added: head/tools/regression/bin/sh/expansion/ head/tools/regression/bin/sh/expansion/ifs1.0 (contents, props changed) Added: head/tools/regression/bin/sh/expansion/ifs1.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/regression/bin/sh/expansion/ifs1.0 Thu Jun 25 17:36:08 2009(r194981) @@ -0,0 +1,35 @@ +# $FreeBSD$ + +c=: e= s=' ' +failures='' +ok='' + +check_result() { + if [ "x$2" = "x$3" ]; then + ok=x$ok + else + failures=x$failures + echo "For $1, expected $3 actual $2" + fi +} + +IFS=' +' +set -- a '' +set -- "$@" +check_result 'set -- "$@"' "($#)($1)($2)" "(2)(a)()" + +set -- a '' +set -- "$@"$e +check_result 'set -- "$@"$e' "($#)($1)($2)" "(2)(a)()" + +set -- a '' +set -- "$@"$s +check_result 'set -- "$@"$s' "($#)($1)($2)" "(2)(a)()" + +IFS="$c" +set -- a '' +set -- "$@"$c +check_result 'set -- "$@"$c' "($#)($1)($2)" "(2)(a)()" + +test "x$failures" = x ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194789 - head/usr.bin/usbhidctl
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Bruce, Bruce Evans wrote: > On Tue, 23 Jun 2009, Xin LI wrote: > >> Log: >> Use getprogname() instead of referencing __progname. > > Neither is permitted in FreeBSD in usage(). I didn't see references about this? If this is discouraged, perhaps we should mention it in style(9) or somewhere. It looks like that a lot of programs are using (not necessarily from NetBSD), but also others. Do we have some discussion in the past regarding this? >> Modified: >> head/usr.bin/usbhidctl/usbhid.c > > This was obtained from NetBSD, which requires using getprogname() in > usage(). This is purely coincidence... I didn't even looked at NetBSD code in this case, otherwise I would have brought the TNF copyright changes, etc. altogether. Cheers, - -- Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! -BEGIN PGP SIGNATURE- Version: GnuPG v2.0.11 (FreeBSD) iEYEARECAAYFAkpDtycACgkQi+vbBBjt66A8awCggrT1H1PcbRXdTuKGs9S2Bgd+ v1YAn3XibpzEdWruW7voxhZtd+5qBRmC =uf+j -END PGP SIGNATURE- ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194982 - head/sys/sun4v/conf
Author: jhb Date: Thu Jun 25 17:46:52 2009 New Revision: 194982 URL: http://svn.freebsd.org/changeset/base/194982 Log: Remove COMPAT_FREEBSD5 from sun4v. There are no FreeBSD/sun4v 5.x binaries to be compatible with. Modified: head/sys/sun4v/conf/GENERIC Modified: head/sys/sun4v/conf/GENERIC == --- head/sys/sun4v/conf/GENERIC Thu Jun 25 17:36:08 2009(r194981) +++ head/sys/sun4v/conf/GENERIC Thu Jun 25 17:46:52 2009(r194982) @@ -53,7 +53,6 @@ options GEOM_PART_GPT # GUID Partition optionsGEOM_LABEL # Provides labelization optionsCOMPAT_43 # Compatible with BSD 4.3 (sgtty) optionsCOMPAT_43TTY# BSD 4.3 TTY compat (sgtty) -optionsCOMPAT_FREEBSD5 # Compatible with FreeBSD5 optionsSCSI_DELAY=5000 # Delay (in ms) before probing SCSI optionsKTRACE # ktrace(1) support optionsSTACK # stack(9) support ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194983 - head/sys/arm/conf
Author: sam Date: Thu Jun 25 18:07:19 2009 New Revision: 194983 URL: http://svn.freebsd.org/changeset/base/194983 Log: temporarily disable optional uarts; apparently we hang when probing them (and they are not present) Modified: head/sys/arm/conf/CAMBRIA.hints Modified: head/sys/arm/conf/CAMBRIA.hints == --- head/sys/arm/conf/CAMBRIA.hints Thu Jun 25 17:46:52 2009 (r194982) +++ head/sys/arm/conf/CAMBRIA.hints Thu Jun 25 18:07:19 2009 (r194983) @@ -14,16 +14,16 @@ hint.uart.0.ier_rxbits=0x5d # NB: need U # NB: no UART1 on ixp435 # optional GPS serial port -hint.uart.1.at="ixp0" -hint.uart.1.addr=0x53fc -hint.uart.1.irq=20 -hint.uart.1.ier_rxbits=0x1 -hint.uart.1.rclk=1843200 +#hint.uart.1.at="ixp0" +#hint.uart.1.addr=0x53fc +#hint.uart.1.irq=20 +#hint.uart.1.ier_rxbits=0x1 +#hint.uart.1.rclk=1843200 # optional RS485 serial port -hint.uart.2.at="ixp0" -hint.uart.2.addr=0x53f8 -hint.uart.2.irq=21 -hint.uart.2.rclk=1843200 +#hint.uart.2.at="ixp0" +#hint.uart.2.addr=0x53f8 +#hint.uart.2.irq=21 +#hint.uart.2.rclk=1843200 # NPE Hardware Queue Manager hint.ixpqmgr.0.at="ixp0" ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194984 - head/sys/conf
Author: raj Date: Thu Jun 25 18:09:23 2009 New Revision: 194984 URL: http://svn.freebsd.org/changeset/base/194984 Log: Make ata-{dma,sata}.c dependent on atacore build option. Discussed with: mav Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Thu Jun 25 18:07:19 2009(r194983) +++ head/sys/conf/files Thu Jun 25 18:09:23 2009(r194984) @@ -489,10 +489,10 @@ dev/asr/asr.c optional asr pci # dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore +dev/ata/ata-dma.c optional ata | atacore dev/ata/ata-lowlevel.c optional ata | atacore dev/ata/ata-queue.coptional ata | atacore -dev/ata/ata-dma.c optional ata | atadma -dev/ata/ata-sata.c optional ata | atasata +dev/ata/ata-sata.c optional ata | atacore dev/ata/ata-card.c optional ata pccard | atapccard dev/ata/ata-cbus.c optional ata pc98 | atapc98 dev/ata/ata-isa.c optional ata isa | ataisa ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194985 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include
Author: jhb Date: Thu Jun 25 18:13:46 2009 New Revision: 194985 URL: http://svn.freebsd.org/changeset/base/194985 Log: - Restore the behavior of pre-allocating IDT vectors for MSI interrupts. This is mostly important for the multiple MSI message case where the IDT vectors for the entire group need to be allocated together. This also restores the assumptions made by the PCI bus code that it could invoke PCIB_MAP_MSI() once MSI vectors were allocated. - To avoid whiplash with CPU assignments, change the way that CPUs are assigned to interrupt sources on activation. Instead of assigning the CPU via pic_assign_cpu() before calling enable_intr(), allow the different interrupt source drivers to ask the MD interrupt code which CPU to use when they allocate an IDT vector. I/O APIC interrupt pins do this in their pic_enable_intr() routines giving the same behavior as before. MSI sources do it when the IDT vectors are allocated during msi_alloc() and msix_alloc(). - Change the intr_table_lock from an sx lock to a mutex. Tested by:rnoland Modified: head/sys/amd64/amd64/intr_machdep.c head/sys/amd64/amd64/io_apic.c head/sys/amd64/amd64/msi.c head/sys/amd64/include/intr_machdep.h head/sys/i386/i386/intr_machdep.c head/sys/i386/i386/io_apic.c head/sys/i386/i386/msi.c head/sys/i386/include/intr_machdep.h Modified: head/sys/amd64/amd64/intr_machdep.c == --- head/sys/amd64/amd64/intr_machdep.c Thu Jun 25 18:09:23 2009 (r194984) +++ head/sys/amd64/amd64/intr_machdep.c Thu Jun 25 18:13:46 2009 (r194985) @@ -51,7 +51,6 @@ #include #include #include -#include #include #include #include @@ -73,14 +72,12 @@ typedef void (*mask_fn)(void *); static int intrcnt_index; static struct intsrc *interrupt_sources[NUM_IO_INTS]; -static struct sx intr_table_lock; +static struct mtx intr_table_lock; static struct mtx intrcnt_lock; static STAILQ_HEAD(, pic) pics; #ifdef SMP static int assign_cpu; - -static voidintr_assign_next_cpu(struct intsrc *isrc); #endif static int intr_assign_cpu(void *arg, u_char cpu); @@ -114,14 +111,14 @@ intr_register_pic(struct pic *pic) { int error; - sx_xlock(&intr_table_lock); + mtx_lock(&intr_table_lock); if (intr_pic_registered(pic)) error = EBUSY; else { STAILQ_INSERT_TAIL(&pics, pic, pics); error = 0; } - sx_xunlock(&intr_table_lock); + mtx_unlock(&intr_table_lock); return (error); } @@ -145,16 +142,16 @@ intr_register_source(struct intsrc *isrc vector); if (error) return (error); - sx_xlock(&intr_table_lock); + mtx_lock(&intr_table_lock); if (interrupt_sources[vector] != NULL) { - sx_xunlock(&intr_table_lock); + mtx_unlock(&intr_table_lock); intr_event_destroy(isrc->is_event); return (EEXIST); } intrcnt_register(isrc); interrupt_sources[vector] = isrc; isrc->is_handlers = 0; - sx_xunlock(&intr_table_lock); + mtx_unlock(&intr_table_lock); return (0); } @@ -178,18 +175,14 @@ intr_add_handler(const char *name, int v error = intr_event_add_handler(isrc->is_event, name, filter, handler, arg, intr_priority(flags), flags, cookiep); if (error == 0) { - sx_xlock(&intr_table_lock); + mtx_lock(&intr_table_lock); intrcnt_updatename(isrc); isrc->is_handlers++; if (isrc->is_handlers == 1) { -#ifdef SMP - if (assign_cpu) - intr_assign_next_cpu(isrc); -#endif isrc->is_pic->pic_enable_intr(isrc); isrc->is_pic->pic_enable_source(isrc); } - sx_xunlock(&intr_table_lock); + mtx_unlock(&intr_table_lock); } return (error); } @@ -203,14 +196,14 @@ intr_remove_handler(void *cookie) isrc = intr_handler_source(cookie); error = intr_event_remove_handler(cookie); if (error == 0) { - sx_xlock(&intr_table_lock); + mtx_lock(&intr_table_lock); isrc->is_handlers--; if (isrc->is_handlers == 0) { isrc->is_pic->pic_disable_source(isrc, PIC_NO_EOI); isrc->is_pic->pic_disable_intr(isrc); } intrcnt_updatename(isrc); - sx_xunlock(&intr_table_lock); + mtx_unlock(&intr_table_lock); } return (error); } @@ -284,12 +277,12 @@ intr_resume(void) #ifndef DEV_ATPIC atpic_reset(); #endif - sx_xlock(&intr_table_lock); + mtx_lock(&intr_table_lock); STAILQ_FOREACH(pic, &pics,
svn commit: r194986 - head/sys/dev/drm
Author: rnoland Date: Thu Jun 25 18:27:08 2009 New Revision: 194986 URL: http://svn.freebsd.org/changeset/base/194986 Log: Some more cleanups for vblank code on Intel. The Intel 2d driver calls modeset before reinstalling the handler on a vt switch. This means that vblank status ends up getting cleared after it has been setup. Restore saved values for the pipestat registers rather than just wiping them out. MFC after:3 days Modified: head/sys/dev/drm/i915_drv.h head/sys/dev/drm/i915_irq.c Modified: head/sys/dev/drm/i915_drv.h == --- head/sys/dev/drm/i915_drv.h Thu Jun 25 18:13:46 2009(r194985) +++ head/sys/dev/drm/i915_drv.h Thu Jun 25 18:27:08 2009(r194986) @@ -129,7 +129,6 @@ typedef struct drm_i915_private { int page_flipping; wait_queue_head_t irq_queue; - atomic_t irq_received; /** Protects user_irq_refcount and irq_mask_reg */ DRM_SPINTYPE user_irq_lock; /** Refcount for i915_user_irq_get() versus i915_user_irq_put(). */ Modified: head/sys/dev/drm/i915_irq.c == --- head/sys/dev/drm/i915_irq.c Thu Jun 25 18:13:46 2009(r194985) +++ head/sys/dev/drm/i915_irq.c Thu Jun 25 18:27:08 2009(r194986) @@ -53,12 +53,6 @@ __FBSDID("$FreeBSD$"); #define I915_INTERRUPT_ENABLE_MASK (I915_INTERRUPT_ENABLE_FIX | \ I915_INTERRUPT_ENABLE_VAR) -#define I915_PIPE_VBLANK_STATUS (PIPE_START_VBLANK_INTERRUPT_STATUS |\ -PIPE_VBLANK_INTERRUPT_STATUS) - -#define I915_PIPE_VBLANK_ENABLE (PIPE_START_VBLANK_INTERRUPT_ENABLE |\ -PIPE_VBLANK_INTERRUPT_ENABLE) - #define DRM_I915_VBLANK_PIPE_ALL (DRM_I915_VBLANK_PIPE_A | \ DRM_I915_VBLANK_PIPE_B) @@ -154,7 +148,7 @@ u32 i915_get_vblank_counter(struct drm_d low_frame = pipe ? PIPEBFRAMEPIXEL : PIPEAFRAMEPIXEL; if (!i915_pipe_enabled(dev, pipe)) { - DRM_ERROR("trying to get vblank count for disabled pipe %d\n", pipe); + DRM_DEBUG("trying to get vblank count for disabled pipe %d\n", pipe); return 0; } @@ -183,7 +177,7 @@ u32 g45_get_vblank_counter(struct drm_de int reg = pipe ? PIPEB_FRMCOUNT_GM45 : PIPEA_FRMCOUNT_GM45; if (!i915_pipe_enabled(dev, pipe)) { - DRM_ERROR("trying to get vblank count for disabled pipe %d\n", pipe); + DRM_DEBUG("trying to get vblank count for disabled pipe %d\n", pipe); return 0; } @@ -200,12 +194,10 @@ irqreturn_t i915_driver_irq_handler(DRM_ u32 vblank_enable; int irq_received; - atomic_inc(&dev_priv->irq_received); - iir = I915_READ(IIR); if (IS_I965G(dev)) { - vblank_status = I915_START_VBLANK_INTERRUPT_STATUS; + vblank_status = PIPE_START_VBLANK_INTERRUPT_STATUS; vblank_enable = PIPE_START_VBLANK_INTERRUPT_ENABLE; } else { vblank_status = I915_VBLANK_INTERRUPT_STATUS; @@ -305,9 +297,12 @@ void i915_user_irq_get(struct drm_device { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + if (dev->irq_enabled == 0) + return; + DRM_DEBUG("\n"); DRM_SPINLOCK(&dev_priv->user_irq_lock); - if (dev->irq_enabled && (++dev_priv->user_irq_refcount == 1)) + if (++dev_priv->user_irq_refcount == 1) i915_enable_irq(dev_priv, I915_USER_INTERRUPT); DRM_SPINUNLOCK(&dev_priv->user_irq_lock); } @@ -316,12 +311,13 @@ void i915_user_irq_put(struct drm_device { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; + if (dev->irq_enabled == 0) + return; + DRM_SPINLOCK(&dev_priv->user_irq_lock); - if (dev->irq_enabled) { - KASSERT(dev_priv->user_irq_refcount > 0, ("invalid refcount")); - if (--dev_priv->user_irq_refcount == 0) - i915_disable_irq(dev_priv, I915_USER_INTERRUPT); - } + KASSERT(dev_priv->user_irq_refcount > 0, ("invalid refcount")); + if (--dev_priv->user_irq_refcount == 0) + i915_disable_irq(dev_priv, I915_USER_INTERRUPT); DRM_SPINUNLOCK(&dev_priv->user_irq_lock); } @@ -408,11 +404,8 @@ int i915_irq_wait(struct drm_device *dev int i915_enable_vblank(struct drm_device *dev, int pipe) { drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private; - int pipeconf_reg = (pipe == 0) ? PIPEACONF : PIPEBCONF; - u32 pipeconf; - pipeconf = I915_READ(pipeconf_reg); - if (!(pipeconf & PIPEACONF_ENABLE)) + if (!i915_pipe_enabled(dev, pipe))
svn commit: r194987 - head/sys/kern
Author: jhb Date: Thu Jun 25 18:35:19 2009 New Revision: 194987 URL: http://svn.freebsd.org/changeset/base/194987 Log: Return errors from intr_event_bind() to the caller of intr_set_affinity(). Specifically, if a non-root user attempts to bind an interrupt the request will now report failure with EPERM rather than silently failing with a successful return code. MFC after:1 week Modified: head/sys/kern/kern_intr.c Modified: head/sys/kern/kern_intr.c == --- head/sys/kern/kern_intr.c Thu Jun 25 18:27:08 2009(r194986) +++ head/sys/kern/kern_intr.c Thu Jun 25 18:35:19 2009(r194987) @@ -373,8 +373,7 @@ intr_setaffinity(int irq, void *m) ie = intr_lookup(irq); if (ie == NULL) return (ESRCH); - intr_event_bind(ie, cpu); - return (0); + return (intr_event_bind(ie, cpu)); } int ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194988 - head/sys/dev/ixgbe
Author: jfv Date: Thu Jun 25 18:40:27 2009 New Revision: 194988 URL: http://svn.freebsd.org/changeset/base/194988 Log: Decided to limit the interrupt bind to multiqueue config as done in igb. Modified: head/sys/dev/ixgbe/ixgbe.c Modified: head/sys/dev/ixgbe/ixgbe.c == --- head/sys/dev/ixgbe/ixgbe.c Thu Jun 25 18:35:19 2009(r194987) +++ head/sys/dev/ixgbe/ixgbe.c Thu Jun 25 18:40:27 2009(r194988) @@ -2156,7 +2156,8 @@ ixgbe_allocate_msix(struct adapter *adap ** Bind the msix vector, and thus the ** ring to the corresponding cpu. */ - bus_bind_intr(dev, txr->res, i); + if (adapter->num_queues > 1) + bus_bind_intr(dev, txr->res, i); TASK_INIT(&txr->tx_task, 0, ixgbe_handle_tx, txr); txr->tq = taskqueue_create_fast("ixgbe_txq", M_NOWAIT, @@ -2192,7 +2193,8 @@ ixgbe_allocate_msix(struct adapter *adap ** Bind the msix vector, and thus the ** ring to the corresponding cpu. */ - bus_bind_intr(dev, rxr->res, i); + if (adapter->num_queues > 1) + bus_bind_intr(dev, rxr->res, i); TASK_INIT(&rxr->rx_task, 0, ixgbe_handle_rx, rxr); rxr->tq = taskqueue_create_fast("ixgbe_rxq", M_NOWAIT, ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194989 - head/sys/sys
Author: jhb Date: Thu Jun 25 18:44:05 2009 New Revision: 194989 URL: http://svn.freebsd.org/changeset/base/194989 Log: Remove the d_spare2_t typedef. The d_spare2 field was replaced by d_mmap_single(). I considered adding a new round of padding for 8.0. However, since cdevsw already maintains a version field, new versions can be handled without requiring the need for explicit padding fields. Modified: head/sys/sys/conf.h Modified: head/sys/sys/conf.h == --- head/sys/sys/conf.h Thu Jun 25 18:40:27 2009(r194988) +++ head/sys/sys/conf.h Thu Jun 25 18:44:05 2009(r194989) @@ -141,8 +141,6 @@ typedef int d_mmap_single_t(struct cdev vm_size_t size, struct vm_object **object, int nprot); typedef void d_purge_t(struct cdev *dev); -typedef int d_spare2_t(struct cdev *dev); - typedef int dumper_t( void *_priv,/* Private to the driver. */ void *_virtual, /* Virtual (mapped) address. */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194990 - in head/sys: cam/scsi dev/iscsi/initiator dev/sound/midi dev/speaker fs/coda fs/pseudofs net sys vm
Author: kib Date: Thu Jun 25 18:46:30 2009 New Revision: 194990 URL: http://svn.freebsd.org/changeset/base/194990 Log: Change the type of uio_resid member of struct uio from int to ssize_t. Note that this does not actually enable full-range i/o requests for 64 architectures, and is done now to update KBI only. Tested by:pho Reviewed by: jhb, bde (as part of the review of the bigger patch) Modified: head/sys/cam/scsi/scsi_target.c head/sys/dev/iscsi/initiator/isc_soc.c head/sys/dev/sound/midi/midi.c head/sys/dev/sound/midi/sequencer.c head/sys/dev/speaker/spkr.c head/sys/fs/coda/coda_psdev.c head/sys/fs/coda/coda_vnops.c head/sys/fs/pseudofs/pseudofs_vnops.c head/sys/net/if_tap.c head/sys/net/if_tun.c head/sys/sys/uio.h head/sys/vm/vnode_pager.c Modified: head/sys/cam/scsi/scsi_target.c == --- head/sys/cam/scsi/scsi_target.c Thu Jun 25 18:44:05 2009 (r194989) +++ head/sys/cam/scsi/scsi_target.c Thu Jun 25 18:46:30 2009 (r194990) @@ -552,7 +552,7 @@ targwrite(struct cdev *dev, struct uio * softc = (struct targ_softc *)dev->si_drv1; write_len = error = 0; CAM_DEBUG(softc->path, CAM_DEBUG_PERIPH, - ("write - uio_resid %d\n", uio->uio_resid)); + ("write - uio_resid %zd\n", uio->uio_resid)); while (uio->uio_resid >= sizeof(user_ccb) && error == 0) { union ccb *ccb; Modified: head/sys/dev/iscsi/initiator/isc_soc.c == --- head/sys/dev/iscsi/initiator/isc_soc.c Thu Jun 25 18:44:05 2009 (r194989) +++ head/sys/dev/iscsi/initiator/isc_soc.c Thu Jun 25 18:46:30 2009 (r194990) @@ -322,12 +322,12 @@ so_getbhs(isc_session_t *sp) error = soreceive(sp->soc, NULL, uio, 0, 0, &flags); if(error) - debug(2, "error=%d so_error=%d uio->uio_resid=%d iov.iov_len=%zd", + debug(2, "error=%d so_error=%d uio->uio_resid=%zd iov.iov_len=%zd", error, sp->soc->so_error, uio->uio_resid, iov->iov_len); if(!error && (uio->uio_resid > 0)) { error = EPIPE; // was EAGAIN - debug(2, "error=%d so_error=%d uio->uio_resid=%d iov.iov_len=%zd so_state=%x", + debug(2, "error=%d so_error=%d uio->uio_resid=%zd iov.iov_len=%zd so_state=%x", error, sp->soc->so_error, uio->uio_resid, iov->iov_len, sp->soc->so_state); } @@ -442,7 +442,7 @@ so_recv(isc_session_t *sp, pduq_t *pq) } mp = NULL; - sdebug(4, "uio_resid=0x%x itt=0x%x bp=%p bo=%x len=%x/%x", + sdebug(4, "uio_resid=0x%zx itt=0x%x bp=%p bo=%x len=%x/%x", uio->uio_resid, ntohl(pq->pdu.ipdu.bhs.itt), csio->data_ptr, ntohl(rcmd->bo), ntohl(cmd->edtlen), pq->pdu.ds_len); Modified: head/sys/dev/sound/midi/midi.c == --- head/sys/dev/sound/midi/midi.c Thu Jun 25 18:44:05 2009 (r194989) +++ head/sys/dev/sound/midi/midi.c Thu Jun 25 18:46:30 2009 (r194990) @@ -852,7 +852,7 @@ midi_write(struct cdev *i_dev, struct ui used = MIN(MIDIQ_AVAIL(m->outq), uio->uio_resid); used = MIN(used, MIDI_WSIZE); - MIDI_DEBUG(5, printf("midiout: resid %d len %jd avail %jd\n", + MIDI_DEBUG(5, printf("midiout: resid %zd len %jd avail %jd\n", uio->uio_resid, (intmax_t)MIDIQ_LEN(m->outq), (intmax_t)MIDIQ_AVAIL(m->outq))); Modified: head/sys/dev/sound/midi/sequencer.c == --- head/sys/dev/sound/midi/sequencer.c Thu Jun 25 18:44:05 2009 (r194989) +++ head/sys/dev/sound/midi/sequencer.c Thu Jun 25 18:46:30 2009 (r194990) @@ -878,7 +878,7 @@ seq_read(struct cdev *i_dev, struct uio if (scp == NULL) return ENXIO; - SEQ_DEBUG(7, printf("seq_read: unit %d, resid %d.\n", + SEQ_DEBUG(7, printf("seq_read: unit %d, resid %zd.\n", scp->unit, uio->uio_resid)); mtx_lock(&scp->seq_lock); @@ -936,7 +936,7 @@ seq_read(struct cdev *i_dev, struct uio retval = 0; err1: mtx_unlock(&scp->seq_lock); - SEQ_DEBUG(6, printf("seq_read: ret %d, resid %d.\n", + SEQ_DEBUG(6, printf("seq_read: ret %d, resid %zd.\n", retval, uio->uio_resid)); return retval; @@ -950,7 +950,7 @@ seq_write(struct cdev *i_dev, struct uio int retval; int used; - SEQ_DEBUG(7, printf("seq_write: unit %d, resid %d.\n", + SEQ_DEBUG(7, printf("se
svn commit: r194991 - in vendor/bind9/dist: . bin/check bin/dnssec doc/arm lib/bind9 lib/dns lib/dns/include/dns
Author: dougb Date: Thu Jun 25 18:50:46 2009 New Revision: 194991 URL: http://svn.freebsd.org/changeset/base/194991 Log: Vendor import of BIND 9.6.1 Added: vendor/bind9/dist/KNOWN-DEFECTS Modified: vendor/bind9/dist/CHANGES vendor/bind9/dist/bin/check/named-checkzone.c vendor/bind9/dist/bin/dnssec/dnssec-signzone.8 vendor/bind9/dist/bin/dnssec/dnssec-signzone.c vendor/bind9/dist/bin/dnssec/dnssec-signzone.docbook vendor/bind9/dist/bin/dnssec/dnssec-signzone.html vendor/bind9/dist/bin/dnssec/dnssectool.c vendor/bind9/dist/doc/arm/Bv9ARM-book.xml vendor/bind9/dist/doc/arm/Bv9ARM.ch06.html vendor/bind9/dist/doc/arm/Bv9ARM.ch07.html vendor/bind9/dist/doc/arm/Bv9ARM.ch08.html vendor/bind9/dist/doc/arm/Bv9ARM.ch09.html vendor/bind9/dist/doc/arm/Bv9ARM.html vendor/bind9/dist/doc/arm/man.dig.html vendor/bind9/dist/doc/arm/man.dnssec-dsfromkey.html vendor/bind9/dist/doc/arm/man.dnssec-keyfromlabel.html vendor/bind9/dist/doc/arm/man.dnssec-keygen.html vendor/bind9/dist/doc/arm/man.dnssec-signzone.html vendor/bind9/dist/doc/arm/man.host.html vendor/bind9/dist/doc/arm/man.named-checkconf.html vendor/bind9/dist/doc/arm/man.named-checkzone.html vendor/bind9/dist/doc/arm/man.named.html vendor/bind9/dist/doc/arm/man.nsupdate.html vendor/bind9/dist/doc/arm/man.rndc-confgen.html vendor/bind9/dist/doc/arm/man.rndc.conf.html vendor/bind9/dist/doc/arm/man.rndc.html vendor/bind9/dist/lib/bind9/api vendor/bind9/dist/lib/bind9/check.c vendor/bind9/dist/lib/dns/api vendor/bind9/dist/lib/dns/dnssec.c vendor/bind9/dist/lib/dns/include/dns/dnssec.h vendor/bind9/dist/lib/dns/include/dns/keyvalues.h vendor/bind9/dist/lib/dns/nsec3.c vendor/bind9/dist/lib/dns/resolver.c vendor/bind9/dist/version Modified: vendor/bind9/dist/CHANGES == --- vendor/bind9/dist/CHANGES Thu Jun 25 18:46:30 2009(r194990) +++ vendor/bind9/dist/CHANGES Thu Jun 25 18:50:46 2009(r194991) @@ -1,4 +1,23 @@ + --- 9.6.1 released --- + +2607. [bug] named could incorrectly delete NSEC3 records for + empty nodes when processing a update request. + [RT #19749] + +2606. [bug] "delegation-only" was not being accepted in + delegation-only type zones. [RT #19717] + +2605. [bug] Accept DS responses from delegation only zones. + [RT # 19296] + +2603. [port] win32: handle .exe extension of named-checkzone and + named-comilezone argv[0] names under windows. + [RT #19767] + +2602. [port] win32: fix debugging command line build of libisccfg. + [RT #19767] + --- 9.6.1rc1 released --- 2599. [bug] Address rapid memory growth when validation fails. Added: vendor/bind9/dist/KNOWN-DEFECTS == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/bind9/dist/KNOWN-DEFECTS Thu Jun 25 18:50:46 2009 (r194991) @@ -0,0 +1,15 @@ +dnssec-signzone was designed so that it could sign a zone partially, using +only a subset of the DNSSEC keys needed to produce a fully-signed zone. +This permits a zone administrator, for example, to sign a zone with one +key on one machine, move the resulting partially-signed zone to a second +machine, and sign it again with a second key. + +An unfortunate side-effect of this flexibility is that dnssec-signzone +does not check to make sure it's signing a zone with any valid keys at +all. An attempt to sign a zone without any keys will appear to succeed, +producing a "signed" zone with no signatures. There is no warning issued +when a zone is not signed. + +This will be corrected in a future release. In the meantime, ISC +recommends examining the output of dnssec-signzone to confirm that +the zone is properly signed by all keys before using it. Modified: vendor/bind9/dist/bin/check/named-checkzone.c == --- vendor/bind9/dist/bin/check/named-checkzone.c Thu Jun 25 18:46:30 2009(r194990) +++ vendor/bind9/dist/bin/check/named-checkzone.c Thu Jun 25 18:50:46 2009(r194991) @@ -15,7 +15,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: named-checkzone.c,v 1.51.34.2 2009/02/16 23:47:15 tbox Exp $ */ +/* $Id: named-checkzone.c,v 1.51.34.3 2009/05/29 02:17:43 marka Exp $ */ /*! \file */ @@ -123,9 +123,13 @@ main(int argc, char **argv) { */ if (strncmp(prog_name, "lt-", 3) == 0) prog_name += 3; - if (strcmp(prog_name, "named-checkzone") == 0) + +#define PROGCMP(X) \ + (strcasecmp(prog_name, X) == 0 || strcasecmp(prog_name, X ".exe") == 0) + + if (PROGCMP("named-checkzone")) progmode
svn commit: r194992 - vendor/bind9/9.6.1
Author: dougb Date: Thu Jun 25 18:51:35 2009 New Revision: 194992 URL: http://svn.freebsd.org/changeset/base/194992 Log: Tag the 9.6.1 release Added: vendor/bind9/9.6.1/ - copied from r194991, vendor/bind9/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194985 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include
On Thursday 25 June 2009 2:13:46 pm John Baldwin wrote: > Author: jhb > Date: Thu Jun 25 18:13:46 2009 > New Revision: 194985 > URL: http://svn.freebsd.org/changeset/base/194985 > > Log: > - Restore the behavior of pre-allocating IDT vectors for MSI interrupts. > This is mostly important for the multiple MSI message case where the > IDT vectors for the entire group need to be allocated together. This > also restores the assumptions made by the PCI bus code that it could > invoke PCIB_MAP_MSI() once MSI vectors were allocated. > - To avoid whiplash with CPU assignments, change the way that CPUs are > assigned to interrupt sources on activation. Instead of assigning the > CPU via pic_assign_cpu() before calling enable_intr(), allow the > different interrupt source drivers to ask the MD interrupt code which > CPU to use when they allocate an IDT vector. I/O APIC interrupt pins > do this in their pic_enable_intr() routines giving the same behavior as > before. MSI sources do it when the IDT vectors are allocated during > msi_alloc() and msix_alloc(). > - Change the intr_table_lock from an sx lock to a mutex. Incidentally, this fixes the remaining issues Robert was having with VT switch with Intel DRM drivers. It is still not possible to migrate multiple MSI interrupts, but I intend to work on that next. -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194993 - head/sys/kern
Author: kib Date: Thu Jun 25 18:54:56 2009 New Revision: 194993 URL: http://svn.freebsd.org/changeset/base/194993 Log: In lf_iteratelocks_vnode, increment state->ls_threads around iterating of the vnode advisory lock list. This prevents deallocation of state while inside the loop. Reported and tested by: pho MFC after:2 weeks Modified: head/sys/kern/kern_lockf.c Modified: head/sys/kern/kern_lockf.c == --- head/sys/kern/kern_lockf.c Thu Jun 25 18:51:35 2009(r194992) +++ head/sys/kern/kern_lockf.c Thu Jun 25 18:54:56 2009(r194993) @@ -1937,9 +1937,14 @@ lf_iteratelocks_vnode(struct vnode *vp, * make sure it doesn't go away before we are finished. */ STAILQ_INIT(&locks); + VI_LOCK(vp); ls = vp->v_lockf; - if (!ls) + if (!ls) { + VI_UNLOCK(vp); return (0); + } + ls->ls_threads++; + VI_UNLOCK(vp); sx_xlock(&ls->ls_lock); LIST_FOREACH(lf, &ls->ls_active, lf_link) { @@ -1960,6 +1965,10 @@ lf_iteratelocks_vnode(struct vnode *vp, STAILQ_INSERT_TAIL(&locks, ldesc, link); } sx_xunlock(&ls->ls_lock); + VI_LOCK(vp); + ls->ls_threads--; + wakeup(ls); + VI_UNLOCK(vp); /* * Call the iterator function for each lock in turn. If the ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194995 - in head/contrib/bind9: . bin/check bin/dnssec doc/arm lib/bind9 lib/dns lib/dns/include/dns
Author: dougb Date: Thu Jun 25 19:16:29 2009 New Revision: 194995 URL: http://svn.freebsd.org/changeset/base/194995 Log: Update to the final release version of BIND 9.6.1. It has the following changes from the 9.6.1rc1 version. The first 2 only affect DNSSEC. named could incorrectly delete NSEC3 records for empty nodes when processing a update request. Accept DS responses from delegation only zones. "delegation-only" was not being accepted in delegation-only type zones. Added: head/contrib/bind9/KNOWN-DEFECTS - copied unchanged from r194992, vendor/bind9/dist/KNOWN-DEFECTS Modified: head/contrib/bind9/ (props changed) head/contrib/bind9/CHANGES head/contrib/bind9/bin/check/named-checkzone.c head/contrib/bind9/bin/dnssec/dnssec-signzone.8 head/contrib/bind9/bin/dnssec/dnssec-signzone.c head/contrib/bind9/bin/dnssec/dnssec-signzone.docbook head/contrib/bind9/bin/dnssec/dnssec-signzone.html head/contrib/bind9/bin/dnssec/dnssectool.c head/contrib/bind9/doc/arm/Bv9ARM-book.xml head/contrib/bind9/doc/arm/Bv9ARM.ch06.html head/contrib/bind9/doc/arm/Bv9ARM.ch07.html head/contrib/bind9/doc/arm/Bv9ARM.ch08.html head/contrib/bind9/doc/arm/Bv9ARM.ch09.html head/contrib/bind9/doc/arm/Bv9ARM.html head/contrib/bind9/doc/arm/man.dig.html head/contrib/bind9/doc/arm/man.dnssec-dsfromkey.html head/contrib/bind9/doc/arm/man.dnssec-keyfromlabel.html head/contrib/bind9/doc/arm/man.dnssec-keygen.html head/contrib/bind9/doc/arm/man.dnssec-signzone.html head/contrib/bind9/doc/arm/man.host.html head/contrib/bind9/doc/arm/man.named-checkconf.html head/contrib/bind9/doc/arm/man.named-checkzone.html head/contrib/bind9/doc/arm/man.named.html head/contrib/bind9/doc/arm/man.nsupdate.html head/contrib/bind9/doc/arm/man.rndc-confgen.html head/contrib/bind9/doc/arm/man.rndc.conf.html head/contrib/bind9/doc/arm/man.rndc.html head/contrib/bind9/lib/bind9/api head/contrib/bind9/lib/bind9/check.c head/contrib/bind9/lib/dns/api head/contrib/bind9/lib/dns/dnssec.c head/contrib/bind9/lib/dns/include/dns/dnssec.h head/contrib/bind9/lib/dns/include/dns/keyvalues.h head/contrib/bind9/lib/dns/nsec3.c head/contrib/bind9/lib/dns/resolver.c head/contrib/bind9/version Modified: head/contrib/bind9/CHANGES == --- head/contrib/bind9/CHANGES Thu Jun 25 19:06:08 2009(r194994) +++ head/contrib/bind9/CHANGES Thu Jun 25 19:16:29 2009(r194995) @@ -1,4 +1,23 @@ + --- 9.6.1 released --- + +2607. [bug] named could incorrectly delete NSEC3 records for + empty nodes when processing a update request. + [RT #19749] + +2606. [bug] "delegation-only" was not being accepted in + delegation-only type zones. [RT #19717] + +2605. [bug] Accept DS responses from delegation only zones. + [RT # 19296] + +2603. [port] win32: handle .exe extension of named-checkzone and + named-comilezone argv[0] names under windows. + [RT #19767] + +2602. [port] win32: fix debugging command line build of libisccfg. + [RT #19767] + --- 9.6.1rc1 released --- 2599. [bug] Address rapid memory growth when validation fails. Copied: head/contrib/bind9/KNOWN-DEFECTS (from r194992, vendor/bind9/dist/KNOWN-DEFECTS) == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/bind9/KNOWN-DEFECTSThu Jun 25 19:16:29 2009 (r194995, copy of r194992, vendor/bind9/dist/KNOWN-DEFECTS) @@ -0,0 +1,15 @@ +dnssec-signzone was designed so that it could sign a zone partially, using +only a subset of the DNSSEC keys needed to produce a fully-signed zone. +This permits a zone administrator, for example, to sign a zone with one +key on one machine, move the resulting partially-signed zone to a second +machine, and sign it again with a second key. + +An unfortunate side-effect of this flexibility is that dnssec-signzone +does not check to make sure it's signing a zone with any valid keys at +all. An attempt to sign a zone without any keys will appear to succeed, +producing a "signed" zone with no signatures. There is no warning issued +when a zone is not signed. + +This will be corrected in a future release. In the meantime, ISC +recommends examining the output of dnssec-signzone to confirm that +the zone is properly signed by all keys before using it. Modified: head/contrib/bind9/bin/check/named-checkzone.c == --- head/contrib/bind9/bin/check/named-checkzone.c Thu Jun 25 19:06:08 2009(r194994) +++ head/contrib/bind9/bin/check/named-check
svn commit: r194996 - head/sys/dev/drm
Author: rnoland Date: Thu Jun 25 19:23:25 2009 New Revision: 194996 URL: http://svn.freebsd.org/changeset/base/194996 Log: We shouldn't need to drop and reaquire the lock here. MFC after:3 days Modified: head/sys/dev/drm/i915_dma.c Modified: head/sys/dev/drm/i915_dma.c == --- head/sys/dev/drm/i915_dma.c Thu Jun 25 19:16:29 2009(r194995) +++ head/sys/dev/drm/i915_dma.c Thu Jun 25 19:23:25 2009(r194996) @@ -644,18 +644,17 @@ static int i915_batchbuffer(struct drm_d return -EFAULT; } } - DRM_LOCK(); ret = i915_dispatch_batchbuffer(dev, batch); - if (sarea_priv) - sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); - - DRM_UNLOCK(); if (batch->num_cliprects) vsunlock(batch->cliprects, cliplen); + DRM_LOCK(); + if (sarea_priv) + sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv); + return ret; } @@ -697,10 +696,9 @@ static int i915_cmdbuffer(struct drm_dev return -EFAULT; } } - DRM_LOCK(); ret = i915_dispatch_cmdbuffer(dev, cmdbuf); - DRM_UNLOCK(); + if (cmdbuf->num_cliprects) { vsunlock(cmdbuf->buf, cmdbuf->sz); vsunlock(cmdbuf->cliprects, cliplen); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r194997 - head/sys/sun4v/conf
Author: ed Date: Thu Jun 25 19:26:23 2009 New Revision: 194997 URL: http://svn.freebsd.org/changeset/base/194997 Log: Remove COMPAT_43 from sun4v's GENERIC. I think it's very unlikely that we have binaries for sun4v that use features provided by COMPAT_43. Remove it from GENERIC. Approved by: kib Modified: head/sys/sun4v/conf/GENERIC Modified: head/sys/sun4v/conf/GENERIC == --- head/sys/sun4v/conf/GENERIC Thu Jun 25 19:23:25 2009(r194996) +++ head/sys/sun4v/conf/GENERIC Thu Jun 25 19:26:23 2009(r194997) @@ -51,7 +51,6 @@ options PROCFS # Process filesystem ( optionsPSEUDOFS# Pseudo-filesystem framework optionsGEOM_PART_GPT # GUID Partition Tables. optionsGEOM_LABEL # Provides labelization -optionsCOMPAT_43 # Compatible with BSD 4.3 (sgtty) optionsCOMPAT_43TTY# BSD 4.3 TTY compat (sgtty) optionsSCSI_DELAY=5000 # Delay (in ms) before probing SCSI optionsKTRACE # ktrace(1) support ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194985 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include
John Baldwin wrote: Author: jhb Date: Thu Jun 25 18:13:46 2009 New Revision: 194985 URL: http://svn.freebsd.org/changeset/base/194985 Log: - Restore the behavior of pre-allocating IDT vectors for MSI interrupts. This is mostly important for the multiple MSI message case where the IDT vectors for the entire group need to be allocated together. This also restores the assumptions made by the PCI bus code that it could invoke PCIB_MAP_MSI() once MSI vectors were allocated. - To avoid whiplash with CPU assignments, change the way that CPUs are assigned to interrupt sources on activation. Instead of assigning the CPU via pic_assign_cpu() before calling enable_intr(), allow the different interrupt source drivers to ask the MD interrupt code which CPU to use when they allocate an IDT vector. I/O APIC interrupt pins do this in their pic_enable_intr() routines giving the same behavior as before. MSI sources do it when the IDT vectors are allocated during msi_alloc() and msix_alloc(). - Change the intr_table_lock from an sx lock to a mutex. Tested by: rnoland It seems also fixed previously not working multi-vector MSI mode of AHCI on my less lucky laptop. Thanks. -- Alexander Motin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195000 - head/contrib/bind9/lib/isc/ia64/include/isc
Author: dougb Date: Thu Jun 25 19:52:45 2009 New Revision: 195000 URL: http://svn.freebsd.org/changeset/base/195000 Log: This is the solution that ISC committed after 9.6.1-release for the gcc warning issue. It should be included in the next upstream release. Modified: head/contrib/bind9/lib/isc/ia64/include/isc/atomic.h Modified: head/contrib/bind9/lib/isc/ia64/include/isc/atomic.h == --- head/contrib/bind9/lib/isc/ia64/include/isc/atomic.hThu Jun 25 19:39:16 2009(r194999) +++ head/contrib/bind9/lib/isc/ia64/include/isc/atomic.hThu Jun 25 19:52:45 2009(r195000) @@ -31,6 +31,9 @@ * (e.g., 1 and -1)? */ static inline isc_int32_t +#ifdef __GNUC__ +__attribute__ ((unused)) +#endif isc_atomic_xadd(isc_int32_t *p, isc_int32_t val) { isc_int32_t prev, swapped; @@ -54,6 +57,9 @@ isc_atomic_xadd(isc_int32_t *p, isc_int3 * This routine atomically stores the value 'val' in 'p'. */ static inline void +#ifdef __GNUC__ +__attribute__ ((unused)) +#endif isc_atomic_store(isc_int32_t *p, isc_int32_t val) { __asm__ volatile( @@ -70,6 +76,9 @@ isc_atomic_store(isc_int32_t *p, isc_int * case. */ static inline isc_int32_t +#ifdef __GNUC__ +__attribute__ ((unused)) +#endif isc_atomic_cmpxchg(isc_int32_t *p, isc_int32_t cmpval, isc_int32_t val) { isc_int32_t ret; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195001 - head/share/doc/bind9
Author: dougb Date: Thu Jun 25 20:09:53 2009 New Revision: 195001 URL: http://svn.freebsd.org/changeset/base/195001 Log: Add the KNOWN-DEFECTS file back in for the 9.6.1 release. Modified: head/share/doc/bind9/Makefile Modified: head/share/doc/bind9/Makefile == --- head/share/doc/bind9/Makefile Thu Jun 25 19:52:45 2009 (r195000) +++ head/share/doc/bind9/Makefile Thu Jun 25 20:09:53 2009 (r195001) @@ -8,7 +8,7 @@ SRCDIR= ${BIND_DIR}/doc NO_OBJ= FILESGROUPS= TOP ARM MISC -TOP= CHANGES COPYRIGHT FAQ NSEC3-NOTES README \ +TOP= CHANGES COPYRIGHT FAQ KNOWN-DEFECTS NSEC3-NOTES README \ README.idnkit README.pkcs11 TOPDIR=${DOCDIR}/bind9 ARM= Bv9ARM.ch01.html Bv9ARM.ch02.html Bv9ARM.ch03.html \ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195002 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include
Author: jhb Date: Thu Jun 25 20:35:46 2009 New Revision: 195002 URL: http://svn.freebsd.org/changeset/base/195002 Log: Fix kernels compiled without SMP support. Make intr_next_cpu() available for UP kernels but as a stub that always returns the single CPU's local APIC ID. Reported by: kib Modified: head/sys/amd64/amd64/intr_machdep.c head/sys/amd64/include/intr_machdep.h head/sys/i386/i386/intr_machdep.c head/sys/i386/include/intr_machdep.h Modified: head/sys/amd64/amd64/intr_machdep.c == --- head/sys/amd64/amd64/intr_machdep.c Thu Jun 25 20:09:53 2009 (r195001) +++ head/sys/amd64/amd64/intr_machdep.c Thu Jun 25 20:35:46 2009 (r195002) @@ -518,4 +518,14 @@ intr_shuffle_irqs(void *arg __unused) } SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs, NULL); +#else +/* + * Always route interrupts to the current processor in the UP case. + */ +u_int +intr_next_cpu(void) +{ + + return (PCPU_GET(apic_id)); +} #endif Modified: head/sys/amd64/include/intr_machdep.h == --- head/sys/amd64/include/intr_machdep.h Thu Jun 25 20:09:53 2009 (r195001) +++ head/sys/amd64/include/intr_machdep.h Thu Jun 25 20:35:46 2009 (r195002) @@ -152,9 +152,7 @@ int intr_bind(u_int vector, u_char cpu); intintr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); -#ifdef SMP u_int intr_next_cpu(void); -#endif struct intsrc *intr_lookup_source(int vector); intintr_register_pic(struct pic *pic); intintr_register_source(struct intsrc *isrc); Modified: head/sys/i386/i386/intr_machdep.c == --- head/sys/i386/i386/intr_machdep.c Thu Jun 25 20:09:53 2009 (r195001) +++ head/sys/i386/i386/intr_machdep.c Thu Jun 25 20:35:46 2009 (r195002) @@ -491,4 +491,14 @@ intr_shuffle_irqs(void *arg __unused) } SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs, NULL); +#else +/* + * Always route interrupts to the current processor in the UP case. + */ +u_int +intr_next_cpu(void) +{ + + return (PCPU_GET(apic_id)); +} #endif Modified: head/sys/i386/include/intr_machdep.h == --- head/sys/i386/include/intr_machdep.hThu Jun 25 20:09:53 2009 (r195001) +++ head/sys/i386/include/intr_machdep.hThu Jun 25 20:35:46 2009 (r195002) @@ -139,9 +139,7 @@ int intr_bind(u_int vector, u_char cpu); intintr_config_intr(int vector, enum intr_trigger trig, enum intr_polarity pol); void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame); -#ifdef SMP u_int intr_next_cpu(void); -#endif struct intsrc *intr_lookup_source(int vector); intintr_register_pic(struct pic *pic); intintr_register_source(struct intsrc *isrc); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195003 - head/sys/ufs/ufs
Author: snb Date: Thu Jun 25 20:40:13 2009 New Revision: 195003 URL: http://svn.freebsd.org/changeset/base/195003 Log: Fix a bug reported by pho@ where one can induce a panic by decreasing vfs.ufs.dirhash_maxmem below the current amount of memory used by dirhash. When ufsdirhash_build() is called with the memory in use greater than dirhash_maxmem, it attempts to free up memory by calling ufsdirhash_recycle(). If successful in freeing enough memory, ufsdirhash_recycle() leaves the dirhash list locked. But at this point in ufsdirhash_build(), the list is not explicitly unlocked after the call(s) to ufsdirhash_recycle(). When we next attempt to lock the dirhash list, we will get a "panic: _mtx_lock_sleep: recursed on non-recursive mutex dirhash list". Tested by:pho Approved by: dwmalone (mentor) MFC after:3 weeks Modified: head/sys/ufs/ufs/ufs_dirhash.c Modified: head/sys/ufs/ufs/ufs_dirhash.c == --- head/sys/ufs/ufs/ufs_dirhash.c Thu Jun 25 20:35:46 2009 (r195002) +++ head/sys/ufs/ufs/ufs_dirhash.c Thu Jun 25 20:40:13 2009 (r195003) @@ -348,9 +348,12 @@ ufsdirhash_build(struct inode *ip) int dirblocks, i, j, memreqd, nblocks, narrays, nslots, slot; /* Take care of a decreased sysctl value. */ - while (ufs_dirhashmem > ufs_dirhashmaxmem) + while (ufs_dirhashmem > ufs_dirhashmaxmem) { if (ufsdirhash_recycle(0) != 0) return (-1); + /* Recycled enough memory, so unlock the list. */ + DIRHASHLIST_UNLOCK(); + } /* Check if we can/should use dirhash. */ if (ip->i_size < ufs_mindirhashsize || OFSFMT(ip->i_vnode) || ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195004 - head/lib/libc/posix1e
Author: trasz Date: Thu Jun 25 20:57:53 2009 New Revision: 195004 URL: http://svn.freebsd.org/changeset/base/195004 Log: Fix acl_set_fd(3) and acl_get_fd(3) for cases where the kernel doesn't know anything about _PC_ACL_NFS4. Modified: head/lib/libc/posix1e/acl_get.c head/lib/libc/posix1e/acl_set.c Modified: head/lib/libc/posix1e/acl_get.c == --- head/lib/libc/posix1e/acl_get.c Thu Jun 25 20:40:13 2009 (r195003) +++ head/lib/libc/posix1e/acl_get.c Thu Jun 25 20:57:53 2009 (r195004) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include +#include #include #include #include @@ -102,7 +103,7 @@ acl_get_link_np(const char *path_p, acl_ acl_t acl_get_fd(int fd) { - if (fpathconf(fd, _PC_ACL_NFS4)) + if (fpathconf(fd, _PC_ACL_NFS4) == 1) return (acl_get_fd_np(fd, ACL_TYPE_NFS4)); return (acl_get_fd_np(fd, ACL_TYPE_ACCESS)); Modified: head/lib/libc/posix1e/acl_set.c == --- head/lib/libc/posix1e/acl_set.c Thu Jun 25 20:40:13 2009 (r195003) +++ head/lib/libc/posix1e/acl_set.c Thu Jun 25 20:57:53 2009 (r195004) @@ -108,7 +108,7 @@ int acl_set_fd(int fd, acl_t acl) { - if (fpathconf(fd, _PC_ACL_NFS4)) + if (fpathconf(fd, _PC_ACL_NFS4) == 1) return (acl_set_fd_np(fd, acl, ACL_TYPE_NFS4)); return (acl_set_fd_np(fd, acl, ACL_TYPE_ACCESS)); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195005 - head/sys/dev/hwpmc
Author: attilio Date: Thu Jun 25 20:59:37 2009 New Revision: 195005 URL: http://svn.freebsd.org/changeset/base/195005 Log: Fix a LOR between pmc_sx and proctree/allproc when creating a new thread for the pmclog. Reported by: Ryan Stone Tested by:Ryan Stone Sponsored by: Sandvine Incorporated Modified: head/sys/dev/hwpmc/hwpmc_logging.c head/sys/dev/hwpmc/hwpmc_mod.c Modified: head/sys/dev/hwpmc/hwpmc_logging.c == --- head/sys/dev/hwpmc/hwpmc_logging.c Thu Jun 25 20:57:53 2009 (r195004) +++ head/sys/dev/hwpmc/hwpmc_logging.c Thu Jun 25 20:59:37 2009 (r195005) @@ -44,6 +44,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -552,6 +553,12 @@ pmclog_configure_log(struct pmc_mdep *md int error; struct proc *p; + /* +* As long as it is possible to get a LOR between pmc_sx lock and +* proctree/allproc sx locks used for adding a new process, assure +* the former is not held here. +*/ + sx_assert(&pmc_sx, SA_UNLOCKED); PMCDBG(LOG,CFG,1, "config po=%p logfd=%d", po, logfd); p = po->po_owner; Modified: head/sys/dev/hwpmc/hwpmc_mod.c == --- head/sys/dev/hwpmc/hwpmc_mod.c Thu Jun 25 20:57:53 2009 (r195004) +++ head/sys/dev/hwpmc/hwpmc_mod.c Thu Jun 25 20:59:37 2009 (r195005) @@ -2663,7 +2663,7 @@ static const char *pmc_op_to_name[] = { static int pmc_syscall_handler(struct thread *td, void *syscall_args) { - int error, is_sx_downgraded, op; + int error, is_sx_downgraded, is_sx_locked, op; struct pmc_syscall_args *c; void *arg; @@ -2672,6 +2672,7 @@ pmc_syscall_handler(struct thread *td, v DROP_GIANT(); is_sx_downgraded = 0; + is_sx_locked = 1; c = (struct pmc_syscall_args *) syscall_args; @@ -2720,9 +2721,11 @@ pmc_syscall_handler(struct thread *td, v * a log file configured, flush its buffers and * de-configure it. */ - if (cl.pm_logfd >= 0) + if (cl.pm_logfd >= 0) { + sx_xunlock(&pmc_sx); + is_sx_locked = 0; error = pmclog_configure_log(md, po, cl.pm_logfd); - else if (po->po_flags & PMC_PO_OWNS_LOGFILE) { + } else if (po->po_flags & PMC_PO_OWNS_LOGFILE) { pmclog_process_closelog(po); error = pmclog_flush(po); if (error == 0) { @@ -3772,10 +3775,12 @@ pmc_syscall_handler(struct thread *td, v break; } - if (is_sx_downgraded) - sx_sunlock(&pmc_sx); - else - sx_xunlock(&pmc_sx); + if (is_sx_locked != 0) { + if (is_sx_downgraded) + sx_sunlock(&pmc_sx); + else + sx_xunlock(&pmc_sx); + } if (error) atomic_add_int(&pmc_stats.pm_syscall_errors, 1); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194985 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include
On Thursday 25 June 2009 3:44:18 pm Alexander Motin wrote: > John Baldwin wrote: > > Author: jhb > > Date: Thu Jun 25 18:13:46 2009 > > New Revision: 194985 > > URL: http://svn.freebsd.org/changeset/base/194985 > > > > Log: > > - Restore the behavior of pre-allocating IDT vectors for MSI interrupts. > > This is mostly important for the multiple MSI message case where the > > IDT vectors for the entire group need to be allocated together. This > > also restores the assumptions made by the PCI bus code that it could > > invoke PCIB_MAP_MSI() once MSI vectors were allocated. > > - To avoid whiplash with CPU assignments, change the way that CPUs are > > assigned to interrupt sources on activation. Instead of assigning the > > CPU via pic_assign_cpu() before calling enable_intr(), allow the > > different interrupt source drivers to ask the MD interrupt code which > > CPU to use when they allocate an IDT vector. I/O APIC interrupt pins > > do this in their pic_enable_intr() routines giving the same behavior as > > before. MSI sources do it when the IDT vectors are allocated during > > msi_alloc() and msix_alloc(). > > - Change the intr_table_lock from an sx lock to a mutex. > > > > Tested by:rnoland > > It seems also fixed previously not working multi-vector MSI mode of AHCI > on my less lucky laptop. Thanks. I still need to do additional work to make it possible to use cpuset to move multi-vector MSI groups around. Does your laptop have multiple cores? -- John Baldwin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195006 - in head/sys/dev/cxgb: . sys
Author: np Date: Thu Jun 25 21:50:15 2009 New Revision: 195006 URL: http://svn.freebsd.org/changeset/base/195006 Log: mvec routines should have no knowledge of the SG engine. Reviewed by: kmacy Approved by: gnn (mentor) Modified: head/sys/dev/cxgb/cxgb_sge.c head/sys/dev/cxgb/sys/mvec.h head/sys/dev/cxgb/sys/uipc_mvec.c Modified: head/sys/dev/cxgb/cxgb_sge.c == --- head/sys/dev/cxgb/cxgb_sge.cThu Jun 25 20:59:37 2009 (r195005) +++ head/sys/dev/cxgb/cxgb_sge.cThu Jun 25 21:50:15 2009 (r195006) @@ -1152,17 +1152,18 @@ busdma_map_mbufs(struct mbuf **m, struct { struct mbuf *m0; int err, pktlen, pass = 0; + bus_dma_tag_t tag = txq->entry_tag; retry: err = 0; m0 = *m; pktlen = m0->m_pkthdr.len; #if defined(__i386__) || defined(__amd64__) - if (busdma_map_sg_collapse(txq, txsd->map, m, segs, nsegs) == 0) { + if (busdma_map_sg_collapse(tag, txsd->map, m, segs, nsegs) == 0) { goto done; } else #endif - err = bus_dmamap_load_mbuf_sg(txq->entry_tag, txsd->map, m0, segs, nsegs, 0); + err = bus_dmamap_load_mbuf_sg(tag, txsd->map, m0, segs, nsegs, 0); if (err == 0) { goto done; @@ -1189,7 +1190,7 @@ retry: } done: #if !defined(__i386__) && !defined(__amd64__) - bus_dmamap_sync(txq->entry_tag, txsd->map, BUS_DMASYNC_PREWRITE); + bus_dmamap_sync(tag, txsd->map, BUS_DMASYNC_PREWRITE); #endif txsd->flags |= TX_SW_DESC_MAPPED; @@ -1412,11 +1413,12 @@ t3_encap(struct sge_qset *qs, struct mbu tso_info = V_LSO_MSS(m0->m_pkthdr.tso_segsz); #endif if (m0->m_nextpkt != NULL) { - busdma_map_sg_vec(txq, txsd->map, m0, segs, &nsegs); + busdma_map_sg_vec(txq->entry_tag, txsd->map, m0, segs, &nsegs); ndesc = 1; mlen = 0; } else { - if ((err = busdma_map_sg_collapse(txq, txsd->map, &m0, segs, &nsegs))) { + if ((err = busdma_map_sg_collapse(txq->entry_tag, txsd->map, + &m0, segs, &nsegs))) { if (cxgb_debug) printf("failed ... err=%d\n", err); return (err); Modified: head/sys/dev/cxgb/sys/mvec.h == --- head/sys/dev/cxgb/sys/mvec.hThu Jun 25 20:59:37 2009 (r195005) +++ head/sys/dev/cxgb/sys/mvec.hThu Jun 25 21:50:15 2009 (r195006) @@ -43,7 +43,7 @@ #define m_ulp_mode m_pkthdr.tso_segsz /* upper level protocol */ static __inline void -busdma_map_mbuf_fast(struct sge_txq *txq, bus_dmamap_t map, +busdma_map_mbuf_fast(bus_dma_tag_t tag, bus_dmamap_t map, struct mbuf *m, bus_dma_segment_t *seg) { #if defined(__i386__) || defined(__amd64__) @@ -52,14 +52,13 @@ busdma_map_mbuf_fast(struct sge_txq *txq #else int nsegstmp; - bus_dmamap_load_mbuf_sg(txq->entry_tag, map, m, seg, - &nsegstmp, 0); + bus_dmamap_load_mbuf_sg(tag, map, m, seg, &nsegstmp, 0); #endif } -int busdma_map_sg_collapse(struct sge_txq *txq, bus_dmamap_t map, +int busdma_map_sg_collapse(bus_dma_tag_t tag, bus_dmamap_t map, struct mbuf **m, bus_dma_segment_t *segs, int *nsegs); -void busdma_map_sg_vec(struct sge_txq *txq, bus_dmamap_t map, +void busdma_map_sg_vec(bus_dma_tag_t tag, bus_dmamap_t map, struct mbuf *m, bus_dma_segment_t *segs, int *nsegs); static __inline int busdma_map_sgl(bus_dma_segment_t *vsegs, bus_dma_segment_t *segs, int count) Modified: head/sys/dev/cxgb/sys/uipc_mvec.c == --- head/sys/dev/cxgb/sys/uipc_mvec.c Thu Jun 25 20:59:37 2009 (r195005) +++ head/sys/dev/cxgb/sys/uipc_mvec.c Thu Jun 25 21:50:15 2009 (r195006) @@ -59,7 +59,7 @@ __FBSDID("$FreeBSD$"); #endif int -busdma_map_sg_collapse(struct sge_txq *txq, bus_dmamap_t map, +busdma_map_sg_collapse(bus_dma_tag_t tag, bus_dmamap_t map, struct mbuf **m, bus_dma_segment_t *segs, int *nsegs) { struct mbuf *n = *m; @@ -73,7 +73,7 @@ retry: psegs = segs; seg_count = 0; if (n->m_next == NULL) { - busdma_map_mbuf_fast(txq, map, n, segs); + busdma_map_mbuf_fast(tag, map, n, segs); *nsegs = 1; return (0); } @@ -84,14 +84,13 @@ retry: */ if (__predict_true(n->m_len != 0)) { seg_count++; - busdma_map_mbuf_fast(txq, map, n, psegs); + busdma_map_mbuf_fast(tag, map, n, psegs); psegs++; } n = n->m_next; } #else - err = bus_dmamap_load_mbuf_sg(txq->e
Re: svn commit: r194985 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include
John Baldwin wrote: On Thursday 25 June 2009 3:44:18 pm Alexander Motin wrote: John Baldwin wrote: Author: jhb Date: Thu Jun 25 18:13:46 2009 New Revision: 194985 URL: http://svn.freebsd.org/changeset/base/194985 Log: - Restore the behavior of pre-allocating IDT vectors for MSI interrupts. This is mostly important for the multiple MSI message case where the IDT vectors for the entire group need to be allocated together. This also restores the assumptions made by the PCI bus code that it could invoke PCIB_MAP_MSI() once MSI vectors were allocated. - To avoid whiplash with CPU assignments, change the way that CPUs are assigned to interrupt sources on activation. Instead of assigning the CPU via pic_assign_cpu() before calling enable_intr(), allow the different interrupt source drivers to ask the MD interrupt code which CPU to use when they allocate an IDT vector. I/O APIC interrupt pins do this in their pic_enable_intr() routines giving the same behavior as before. MSI sources do it when the IDT vectors are allocated during msi_alloc() and msix_alloc(). - Change the intr_table_lock from an sx lock to a mutex. Tested by: rnoland It seems also fixed previously not working multi-vector MSI mode of AHCI on my less lucky laptop. Thanks. I still need to do additional work to make it possible to use cpuset to move multi-vector MSI groups around. Does your laptop have multiple cores? Yes. Two. -- Alexander Motin ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194997 - head/sys/sun4v/conf
* Ed Schouten wrote: > Approved by:kib Kib, Kip; this should have said: Approved by:kmacy -- Ed Schouten WWW: http://80386.nl/ pgp1WgL3dqDa4.pgp Description: PGP signature
svn commit: r195011 - head/lib/libjail
Author: jamie Date: Thu Jun 25 22:42:19 2009 New Revision: 195011 URL: http://svn.freebsd.org/changeset/base/195011 Log: Fix dynamic (re)allocation logic in jailparam_set and jailparam_get. Touch up jailparam_import a bit while I'm at it. Approved by: bz (mentor) Modified: head/lib/libjail/jail.c Modified: head/lib/libjail/jail.c == --- head/lib/libjail/jail.c Thu Jun 25 22:24:13 2009(r195010) +++ head/lib/libjail/jail.c Thu Jun 25 22:42:19 2009(r195011) @@ -248,14 +248,14 @@ jailparam_import(struct jailparam *jp, c int i, nval, fw; if (!jp->jp_ctltype && jailparam_type(jp) < 0) - goto error; + return (-1); if (value == NULL) return (0); if ((jp->jp_ctltype & CTLTYPE) == CTLTYPE_STRING) { jp->jp_value = strdup(value); - if (!jp->jp_value) { + if (jp->jp_value == NULL) { strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); - goto error; + return (-1); } return (0); } @@ -263,9 +263,9 @@ jailparam_import(struct jailparam *jp, c if (jp->jp_elemlen) { if (value[0] == '\0' || (value[0] == '-' && value[1] == '\0')) { jp->jp_value = strdup(""); - if (value == NULL) { + if (jp->jp_value == NULL) { strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); - goto error; + return (-1); } jp->jp_valuelen = 0; return (0); @@ -275,9 +275,9 @@ jailparam_import(struct jailparam *jp, c jp->jp_valuelen = jp->jp_elemlen * nval; } jp->jp_value = malloc(jp->jp_valuelen); - if (!jp->jp_value) { + if (jp->jp_value == NULL) { strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); - goto error; + return (-1); } avalue = value; for (i = 0; i < nval; i++) { @@ -395,17 +395,18 @@ jailparam_set(struct jailparam *jp, unsi { struct iovec *jiov; char *nname; - int i, jid; + int i, jid, bool0; unsigned j; jiov = alloca(sizeof(struct iovec) * 2 * (njp + 1)); + bool0 = 0; for (i = j = 0; j < njp; j++) { jiov[i].iov_base = jp[j].jp_name; jiov[i].iov_len = strlen(jp[j].jp_name) + 1; i++; if (jp[j].jp_flags & (JP_BOOL | JP_NOBOOL)) { /* -* Set booleans without values. If one have a value of +* Set booleans without values. If one has a value of * zero, change it to (or from) its "no" counterpart. */ jiov[i].iov_base = NULL; @@ -413,13 +414,18 @@ jailparam_set(struct jailparam *jp, unsi if (jp[j].jp_value != NULL && jp[j].jp_valuelen == sizeof(int) && !*(int *)jp[j].jp_value) { + bool0 = 1; nname = jp[j].jp_flags & JP_BOOL - ? noname(jiov[i].iov_base) - : nononame(jiov[i].iov_base); - if (nname == NULL) - return (-1); - free(jp[j].jp_name); - jiov[i].iov_base = jp[j].jp_name = nname; + ? noname(jp[j].jp_name) + : nononame(jp[j].jp_name); + if (nname == NULL) { + njp = j; + jid = -1; + goto done; + } + jiov[i - 1].iov_base = nname; + jiov[i - 1].iov_len = strlen(nname) + 1; + } } else { jiov[i].iov_base = jp[j].jp_value; @@ -441,6 +447,14 @@ jailparam_set(struct jailparam *jp, unsi if (jid < 0 && !jail_errmsg[0]) snprintf(jail_errmsg, sizeof(jail_errmsg), "jail_set: %s", strerror(errno)); + done: + if (bool0) + for (j = 0; j < njp; j++) + if ((jp[j].jp_flags & (JP_BOOL | JP_NOBOOL)) && + jp[j].jp_value != NULL && + jp[j].jp_valuelen == sizeof(int) && + !*(int *)jp[j].jp_value) + free(jiov[j
svn commit: r195012 - head/usr.sbin/sysinstall/help
Author: delphij Date: Thu Jun 25 23:10:59 2009 New Revision: 195012 URL: http://svn.freebsd.org/changeset/base/195012 Log: Correct a typo (which you can use to in order -> which you can use in order to). PR: bin/136040 Submitted by: "Vikentii L. Karabin" MFC after:1 weeks Modified: head/usr.sbin/sysinstall/help/usage.hlp Modified: head/usr.sbin/sysinstall/help/usage.hlp == --- head/usr.sbin/sysinstall/help/usage.hlp Thu Jun 25 22:42:19 2009 (r195011) +++ head/usr.sbin/sysinstall/help/usage.hlp Thu Jun 25 23:10:59 2009 (r195012) @@ -56,7 +56,7 @@ it's also useful when dealing with sub-s that don't use menus and tend to scroll their output off the top of the screen. -FreeBSD also supports multiple "virtual consoles" which you can use to +FreeBSD also supports multiple "virtual consoles" which you can use in order to have several active sessions at once. Use ALT-F to switch between screens, where `F' is the function key corresponding to the screen you wish to see. By default, the system comes with 8 ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195013 - in vendor-sys/acpica/dist: . common compiler debugger events executer generate/lint hardware include namespace tables tools/acpiexec tools/acpisrc utilities
Author: jkim Date: Thu Jun 25 23:20:50 2009 New Revision: 195013 URL: http://svn.freebsd.org/changeset/base/195013 Log: Import ACPICA 20090625 Added: vendor-sys/acpica/dist/utilities/utids.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/common/dmtbinfo.c vendor-sys/acpica/dist/compiler/aslcompiler.l vendor-sys/acpica/dist/compiler/aslcompiler.y vendor-sys/acpica/dist/compiler/asllookup.c vendor-sys/acpica/dist/compiler/aslmap.c vendor-sys/acpica/dist/debugger/dbcmds.c vendor-sys/acpica/dist/debugger/dbdisply.c vendor-sys/acpica/dist/debugger/dbexec.c vendor-sys/acpica/dist/events/evgpe.c vendor-sys/acpica/dist/events/evgpeblk.c vendor-sys/acpica/dist/events/evrgnini.c vendor-sys/acpica/dist/executer/exfield.c vendor-sys/acpica/dist/executer/exfldio.c vendor-sys/acpica/dist/executer/exutils.c vendor-sys/acpica/dist/generate/lint/options.lnt vendor-sys/acpica/dist/hardware/hwgpe.c vendor-sys/acpica/dist/hardware/hwregs.c vendor-sys/acpica/dist/hardware/hwtimer.c vendor-sys/acpica/dist/hardware/hwxface.c vendor-sys/acpica/dist/include/acconfig.h vendor-sys/acpica/dist/include/acdebug.h vendor-sys/acpica/dist/include/acglobal.h vendor-sys/acpica/dist/include/achware.h vendor-sys/acpica/dist/include/acinterp.h vendor-sys/acpica/dist/include/aclocal.h vendor-sys/acpica/dist/include/acmacros.h vendor-sys/acpica/dist/include/acnamesp.h vendor-sys/acpica/dist/include/acpixf.h vendor-sys/acpica/dist/include/actbl.h vendor-sys/acpica/dist/include/actbl1.h vendor-sys/acpica/dist/include/actypes.h vendor-sys/acpica/dist/include/acutils.h vendor-sys/acpica/dist/include/amlcode.h vendor-sys/acpica/dist/namespace/nsalloc.c vendor-sys/acpica/dist/namespace/nsload.c vendor-sys/acpica/dist/namespace/nspredef.c vendor-sys/acpica/dist/namespace/nsxfeval.c vendor-sys/acpica/dist/namespace/nsxfname.c vendor-sys/acpica/dist/tables/tbutils.c vendor-sys/acpica/dist/tools/acpiexec/Makefile vendor-sys/acpica/dist/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/tools/acpisrc/astable.c vendor-sys/acpica/dist/utilities/uteval.c vendor-sys/acpica/dist/utilities/utglobal.c vendor-sys/acpica/dist/utilities/utmisc.c Modified: vendor-sys/acpica/dist/changes.txt == --- vendor-sys/acpica/dist/changes.txt Thu Jun 25 23:10:59 2009 (r195012) +++ vendor-sys/acpica/dist/changes.txt Thu Jun 25 23:20:50 2009 (r195013) @@ -1,4 +1,82 @@ +25 June 2009. Summary of changes for version 20090625: + +This release is available at www.acpica.org/downloads + +The ACPI 4.0 Specification was released on June 16 and is available at +www.acpi.info. ACPICA implementation of ACPI 4.0 is underway and will +continue for the next few releases. + +1) ACPI CA Core Subsystem: + +ACPI 4.0: Implemented interpreter support for the IPMI operation region +address space. Includes support for bi-directional data buffers and an IPMI +address space handler (to be installed by an IPMI device driver.) ACPICA BZ +773. Lin Ming. + +ACPI 4.0: Added changes for existing ACPI tables - FACS and SRAT. Includes +support in both the header files and the disassembler. + +Completed a major update for the AcpiGetObjectInfo external interface. +Changes include: + - Support for variable, unlimited length HID, UID, and CID strings. + - Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.) + - Call the _SxW power methods on behalf of a device object. + - Determine if a device is a PCI root bridge. + - Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO. +These changes will require an update to all callers of this interface. See +the updated ACPICA Programmer Reference for details. One new source file has +been added - utilities/utids.c. ACPICA BZ 368, 780. + +Updated the AcpiRead and AcpiWrite external interfaces to support 64-bit +transfers. The Value parameter has been extended from 32 bits to 64 bits in +order to support new ACPI 4.0 tables. These changes will require an update to +all callers of these interfaces. See the ACPICA Programmer Reference for +details. ACPICA BZ 768. + +Fixed several problems with AcpiAttachData. The handler was not invoked when +the host node was deleted. The data sub-object was not automatically deleted +when the host node was deleted. The interface to the handler had an unused +parameter, this was removed. ACPICA BZ 778. + +Enhanced the function that dumps ACPI table headers. All non-printable +characters in the string fields are now replaced with '?' (Signature, OemId, +OemTableId, and CompilerId.) ACPI tables with non-printable characters in +these fields are occasionally seen in the field. ACPICA BZ 788. + +Fixed a problem with predefined method repair code where the code that +a
svn commit: r195013 - in vendor-sys/acpica/dist: . common compiler debugger events executer generate/lint hardware include namespace tables tools/acpiexec tools/acpisrc utilities
Author: jkim Date: Thu Jun 25 23:20:50 2009 New Revision: 195013 URL: http://svn.freebsd.org/changeset/base/195013 Log: Import ACPICA 20090625 Added: vendor-sys/acpica/dist/utilities/utids.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/common/dmtbinfo.c vendor-sys/acpica/dist/compiler/aslcompiler.l vendor-sys/acpica/dist/compiler/aslcompiler.y vendor-sys/acpica/dist/compiler/asllookup.c vendor-sys/acpica/dist/compiler/aslmap.c vendor-sys/acpica/dist/debugger/dbcmds.c vendor-sys/acpica/dist/debugger/dbdisply.c vendor-sys/acpica/dist/debugger/dbexec.c vendor-sys/acpica/dist/events/evgpe.c vendor-sys/acpica/dist/events/evgpeblk.c vendor-sys/acpica/dist/events/evrgnini.c vendor-sys/acpica/dist/executer/exfield.c vendor-sys/acpica/dist/executer/exfldio.c vendor-sys/acpica/dist/executer/exutils.c vendor-sys/acpica/dist/generate/lint/options.lnt vendor-sys/acpica/dist/hardware/hwgpe.c vendor-sys/acpica/dist/hardware/hwregs.c vendor-sys/acpica/dist/hardware/hwtimer.c vendor-sys/acpica/dist/hardware/hwxface.c vendor-sys/acpica/dist/include/acconfig.h vendor-sys/acpica/dist/include/acdebug.h vendor-sys/acpica/dist/include/acglobal.h vendor-sys/acpica/dist/include/achware.h vendor-sys/acpica/dist/include/acinterp.h vendor-sys/acpica/dist/include/aclocal.h vendor-sys/acpica/dist/include/acmacros.h vendor-sys/acpica/dist/include/acnamesp.h vendor-sys/acpica/dist/include/acpixf.h vendor-sys/acpica/dist/include/actbl.h vendor-sys/acpica/dist/include/actbl1.h vendor-sys/acpica/dist/include/actypes.h vendor-sys/acpica/dist/include/acutils.h vendor-sys/acpica/dist/include/amlcode.h vendor-sys/acpica/dist/namespace/nsalloc.c vendor-sys/acpica/dist/namespace/nsload.c vendor-sys/acpica/dist/namespace/nspredef.c vendor-sys/acpica/dist/namespace/nsxfeval.c vendor-sys/acpica/dist/namespace/nsxfname.c vendor-sys/acpica/dist/tables/tbutils.c vendor-sys/acpica/dist/tools/acpiexec/Makefile vendor-sys/acpica/dist/tools/acpiexec/aeexec.c vendor-sys/acpica/dist/tools/acpiexec/aehandlers.c vendor-sys/acpica/dist/tools/acpisrc/astable.c vendor-sys/acpica/dist/utilities/uteval.c vendor-sys/acpica/dist/utilities/utglobal.c vendor-sys/acpica/dist/utilities/utmisc.c Modified: vendor-sys/acpica/dist/changes.txt == --- vendor-sys/acpica/dist/changes.txt Thu Jun 25 23:10:59 2009 (r195012) +++ vendor-sys/acpica/dist/changes.txt Thu Jun 25 23:20:50 2009 (r195013) @@ -1,4 +1,82 @@ +25 June 2009. Summary of changes for version 20090625: + +This release is available at www.acpica.org/downloads + +The ACPI 4.0 Specification was released on June 16 and is available at +www.acpi.info. ACPICA implementation of ACPI 4.0 is underway and will +continue for the next few releases. + +1) ACPI CA Core Subsystem: + +ACPI 4.0: Implemented interpreter support for the IPMI operation region +address space. Includes support for bi-directional data buffers and an IPMI +address space handler (to be installed by an IPMI device driver.) ACPICA BZ +773. Lin Ming. + +ACPI 4.0: Added changes for existing ACPI tables - FACS and SRAT. Includes +support in both the header files and the disassembler. + +Completed a major update for the AcpiGetObjectInfo external interface. +Changes include: + - Support for variable, unlimited length HID, UID, and CID strings. + - Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.) + - Call the _SxW power methods on behalf of a device object. + - Determine if a device is a PCI root bridge. + - Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO. +These changes will require an update to all callers of this interface. See +the updated ACPICA Programmer Reference for details. One new source file has +been added - utilities/utids.c. ACPICA BZ 368, 780. + +Updated the AcpiRead and AcpiWrite external interfaces to support 64-bit +transfers. The Value parameter has been extended from 32 bits to 64 bits in +order to support new ACPI 4.0 tables. These changes will require an update to +all callers of these interfaces. See the ACPICA Programmer Reference for +details. ACPICA BZ 768. + +Fixed several problems with AcpiAttachData. The handler was not invoked when +the host node was deleted. The data sub-object was not automatically deleted +when the host node was deleted. The interface to the handler had an unused +parameter, this was removed. ACPICA BZ 778. + +Enhanced the function that dumps ACPI table headers. All non-printable +characters in the string fields are now replaced with '?' (Signature, OemId, +OemTableId, and CompilerId.) ACPI tables with non-printable characters in +these fields are occasionally seen in the field. ACPICA BZ 788. + +Fixed a problem with predefined method repair code where the code that +a
svn commit: r195014 - vendor-sys/acpica/20090625
Author: jkim Date: Thu Jun 25 23:22:25 2009 New Revision: 195014 URL: http://svn.freebsd.org/changeset/base/195014 Log: Tag ACPICA 20090625 Added: vendor-sys/acpica/20090625/ - copied from r195013, vendor-sys/acpica/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195014 - vendor-sys/acpica/20090625
Author: jkim Date: Thu Jun 25 23:22:25 2009 New Revision: 195014 URL: http://svn.freebsd.org/changeset/base/195014 Log: Tag ACPICA 20090625 Added: vendor-sys/acpica/20090625/ - copied from r195013, vendor-sys/acpica/dist/ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195015 - head/lib/libc/stdtime
Author: delphij Date: Thu Jun 25 23:59:23 2009 New Revision: 195015 URL: http://svn.freebsd.org/changeset/base/195015 Log: Implement %z for strptime. PR: kern/63064 Submitted by: Stefan `Sec` Zehl (with some small changes) MFC after:1 month Modified: head/lib/libc/stdtime/strptime.c Modified: head/lib/libc/stdtime/strptime.c == --- head/lib/libc/stdtime/strptime.cThu Jun 25 23:22:25 2009 (r195014) +++ head/lib/libc/stdtime/strptime.cThu Jun 25 23:59:23 2009 (r195015) @@ -514,6 +514,34 @@ label: } } break; + + case 'z': + { + int sign = 1; + + if (*buf != '+') { + if (*buf == '-') + sign = -1; + else + return 0; + } + + buf++; + i = 0; + for (len = 4; len > 0; len--) { + if (isdigit((int)*buf)) { + i *= 10; + i += *buf - '0'; + buf++; + } else + return 0; + } + + tm->tm_hour -= sign * (i / 100); + tm->tm_min -= sign * (i % 100); + *GMTp = 1; + } + break; } } return (char *)buf; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195019 - head/sys/net
Author: rwatson Date: Fri Jun 26 00:19:25 2009 New Revision: 195019 URL: http://svn.freebsd.org/changeset/base/195019 Log: Convert netisr to use dynamic per-CPU storage (DPCPU) instead of sizing arrays to [MAXCPU], offering moderate memory savings. In some places, this requires using CPU_ABSENT() to handle less common platforms with sparse CPU IDs. In several places, assert that the selected CPUID for work placement or statistics is not CPU_ABSENT() to be on the safe side. Discussed with: bz, jeff Modified: head/sys/net/netisr.c Modified: head/sys/net/netisr.c == --- head/sys/net/netisr.c Fri Jun 26 00:15:26 2009(r195018) +++ head/sys/net/netisr.c Fri Jun 26 00:19:25 2009(r195019) @@ -70,6 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -258,14 +259,14 @@ struct netisr_workstream { } __aligned(CACHE_LINE_SIZE); /* - * Per-CPU workstream data, indexed by CPU ID. + * Per-CPU workstream data. */ -static struct netisr_workstream nws[MAXCPU]; +DPCPU_DEFINE(struct netisr_workstream, nws); /* * Map contiguous values between 0 and nws_count into CPU IDs appropriate for - * indexing the nws[] array. This allows constructions of the form - * nws[nws_array(arbitraryvalue % nws_count)]. + * accessing workstreams. This allows constructions of the form + * DPCPU_ID_GET(nws_array[arbitraryvalue % nws_count], nws). */ static u_intnws_array[MAXCPU]; @@ -393,7 +394,9 @@ netisr_register(const struct netisr_hand np[proto].np_qlimit = nhp->nh_qlimit; np[proto].np_policy = nhp->nh_policy; for (i = 0; i < MAXCPU; i++) { - npwp = &nws[i].nws_work[proto]; + if (CPU_ABSENT(i)) + continue; + npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto]; bzero(npwp, sizeof(*npwp)); npwp->nw_qlimit = np[proto].np_qlimit; } @@ -425,7 +428,9 @@ netisr_clearqdrops(const struct netisr_h name)); for (i = 0; i < MAXCPU; i++) { - npwp = &nws[i].nws_work[proto]; + if (CPU_ABSENT(i)) + continue; + npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto]; npwp->nw_qdrops = 0; } NETISR_WUNLOCK(); @@ -458,7 +463,9 @@ netisr_getqdrops(const struct netisr_han name)); for (i = 0; i < MAXCPU; i++) { - npwp = &nws[i].nws_work[proto]; + if (CPU_ABSENT(i)) + continue; + npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto]; *qdropp += npwp->nw_qdrops; } NETISR_RUNLOCK(&tracker); @@ -522,7 +529,9 @@ netisr_setqlimit(const struct netisr_han np[proto].np_qlimit = qlimit; for (i = 0; i < MAXCPU; i++) { - npwp = &nws[i].nws_work[proto]; + if (CPU_ABSENT(i)) + continue; + npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto]; npwp->nw_qlimit = qlimit; } NETISR_WUNLOCK(); @@ -586,7 +595,9 @@ netisr_unregister(const struct netisr_ha np[proto].np_qlimit = 0; np[proto].np_policy = 0; for (i = 0; i < MAXCPU; i++) { - npwp = &nws[i].nws_work[proto]; + if (CPU_ABSENT(i)) + continue; + npwp = &(DPCPU_ID_PTR(i, nws))->nws_work[proto]; netisr_drain_proto(npwp); bzero(npwp, sizeof(*npwp)); } @@ -809,10 +820,11 @@ netisr_queue_internal(u_int proto, struc #endif KASSERT(cpuid < MAXCPU, ("%s: cpuid too big (%u, %u)", __func__, cpuid, MAXCPU)); + KASSERT(!CPU_ABSENT(cpuid), ("%s: CPU %u absent", __func__, cpuid)); dosignal = 0; error = 0; - nwsp = &nws[cpuid]; + nwsp = DPCPU_ID_PTR(cpuid, nws); npwp = &nwsp->nws_work[proto]; NWS_LOCK(nwsp); error = netisr_queue_workstream(nwsp, proto, npwp, m, &dosignal); @@ -841,9 +853,11 @@ netisr_queue_src(u_int proto, uintptr_t ("%s: invalid proto %u", __func__, proto)); m = netisr_select_cpuid(&np[proto], source, m, &cpuid); - if (m != NULL) + if (m != NULL) { + KASSERT(!CPU_ABSENT(cpuid), ("%s: CPU %u absent", __func__, + cpuid)); error = netisr_queue_internal(proto, m, cpuid); - else + } else error = ENOBUFS; #ifdef NETISR_LOCKING NETISR_RUNLOCK(&tracker); @@ -895,7 +909,7 @@ netisr_dispatch_src(u_int proto, uintptr * to always being forced to directly dispatch. */ if (netisr_direct_force) { - nwsp = &nws[curcpu]; + nwsp = DPCPU_PTR(nws); npwp = &
svn commit: r195020 - head/sys/net
Author: rwatson Date: Fri Jun 26 00:36:47 2009 New Revision: 195020 URL: http://svn.freebsd.org/changeset/base/195020 Log: Define four wrapper functions for interface address locking, if_addr_rlock() and if_addr_runlock() for regular address lists, and if_maddr_rlock() and if_maddr_runlock() for multicast address lists. We will use these in various kernel modules to avoid encoding specific type and locking strategy information into modules that currently use IF_ADDR_LOCK() and IF_ADDR_UNLOCK() directly. MFC after:6 weeks Modified: head/sys/net/if.c head/sys/net/if_var.h Modified: head/sys/net/if.c == --- head/sys/net/if.c Fri Jun 26 00:19:25 2009(r195019) +++ head/sys/net/if.c Fri Jun 26 00:36:47 2009(r195020) @@ -1419,6 +1419,40 @@ if_rtdel(struct radix_node *rn, void *ar } /* + * Wrapper functions for struct ifnet address list locking macros. These are + * used by kernel modules to avoid encoding programming interface or binary + * interface assumptions that may be violated when kernel-internal locking + * approaches change. + */ +void +if_addr_rlock(struct ifnet *ifp) +{ + + IF_ADDR_LOCK(ifp); +} + +void +if_addr_runlock(struct ifnet *ifp) +{ + + IF_ADDR_UNLOCK(ifp); +} + +void +if_maddr_rlock(struct ifnet *ifp) +{ + + IF_ADDR_LOCK(ifp); +} + +void +if_maddr_runlock(struct ifnet *ifp) +{ + + IF_ADDR_UNLOCK(ifp); +} + +/* * Reference count functions for ifaddrs. */ void Modified: head/sys/net/if_var.h == --- head/sys/net/if_var.h Fri Jun 26 00:19:25 2009(r195019) +++ head/sys/net/if_var.h Fri Jun 26 00:36:47 2009(r195020) @@ -253,6 +253,16 @@ typedef void if_init_f_t(void *); #defineIF_ADDR_LOCK_ASSERT(if) mtx_assert(&(if)->if_addr_mtx, MA_OWNED) /* + * Function variations on locking macros intended to be used by loadable + * kernel modules in order to divorce them from the internals of address list + * locking. + */ +void if_addr_rlock(struct ifnet *ifp); /* if_addrhead */ +void if_addr_runlock(struct ifnet *ifp); /* if_addrhead */ +void if_maddr_rlock(struct ifnet *ifp); /* if_multiaddrs */ +void if_maddr_runlock(struct ifnet *ifp);/* if_multiaddrs */ + +/* * Output queues (ifp->if_snd) and slow device input queues (*ifp->if_slowq) * are queues of messages stored on ifqueue structures * (defined above). Entries are added to and deleted from these structures ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195022 - head/sys/net
Author: rwatson Date: Fri Jun 26 00:45:20 2009 New Revision: 195022 URL: http://svn.freebsd.org/changeset/base/195022 Log: Update if_stf and if_tun to use if_addr_rlock()/if_addr_runlock() rather than IF_ADDR_LOCK()/IF_ADDR_UNLOCK() when iterating ifp->if_addrhead. MFC after:6 weeks Modified: head/sys/net/if_stf.c head/sys/net/if_tun.c Modified: head/sys/net/if_stf.c == --- head/sys/net/if_stf.c Fri Jun 26 00:44:23 2009(r195021) +++ head/sys/net/if_stf.c Fri Jun 26 00:45:20 2009(r195022) @@ -384,7 +384,7 @@ stf_getsrcifa6(ifp) struct sockaddr_in6 *sin6; struct in_addr in; - IF_ADDR_LOCK(ifp); + if_addr_rlock(ifp); TAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_link) { if (ia->ifa_addr->sa_family != AF_INET6) continue; @@ -400,10 +400,10 @@ stf_getsrcifa6(ifp) continue; ifa_ref(ia); - IF_ADDR_UNLOCK(ifp); + if_addr_runlock(ifp); return (struct in6_ifaddr *)ia; } - IF_ADDR_UNLOCK(ifp); + if_addr_runlock(ifp); return NULL; } Modified: head/sys/net/if_tun.c == --- head/sys/net/if_tun.c Fri Jun 26 00:44:23 2009(r195021) +++ head/sys/net/if_tun.c Fri Jun 26 00:45:20 2009(r195022) @@ -520,7 +520,7 @@ tuninit(struct ifnet *ifp) getmicrotime(&ifp->if_lastchange); #ifdef INET - IF_ADDR_LOCK(ifp); + if_addr_rlock(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family == AF_INET) { struct sockaddr_in *si; @@ -536,7 +536,7 @@ tuninit(struct ifnet *ifp) mtx_unlock(&tp->tun_mtx); } } - IF_ADDR_UNLOCK(ifp); + if_addr_runlock(ifp); #endif return (error); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195023 - in head/sys/netinet: . ipfw
Author: rwatson Date: Fri Jun 26 00:46:50 2009 New Revision: 195023 URL: http://svn.freebsd.org/changeset/base/195023 Log: Update various IPFW-related modules to use if_addr_rlock()/ if_addr_runlock() rather than IF_ADDR_LOCK()/IF_ADDR_UNLOCK(). MFC after:6 weeks Modified: head/sys/netinet/ip_divert.c head/sys/netinet/ipfw/ip_fw2.c head/sys/netinet/ipfw/ip_fw_nat.c Modified: head/sys/netinet/ip_divert.c == --- head/sys/netinet/ip_divert.cFri Jun 26 00:45:20 2009 (r195022) +++ head/sys/netinet/ip_divert.cFri Jun 26 00:46:50 2009 (r195023) @@ -254,7 +254,7 @@ divert_packet(struct mbuf *m, int incomi /* Find IP address for receive interface */ ifp = m->m_pkthdr.rcvif; - IF_ADDR_LOCK(ifp); + if_addr_rlock(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr->sa_family != AF_INET) continue; @@ -262,7 +262,7 @@ divert_packet(struct mbuf *m, int incomi ((struct sockaddr_in *) ifa->ifa_addr)->sin_addr; break; } - IF_ADDR_UNLOCK(ifp); + if_addr_runlock(ifp); } /* * Record the incoming interface name whenever we have one. Modified: head/sys/netinet/ipfw/ip_fw2.c == --- head/sys/netinet/ipfw/ip_fw2.c Fri Jun 26 00:45:20 2009 (r195022) +++ head/sys/netinet/ipfw/ip_fw2.c Fri Jun 26 00:46:50 2009 (r195023) @@ -475,17 +475,17 @@ iface_match(struct ifnet *ifp, ipfw_insn } else { struct ifaddr *ia; - IF_ADDR_LOCK(ifp); + if_addr_rlock(ifp); TAILQ_FOREACH(ia, &ifp->if_addrhead, ifa_link) { if (ia->ifa_addr->sa_family != AF_INET) continue; if (cmd->p.ip.s_addr == ((struct sockaddr_in *) (ia->ifa_addr))->sin_addr.s_addr) { - IF_ADDR_UNLOCK(ifp); + if_addr_runlock(ifp); return(1); /* match */ } } - IF_ADDR_UNLOCK(ifp); + if_addr_runlock(ifp); } return(0); /* no match, fail ... */ } @@ -588,7 +588,7 @@ search_ip6_addr_net (struct in6_addr * i struct in6_addr copia; TAILQ_FOREACH(mdc, &V_ifnet, if_link) { - IF_ADDR_LOCK(mdc); + if_addr_rlock(mdc); TAILQ_FOREACH(mdc2, &mdc->if_addrhead, ifa_link) { if (mdc2->ifa_addr->sa_family == AF_INET6) { fdm = (struct in6_ifaddr *)mdc2; @@ -596,12 +596,12 @@ search_ip6_addr_net (struct in6_addr * i /* need for leaving scope_id in the sock_addr */ in6_clearscope(&copia); if (IN6_ARE_ADDR_EQUAL(ip6_addr, &copia)) { - IF_ADDR_UNLOCK(mdc); + if_addr_runlock(mdc); return 1; } } } - IF_ADDR_UNLOCK(mdc); + if_addr_runlock(mdc); } return 0; } Modified: head/sys/netinet/ipfw/ip_fw_nat.c == --- head/sys/netinet/ipfw/ip_fw_nat.c Fri Jun 26 00:45:20 2009 (r195022) +++ head/sys/netinet/ipfw/ip_fw_nat.c Fri Jun 26 00:46:50 2009 (r195023) @@ -92,7 +92,7 @@ ifaddr_change(void *arg __unused, struct LIST_FOREACH(ptr, &V_layer3_chain.nat, _next) { /* ...using nic 'ifp->if_xname' as dynamic alias address. */ if (strncmp(ptr->if_name, ifp->if_xname, IF_NAMESIZE) == 0) { - IF_ADDR_LOCK(ifp); + if_addr_rlock(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { if (ifa->ifa_addr == NULL) continue; @@ -102,7 +102,7 @@ ifaddr_change(void *arg __unused, struct (ifa->ifa_addr))->sin_addr; LibAliasSetAddress(ptr->lib, ptr->ip); } - IF_ADDR_UNLOCK(ifp); + if_addr_runlock(ifp); } } IPFW_WUNLOCK(&V_layer3_chain); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn
svn commit: r195024 - head/sys/netgraph
Author: rwatson Date: Fri Jun 26 00:49:12 2009 New Revision: 195024 URL: http://svn.freebsd.org/changeset/base/195024 Log: Update Netgraph nodes to use if_addr_rlock()/if_addr_runlock() instead of IF_ADDR_LOCK()/IF_ADDR_UNLOCK() when iterating ifp->if_addrhead. MFC after:6 weeks Modified: head/sys/netgraph/ng_eiface.c head/sys/netgraph/ng_iface.c Modified: head/sys/netgraph/ng_eiface.c == --- head/sys/netgraph/ng_eiface.c Fri Jun 26 00:46:50 2009 (r195023) +++ head/sys/netgraph/ng_eiface.c Fri Jun 26 00:49:12 2009 (r195024) @@ -466,12 +466,12 @@ ng_eiface_rcvmsg(node_p node, item_p ite /* Determine size of response and allocate it */ buflen = 0; - IF_ADDR_LOCK(ifp); + if_addr_rlock(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) buflen += SA_SIZE(ifa->ifa_addr); NG_MKRESPONSE(resp, msg, buflen, M_NOWAIT); if (resp == NULL) { - IF_ADDR_UNLOCK(ifp); + if_addr_runlock(ifp); error = ENOMEM; break; } @@ -490,7 +490,7 @@ ng_eiface_rcvmsg(node_p node, item_p ite ptr += len; buflen -= len; } - IF_ADDR_UNLOCK(ifp); + if_addr_runlock(ifp); break; } Modified: head/sys/netgraph/ng_iface.c == --- head/sys/netgraph/ng_iface.cFri Jun 26 00:46:50 2009 (r195023) +++ head/sys/netgraph/ng_iface.cFri Jun 26 00:49:12 2009 (r195024) @@ -683,7 +683,7 @@ ng_iface_rcvmsg(node_p node, item_p item struct ifaddr *ifa; /* Return the first configured IP address */ - IF_ADDR_LOCK(ifp); + if_addr_rlock(ifp); TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link) { struct ng_cisco_ipaddr *ips; @@ -701,7 +701,7 @@ ng_iface_rcvmsg(node_p node, item_p item ifa->ifa_netmask)->sin_addr; break; } - IF_ADDR_UNLOCK(ifp); + if_addr_runlock(ifp); /* No IP addresses on this interface? */ if (ifa == NULL) ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195026 - head/etc/rc.d
Author: dougb Date: Fri Jun 26 01:04:50 2009 New Revision: 195026 URL: http://svn.freebsd.org/changeset/base/195026 Log: Reverse the effect of r193198 for pf and ipfw which will once again allow them to start after netif. There were too many problems reported with this change in the short period of time that it lived in HEAD, and we are too late in the release cycle to properly shake it out. IMO the issue of having the firewalls up before the network is still a valid concern, particularly for pf whose default state is wide open. However properly solving this issue is going to take some investment on the part of the people who actually use those tools. This is not a strict reversion of all the changes for r193198 since it also included some simplification of the BEFORE/REQUIRE logic which is still valid for ipfilter and ip6fw. Modified: head/etc/rc.d/NETWORKING head/etc/rc.d/ipfw head/etc/rc.d/netif head/etc/rc.d/pf head/etc/rc.d/pflog head/etc/rc.d/pfsync Modified: head/etc/rc.d/NETWORKING == --- head/etc/rc.d/NETWORKINGFri Jun 26 01:01:50 2009(r195025) +++ head/etc/rc.d/NETWORKINGFri Jun 26 01:04:50 2009(r195026) @@ -4,7 +4,7 @@ # # PROVIDE: NETWORKING NETWORK -# REQUIRE: netif netoptions routing network_ipv6 ppp +# REQUIRE: netif netoptions routing network_ipv6 ppp ipfw # REQUIRE: defaultroute routed mrouted route6d mroute6d resolv # This is a dummy dependency, for services which require networking Modified: head/etc/rc.d/ipfw == --- head/etc/rc.d/ipfw Fri Jun 26 01:01:50 2009(r195025) +++ head/etc/rc.d/ipfw Fri Jun 26 01:04:50 2009(r195026) @@ -4,7 +4,7 @@ # # PROVIDE: ipfw -# REQUIRE: FILESYSTEMS +# REQUIRE: ppp # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/netif == --- head/etc/rc.d/netif Fri Jun 26 01:01:50 2009(r195025) +++ head/etc/rc.d/netif Fri Jun 26 01:04:50 2009(r195026) @@ -27,7 +27,7 @@ # PROVIDE: netif # REQUIRE: atm1 cleanvar FILESYSTEMS serial sppp sysctl -# REQUIRE: ipfilter ipfs pf ipfw +# REQUIRE: ipfilter ipfs # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/pf == --- head/etc/rc.d/pfFri Jun 26 01:01:50 2009(r195025) +++ head/etc/rc.d/pfFri Jun 26 01:04:50 2009(r195026) @@ -4,7 +4,7 @@ # # PROVIDE: pf -# REQUIRE: FILESYSTEMS pflog pfsync +# REQUIRE: FILESYSTEMS netif pflog pfsync # BEFORE: routing # KEYWORD: nojail Modified: head/etc/rc.d/pflog == --- head/etc/rc.d/pflog Fri Jun 26 01:01:50 2009(r195025) +++ head/etc/rc.d/pflog Fri Jun 26 01:04:50 2009(r195026) @@ -4,7 +4,7 @@ # # PROVIDE: pflog -# REQUIRE: FILESYSTEMS cleanvar +# REQUIRE: FILESYSTEMS netif cleanvar # KEYWORD: nojail . /etc/rc.subr Modified: head/etc/rc.d/pfsync == --- head/etc/rc.d/pfsyncFri Jun 26 01:01:50 2009(r195025) +++ head/etc/rc.d/pfsyncFri Jun 26 01:04:50 2009(r195026) @@ -4,7 +4,7 @@ # # PROVIDE: pfsync -# REQUIRE: FILESYSTEMS +# REQUIRE: FILESYSTEMS netif # KEYWORD: nojail . /etc/rc.subr ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195027 - stable/7/usr.bin/tail
Author: brian Date: Fri Jun 26 01:08:35 2009 New Revision: 195027 URL: http://svn.freebsd.org/changeset/base/195027 Log: MFC: r193488: Persist forever when tailing with -F and ignore ENOENT failures. Correct the filename in other error messages. Modified: stable/7/usr.bin/tail/ (props changed) stable/7/usr.bin/tail/extern.h stable/7/usr.bin/tail/forward.c stable/7/usr.bin/tail/misc.c stable/7/usr.bin/tail/read.c stable/7/usr.bin/tail/reverse.c stable/7/usr.bin/tail/tail.1 stable/7/usr.bin/tail/tail.c Modified: stable/7/usr.bin/tail/extern.h == --- stable/7/usr.bin/tail/extern.h Fri Jun 26 01:04:50 2009 (r195026) +++ stable/7/usr.bin/tail/extern.h Fri Jun 26 01:08:35 2009 (r195027) @@ -61,16 +61,15 @@ typedef struct file_info file_info_t; enum STYLE { NOTSET = 0, FBYTES, FLINES, RBYTES, RLINES, REVERSE }; void follow(file_info_t *, enum STYLE, off_t); -void forward(FILE *, enum STYLE, off_t, struct stat *); -void reverse(FILE *, enum STYLE, off_t, struct stat *); +void forward(FILE *, const char *, enum STYLE, off_t, struct stat *); +void reverse(FILE *, const char *, enum STYLE, off_t, struct stat *); -int bytes(FILE *, off_t); -int lines(FILE *, off_t); +int bytes(FILE *, const char *, off_t); +int lines(FILE *, const char *, off_t); -void ierr(void); +void ierr(const char *); void oerr(void); int mapprint(struct mapinfo *, off_t, off_t); int maparound(struct mapinfo *, off_t); extern int Fflag, fflag, qflag, rflag, rval, no_files; -extern const char *fname; Modified: stable/7/usr.bin/tail/forward.c == --- stable/7/usr.bin/tail/forward.c Fri Jun 26 01:04:50 2009 (r195026) +++ stable/7/usr.bin/tail/forward.c Fri Jun 26 01:08:35 2009 (r195027) @@ -61,8 +61,8 @@ static const char sccsid[] = "@(#)forwar #include "extern.h" -static void rlines(FILE *, off_t, struct stat *); -static void show(file_info_t *); +static void rlines(FILE *, const char *fn, off_t, struct stat *); +static int show(file_info_t *); static void set_events(file_info_t *files); /* defines for inner loop actions */ @@ -99,7 +99,7 @@ static const file_info_t *last; * NOREG cyclically read lines into a wrap-around array of buffers */ void -forward(FILE *fp, enum STYLE style, off_t off, struct stat *sbp) +forward(FILE *fp, const char *fn, enum STYLE style, off_t off, struct stat *sbp) { int ch; @@ -111,13 +111,13 @@ forward(FILE *fp, enum STYLE style, off_ if (sbp->st_size < off) off = sbp->st_size; if (fseeko(fp, off, SEEK_SET) == -1) { - ierr(); + ierr(fn); return; } } else while (off--) if ((ch = getc(fp)) == EOF) { if (ferror(fp)) { - ierr(); + ierr(fn); return; } break; @@ -129,7 +129,7 @@ forward(FILE *fp, enum STYLE style, off_ for (;;) { if ((ch = getc(fp)) == EOF) { if (ferror(fp)) { - ierr(); + ierr(fn); return; } break; @@ -142,36 +142,36 @@ forward(FILE *fp, enum STYLE style, off_ if (S_ISREG(sbp->st_mode)) { if (sbp->st_size >= off && fseeko(fp, -off, SEEK_END) == -1) { - ierr(); + ierr(fn); return; } } else if (off == 0) { while (getc(fp) != EOF); if (ferror(fp)) { - ierr(); + ierr(fn); return; } } else - if (bytes(fp, off)) + if (bytes(fp, fn, off)) return; break; case RLINES: if (S_ISREG(sbp->st_mode)) if (!off) { if (fseeko(fp, (off_t)0, SEEK_END) == -1) { - ierr(); + ierr(fn); return; } } else - rlines(fp, off, sbp); +
svn commit: r195028 - head
Author: dougb Date: Fri Jun 26 01:10:10 2009 New Revision: 195028 URL: http://svn.freebsd.org/changeset/base/195028 Log: Revert the entry about pf and ipfw starting before netif Modified: head/UPDATING Modified: head/UPDATING == --- head/UPDATING Fri Jun 26 01:08:35 2009(r195027) +++ head/UPDATING Fri Jun 26 01:10:10 2009(r195028) @@ -80,12 +80,6 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. rebuilt. Bump __FreeBSD_version to 800096. -20090531: - For those who use ipfw and especially pf, those two firewalls - are now started BEFORE the network is initialized (i.e., before - rc.d/netif). Please review your rules to make sure that your - interfaces will be properly described. - 20090530: Remove the tunable/sysctl debug.mpsafevfs as its initial purpose is no more valid. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195029 - head/etc
Author: dougb Date: Fri Jun 26 01:27:16 2009 New Revision: 195029 URL: http://svn.freebsd.org/changeset/base/195029 Log: rtsol should not be run on the wireless NIC interfaces directly, it will run on wlan0 instead. Modified: head/etc/network.subr Modified: head/etc/network.subr == --- head/etc/network.subr Fri Jun 26 01:10:10 2009(r195028) +++ head/etc/network.subr Fri Jun 26 01:27:16 2009(r195029) @@ -863,6 +863,9 @@ network6_interface_setup() case ${i} in lo0|gif[0-9]*|stf[0-9]*|faith[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*|pflog[0-9]*|pfsync[0-9]*) ;; + # Wireless NIC cards are virtualized through the wlan interface + an[0-9]*|ath[0-9]*|ipw[0-9]*|iwi[0-9]*|iwn[0-9]*|ral[0-9]*|wi[0-9]*|wl[0-9]*|wpi[0-9]*) + ;; *) rtsol_interfaces="${rtsol_interfaces} ${i}" ;; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195031 - head/sys/compat/ndis
Author: weongyo Date: Fri Jun 26 01:42:41 2009 New Revision: 195031 URL: http://svn.freebsd.org/changeset/base/195031 Log: provides a extra write buffer when the NDIS driver want to send a request whose body has some datas through the default pipe. Tested by:Nikos Vassiliadis Modified: head/sys/compat/ndis/subr_usbd.c Modified: head/sys/compat/ndis/subr_usbd.c == --- head/sys/compat/ndis/subr_usbd.cFri Jun 26 01:27:31 2009 (r195030) +++ head/sys/compat/ndis/subr_usbd.cFri Jun 26 01:42:41 2009 (r195031) @@ -82,10 +82,11 @@ static usb_callback_t usbd_ctrl_callback #defineUSBD_CTRL_WRITE_PIPE1 #defineUSBD_CTRL_MAX_PIPE 2 #defineUSBD_CTRL_READ_BUFFER_SP256 +#defineUSBD_CTRL_WRITE_BUFFER_SP 256 #defineUSBD_CTRL_READ_BUFFER_SIZE \ (sizeof(struct usb_device_request) + USBD_CTRL_READ_BUFFER_SP) #defineUSBD_CTRL_WRITE_BUFFER_SIZE \ - (sizeof(struct usb_device_request)) + (sizeof(struct usb_device_request) + USBD_CTRL_WRITE_BUFFER_SP) static struct usb_config usbd_default_epconfig[USBD_CTRL_MAX_PIPE] = { [USBD_CTRL_READ_PIPE] = { .type = UE_CONTROL, @@ -1065,7 +1066,7 @@ next: vcreq->uvc_trans_buflen)); usbd_xfer_set_frames(xfer, 2); } else { - if (nx->nx_urblen > 0) + if (nx->nx_urblen > USBD_CTRL_WRITE_BUFFER_SP) device_printf(sc->ndis_dev, "warning: not enough write buffer space" " (%d).\n", nx->nx_urblen); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r195029 - head/etc
Doug Barton wrote: Author: dougb Date: Fri Jun 26 01:27:16 2009 New Revision: 195029 URL: http://svn.freebsd.org/changeset/base/195029 Log: rtsol should not be run on the wireless NIC interfaces directly, it will run on wlan0 instead. Modified: head/etc/network.subr Modified: head/etc/network.subr == --- head/etc/network.subr Fri Jun 26 01:10:10 2009(r195028) +++ head/etc/network.subr Fri Jun 26 01:27:16 2009(r195029) @@ -863,6 +863,9 @@ network6_interface_setup() case ${i} in lo0|gif[0-9]*|stf[0-9]*|faith[0-9]*|lp[0-9]*|sl[0-9]*|tun[0-9]*|pflog[0-9]*|pfsync[0-9]*) ;; + # Wireless NIC cards are virtualized through the wlan interface + an[0-9]*|ath[0-9]*|ipw[0-9]*|iwi[0-9]*|iwn[0-9]*|ral[0-9]*|wi[0-9]*|wl[0-9]*|wpi[0-9]*) + ;; *) rtsol_interfaces="${rtsol_interfaces} ${i}" ;; Using device names is a bad idea. Take a look at wpa_supplicant (for example) for how to check the media status to determine whether a device is wireless. Sam ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r194930 - in head: sbin/ipfw sys/netinet sys/netinet/ipfw
On Thu, 25 Jun 2009, Oleg Bulyzhin wrote: On Wed, Jun 24, 2009 at 07:44:04PM -0400, Ben Kaduk wrote: There's a grammar error and a style error, here. I'm actually not entirely sure what the intended meaning is, so it's a bit hard to fix the grammar error. It's no wonder - my english writing skill is poor. Looking at the code, it seems that in burst mode, extra data will be allowed to be sent, though it is capped to not exceed the pipe bandwidth. Perhaps "... bytes of data is allowed to bypass the dummynet scheduler (...), though the transmission rate will still be capped so as to not exceed the pipe's bandwidth."? Let me explain. For example, we have pipe with bw 1Mbit/s and burst size is 5GByte. If we try to download 10Gbyte through this pipe following will happen: 1) 1st 5Gbyte of data will go with 'wire speed'. 2) last 5Gbyte will be shaped to 1Mbit/s Could you please mail me whole 'burst' part (as it should be), and i will fix it. I think the following will suffice: .It Cm burst Ar size If the data to be sent exceeds the pipe's bandwidth limit (and the pipe was previously idle), up to .Ar size bytes of data are allowed to bypass the .Nm dummynet scheduler, and will be sent as fast as the physical link allows. Any additional data will be transmitted at the rate specified by the .Nm pipe bandwidth. The burst size depends on how long the pipe has been idle; the effective burst size is calculated as follows: MAX( .Ar size , .Nm bw * pipe_idle_time). .Pp The mdoc police may need to correct my markup. The style error is that the new sentence ("Effective burst size ...") should start on a new line. I would also prefer to see the new sentence be an actual complete sentence (i.e., "The effective burst size is calculated as follows"), though there appears to be at least one other bug of this form in the file already (see, for example, the quoted text at the beginning of this hunk: "Default value is no delay.", which would benefit from a "the".) Unrelated to this commit, there is a grammar error early in the file: 312 Once 313 .Fl p 314 has been specified, any additional arguments as passed on to the preproc essor 315 for interpretation. The 'as' in line 314 should be 'are'. (This is from CVS r1.220, so the line numbers may not be current.) I will submit a doc PR about the other issues. Thanks for taking care of this! -Ben Kaduk ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
Re: svn commit: r195029 - head/etc
Sam Leffler wrote: > Using device names is a bad idea. Take a look at wpa_supplicant (for > example) for how to check the media status to determine whether a device > is wireless. I agree that it's not optimal, and I would prefer a dynamic solution as opposed to a static one. What mechanism would you suggest that would be available to a shell script relatively early in the boot process? Doug ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"
svn commit: r195033 - in head/sys: amd64/include arm/include i386/include ia64/include kern mips/include powerpc/include sparc64/include sun4v/include sun4v/sun4v vm
Author: alc Date: Fri Jun 26 04:47:43 2009 New Revision: 195033 URL: http://svn.freebsd.org/changeset/base/195033 Log: This change is the next step in implementing the cache control functionality required by video card drivers. Specifically, this change introduces vm_cache_mode_t with an appropriate VM_CACHE_DEFAULT definition on all architectures. In addition, this changes adds a vm_cache_mode_t parameter to kmem_alloc_contig() and vm_phys_alloc_contig(). These will be the interfaces for allocating mapped kernel memory and physical memory, respectively, with non-default cache modes. In collaboration with:jhb Added: head/sys/amd64/include/vm.h (contents, props changed) head/sys/arm/include/vm.h (contents, props changed) head/sys/i386/include/vm.h (contents, props changed) head/sys/ia64/include/vm.h (contents, props changed) head/sys/mips/include/vm.h (contents, props changed) head/sys/powerpc/include/vm.h (contents, props changed) head/sys/sparc64/include/vm.h (contents, props changed) head/sys/sun4v/include/vm.h (contents, props changed) Modified: head/sys/kern/kern_mbuf.c head/sys/sun4v/sun4v/pmap.c head/sys/vm/vm.h head/sys/vm/vm_contig.c head/sys/vm/vm_extern.h head/sys/vm/vm_phys.c head/sys/vm/vm_phys.h Added: head/sys/amd64/include/vm.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/amd64/include/vm.h Fri Jun 26 04:47:43 2009(r195033) @@ -0,0 +1,45 @@ +/*- + * Copyright (c) 2009 Advanced Computing Technologies LLC + * Written by: John H. Baldwin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_VM_H_ +#define_MACHINE_VM_H_ + +#include + +/* Cache control options. */ +#defineVM_CACHE_UNCACHEABLE ((vm_cache_mode_t)PAT_UNCACHEABLE) +#defineVM_CACHE_WRITE_COMBINING ((vm_cache_mode_t)PAT_WRITE_COMBINING) +#defineVM_CACHE_WRITE_THROUGH ((vm_cache_mode_t)PAT_WRITE_THROUGH) +#defineVM_CACHE_WRITE_PROTECTED ((vm_cache_mode_t)PAT_WRITE_PROTECTED) +#defineVM_CACHE_WRITE_BACK ((vm_cache_mode_t)PAT_WRITE_BACK) +#defineVM_CACHE_UNCACHED ((vm_cache_mode_t)PAT_UNCACHED) + +#defineVM_CACHE_DEFAULTVM_CACHE_WRITE_BACK + +#endif /* !_MACHINE_PMAP_H_ */ Added: head/sys/arm/include/vm.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/include/vm.h Fri Jun 26 04:47:43 2009(r195033) @@ -0,0 +1,35 @@ +/*- + * Copyright (c) 2009 Alan L. Cox + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +