svn commit: r284106 - head/bin/cp
Author: bdrewery Date: Sun Jun 7 06:30:25 2015 New Revision: 284106 URL: https://svnweb.freebsd.org/changeset/base/284106 Log: Implement '-s' to copy as symlink, similar to the current -l link(2) handling. This is also implemented in at least GNU coreutils cp. While here also improve the '-l' handling to not open(2) the source file as it does not actually need the descriptor. Sponsored by: EMC / Isilon Storage Division Modified: head/bin/cp/cp.1 head/bin/cp/cp.c head/bin/cp/extern.h head/bin/cp/utils.c Modified: head/bin/cp/cp.1 == --- head/bin/cp/cp.1Sun Jun 7 03:49:41 2015(r284105) +++ head/bin/cp/cp.1Sun Jun 7 06:30:25 2015(r284106) @@ -32,7 +32,7 @@ .\"@(#)cp.18.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd March 15, 2013 +.Dd June 6, 2015 .Dt CP 1 .Os .Sh NAME @@ -45,7 +45,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpvx +.Op Fl alpsvx .Ar source_file target_file .Nm .Oo @@ -53,7 +53,7 @@ .Op Fl H | Fl L | Fl P .Oc .Op Fl f | i | n -.Op Fl alpvx +.Op Fl alpsvx .Ar source_file ... target_directory .Sh DESCRIPTION In the first synopsis form, the @@ -179,6 +179,8 @@ If the source file has both its set-user and either the user ID or group ID cannot be preserved, neither the set-user-ID nor set-group-ID bits are preserved in the copy's permissions. +.It Fl s +Create symbolic links to regular files in a hierarchy instead of copying. .It Fl v Cause .Nm @@ -298,7 +300,10 @@ differ as they copy special files as nor files while recreating a hierarchy. .Pp The -.Fl v +.Fl l, +.Fl s, +.Fl v, +.Fl x and .Fl n options are non-standard and their use in scripts is not recommended. Modified: head/bin/cp/cp.c == --- head/bin/cp/cp.cSun Jun 7 03:49:41 2015(r284105) +++ head/bin/cp/cp.cSun Jun 7 06:30:25 2015(r284106) @@ -83,7 +83,7 @@ static char emptystring[] = ""; PATH_T to = { to.p_path, emptystring, "" }; -int fflag, iflag, lflag, nflag, pflag, vflag; +int fflag, iflag, lflag, nflag, pflag, sflag, vflag; static int Rflag, rflag; volatile sig_atomic_t info; @@ -102,7 +102,7 @@ main(int argc, char *argv[]) fts_options = FTS_NOCHDIR | FTS_PHYSICAL; Hflag = Lflag = 0; - while ((ch = getopt(argc, argv, "HLPRafilnprvx")) != -1) + while ((ch = getopt(argc, argv, "HLPRafilnprsvx")) != -1) switch (ch) { case 'H': Hflag = 1; @@ -145,6 +145,9 @@ main(int argc, char *argv[]) rflag = Lflag = 1; Hflag = 0; break; + case 's': + sflag = 1; + break; case 'v': vflag = 1; break; @@ -163,6 +166,8 @@ main(int argc, char *argv[]) if (Rflag && rflag) errx(1, "the -R and -r options may not be specified together"); + if (lflag && sflag) + errx(1, "the -l and -s options may not be specified together"); if (rflag) Rflag = 1; if (Rflag) { @@ -452,7 +457,7 @@ copy(char *argv[], enum op type, int fts break; case S_IFBLK: case S_IFCHR: - if (Rflag) { + if (Rflag && !sflag) { if (copy_special(curr->fts_statp, !dne)) badcp = rval = 1; } else { @@ -465,7 +470,7 @@ copy(char *argv[], enum op type, int fts curr->fts_path); break; case S_IFIFO: - if (Rflag) { + if (Rflag && !sflag) { if (copy_fifo(curr->fts_statp, !dne)) badcp = rval = 1; } else { Modified: head/bin/cp/extern.h == --- head/bin/cp/extern.hSun Jun 7 03:49:41 2015(r284105) +++ head/bin/cp/extern.hSun Jun 7 06:30:25 2015(r284106) @@ -37,7 +37,7 @@ typedef struct { } PATH_T; extern PATH_T to; -extern int fflag, iflag, lflag, nflag, pflag, vflag; +extern int fflag, iflag, lflag, nflag, pflag, sflag, vflag; extern volatile sig_atomic_t info; __BEGIN_DECLS Modified: head/bin/cp/utils.c == --- head/bin/cp/utils.c Sun Jun 7 03:49:41 2015(r284105) +++ head/bin/cp/utils.c Sun Jun 7 06:30:25 2015(r284106) @@ -77,13 +77,15 @@ copy_file(const FTSENT *entp, int dne) ssize_t wcount; size_t wresid; off_t wtotal; - i
svn commit: r284105 - head/bin/cp
Author: bdrewery Date: Sun Jun 7 03:49:41 2015 New Revision: 284105 URL: https://svnweb.freebsd.org/changeset/base/284105 Log: Cleanup some indentation issues. Modified: head/bin/cp/utils.c Modified: head/bin/cp/utils.c == --- head/bin/cp/utils.c Sat Jun 6 22:03:24 2015(r284104) +++ head/bin/cp/utils.c Sun Jun 7 03:49:41 2015(r284105) @@ -122,18 +122,17 @@ copy_file(const FTSENT *entp, int dne) /* remove existing destination file name, * create a new file */ (void)unlink(to.p_path); - if (!lflag) + if (!lflag) { to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, fs->st_mode & ~(S_ISUID | S_ISGID)); - } else { - if (!lflag) - /* overwrite existing destination file name */ - to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); - } - } else { - if (!lflag) - to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, - fs->st_mode & ~(S_ISUID | S_ISGID)); + } + } else if (!lflag) { + /* overwrite existing destination file name */ + to_fd = open(to.p_path, O_WRONLY | O_TRUNC, 0); + } + } else if (!lflag) { + to_fd = open(to.p_path, O_WRONLY | O_TRUNC | O_CREAT, + fs->st_mode & ~(S_ISUID | S_ISGID)); } if (to_fd == -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: r284087 - head/sys/modules
> On Jun 6, 2015, at 11:19 AM, John Baldwin wrote: > > On Saturday, June 06, 2015 05:08:07 PM Warner Losh wrote: >> Author: imp >> Date: Sat Jun 6 17:08:06 2015 >> New Revision: 284087 >> URL: https://svnweb.freebsd.org/changeset/base/284087 >> >> Log: >> Turns out amd64 is hit too by ix. When it works, turn it back on. > > Can you post your errors? It builds fine for me and Jenkins hasn't been > reporting any build errors since yesterday afternoon/evening. Will do. it was very consistent, even after refreshing my tree. I’ll investigate more. Warner signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r284104 - in head/sys: amd64/amd64 amd64/include i386/i386 i386/include x86/x86
Author: kib Date: Sat Jun 6 22:03:24 2015 New Revision: 284104 URL: https://svnweb.freebsd.org/changeset/base/284104 Log: Update print_INTEL_TLB() by the tag values from the Intel SDM rev. 55. The modern CPUs cache and TLB descriptions looked quite questionable without the update, e.g. Haswell i7 4770S reported: Data TLB: 4 KB pages, 4-way set associative, 64 entries L2 cache: 256 kbytes, 8-way associative, 64 bytes/line After the update, the report is: Data TLB: 1 GByte pages, 4-way set associative, 4 entries Data TLB: 4 KB pages, 4-way set associative, 64 entries Instruction TLB: 2M/4M pages, fully associative, 8 entries Instruction TLB: 4KByte pages, 8-way set associative, 64 entries 64-Byte prefetching Shared 2nd-Level TLB: 4 KByte/2MByte pages, 8-way associative, 1024 entries L2 cache: 256 kbytes, 8-way associative, 64 bytes/line Some tags were apparently removed from the table 3-21, Vol. 2A. Keep them around, but add a comment stating the removal. Update the format line for cpu_stdext_feature according to the bits from the SDM rev.55. It appears that Haswells do not store %cs and %ds values in the FPU save area. Store content of the %ecx register from the CPUID leaf 0x7 subleaf 0 as cpu_stdext_feature2 and print defined bits from it, again acording to SDM rev. 55. Sponsored by: The FreeBSD Foundation MFC after:1 week Modified: head/sys/amd64/amd64/initcpu.c head/sys/amd64/include/md_var.h head/sys/i386/i386/initcpu.c head/sys/i386/include/md_var.h head/sys/x86/x86/identcpu.c Modified: head/sys/amd64/amd64/initcpu.c == --- head/sys/amd64/amd64/initcpu.c Sat Jun 6 21:52:46 2015 (r284103) +++ head/sys/amd64/amd64/initcpu.c Sat Jun 6 22:03:24 2015 (r284104) @@ -74,6 +74,7 @@ u_int cpu_fxsr; /* SSE enabled */ u_int cpu_mxcsr_mask; /* Valid bits in mxcsr */ u_int cpu_clflush_line_size = 32; u_int cpu_stdext_feature; +u_int cpu_stdext_feature2; u_int cpu_max_ext_state_size; u_int cpu_mon_mwait_flags;/* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ Modified: head/sys/amd64/include/md_var.h == --- head/sys/amd64/include/md_var.h Sat Jun 6 21:52:46 2015 (r284103) +++ head/sys/amd64/include/md_var.h Sat Jun 6 22:03:24 2015 (r284104) @@ -49,6 +49,7 @@ externu_int via_feature_rng; extern u_int via_feature_xcrypt; extern u_int cpu_clflush_line_size; extern u_int cpu_stdext_feature; +extern u_int cpu_stdext_feature2; extern u_int cpu_fxsr; extern u_int cpu_high; extern u_int cpu_id; Modified: head/sys/i386/i386/initcpu.c == --- head/sys/i386/i386/initcpu.cSat Jun 6 21:52:46 2015 (r284103) +++ head/sys/i386/i386/initcpu.cSat Jun 6 22:03:24 2015 (r284104) @@ -102,6 +102,7 @@ u_int cpu_mxcsr_mask; /* Valid bits in #endif u_int cpu_clflush_line_size = 32; u_int cpu_stdext_feature; +u_int cpu_stdext_feature2; u_int cpu_max_ext_state_size; u_int cpu_mon_mwait_flags;/* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ Modified: head/sys/i386/include/md_var.h == --- head/sys/i386/include/md_var.h Sat Jun 6 21:52:46 2015 (r284103) +++ head/sys/i386/include/md_var.h Sat Jun 6 22:03:24 2015 (r284104) @@ -49,6 +49,7 @@ externu_int via_feature_rng; extern u_int via_feature_xcrypt; extern u_int cpu_clflush_line_size; extern u_int cpu_stdext_feature; +extern u_int cpu_stdext_feature2; extern u_int cpu_fxsr; extern u_int cpu_high; extern u_int cpu_id; Modified: head/sys/x86/x86/identcpu.c == --- head/sys/x86/x86/identcpu.c Sat Jun 6 21:52:46 2015(r284103) +++ head/sys/x86/x86/identcpu.c Sat Jun 6 22:03:24 2015(r284104) @@ -903,6 +903,9 @@ printcpuinfo(void) "\013INVPCID" /* Restricted Transactional Memory */ "\014RTM" + "\015PQM" + "\016NFPUSG" + "\020PQE" /* Intel Memory Protection Extensions */ "\017MPX" /* AVX512 Foundation */ @@ -922,6 +925,16 @@ printcpuinfo(void) )
svn commit: r284103 - head/sys/arm64/arm64
Author: andrew Date: Sat Jun 6 21:52:46 2015 New Revision: 284103 URL: https://svnweb.freebsd.org/changeset/base/284103 Log: Rework exception entry to help with DTrace. We now store the stack pointer before adjusting it to store any registers. This is needed as DTrace may need to adjust the kernel stack pointer, and previously the new stack pointer would have needed to be checked incase it was changed. Modified: head/sys/arm64/arm64/exception.S Modified: head/sys/arm64/arm64/exception.S == --- head/sys/arm64/arm64/exception.SSat Jun 6 21:11:17 2015 (r284102) +++ head/sys/arm64/arm64/exception.SSat Jun 6 21:52:46 2015 (r284103) @@ -33,6 +33,9 @@ __FBSDID("$FreeBSD$"); .text .macro save_registers el +.if \el == 1 + mov x18, sp +.endif stp x28, x29, [sp, #-16]! stp x26, x27, [sp, #-16]! stp x24, x25, [sp, #-16]! @@ -51,22 +54,20 @@ __FBSDID("$FreeBSD$"); mrs x10, elr_el1 mrs x11, spsr_el1 .if \el == 0 - mrs x12, sp_el0 -.else - mov x12, sp + mrs x18, sp_el0 .endif stp x10, x11, [sp, #-16]! - stp x12, lr, [sp, #-16]! + stp x18, lr, [sp, #-16]! mrs x18, tpidr_el1 .endm .macro restore_registers el - ldp x12, lr, [sp], #16 + msr daifset, #2 /* Disable interrupts, x18 may change +* in the interrupt exception handler */ + ldp x18, lr, [sp], #16 ldp x10, x11, [sp], #16 .if \el == 0 - msr sp_el0, x12 -.else - mov sp, x12 + msr sp_el0, x18 .endif msr spsr_el1, x11 msr elr_el1, x10 @@ -89,6 +90,10 @@ __FBSDID("$FreeBSD$"); ldp x24, x25, [sp], #16 ldp x26, x27, [sp], #16 ldp x28, x29, [sp], #16 +.if \el == 1 + mov sp, x18 + mrs x18, tpidr_el1 +.endif .endm .macro do_ast ___ 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: r284102 - head/release/arm
Author: gjb Date: Sat Jun 6 21:11:17 2015 New Revision: 284102 URL: https://svnweb.freebsd.org/changeset/base/284102 Log: Set the correct UBLDR_LOADADDR for the Wandboard and Cubox/Hummingboard images. Submitted by: ian MFC after:3 days Sponsored by: The FreeBSD Foundation Modified: head/release/arm/CUBOX-HUMMINGBOARD.conf head/release/arm/WANDBOARD.conf Modified: head/release/arm/CUBOX-HUMMINGBOARD.conf == --- head/release/arm/CUBOX-HUMMINGBOARD.confSat Jun 6 20:54:41 2015 (r284101) +++ head/release/arm/CUBOX-HUMMINGBOARD.confSat Jun 6 21:11:17 2015 (r284102) @@ -8,7 +8,7 @@ EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-cubox-hummingboard" KERNEL="IMX6" -WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x1100" +WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x1200" IMAGE_SIZE="1G" PART_SCHEME="MBR" FAT_SIZE="50m -b 16384" Modified: head/release/arm/WANDBOARD.conf == --- head/release/arm/WANDBOARD.conf Sat Jun 6 20:54:41 2015 (r284101) +++ head/release/arm/WANDBOARD.conf Sat Jun 6 21:11:17 2015 (r284102) @@ -8,7 +8,7 @@ EMBEDDED_TARGET="arm" EMBEDDED_TARGET_ARCH="armv6" EMBEDDEDPORTS="sysutils/u-boot-wandboard" KERNEL="IMX6" -WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x1100" +WORLD_FLAGS="${WORLD_FLAGS} UBLDR_LOADADDR=0x1200" IMAGE_SIZE="1G" PART_SCHEME="MBR" FAT_SIZE="50m -b 16384" ___ 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: r284101 - stable/10/sys/fs/nfsclient
Author: rmacklem Date: Sat Jun 6 20:54:41 2015 New Revision: 284101 URL: https://svnweb.freebsd.org/changeset/base/284101 Log: MFC: r283330 The NFS client generated directory block(s) with d_fileno == 0 so that it would not return less data than requested. Since returning less directory data than requested is not a problem for FreeBSD and even UFS no longer returns directory structures with d_fileno == 0, this patch stops the client from doing this. Although entries with d_fileno == 0 should not be a problem, the man pages no longer document that these entries should be ignored, so there was a concern that these entries might be an issue in the future. Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/nfsclient/nfs_clrpcops.c == --- stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 6 20:37:40 2015 (r284100) +++ stable/10/sys/fs/nfsclient/nfs_clrpcops.c Sat Jun 6 20:54:41 2015 (r284101) @@ -3070,25 +3070,6 @@ nfsrpc_readdir(vnode_t vp, struct uio *u *eofp = eof; } - /* -* Add extra empty records to any remaining DIRBLKSIZ chunks. -*/ - while (uio_uio_resid(uiop) > 0 && ((size_t)(uio_uio_resid(uiop))) != tresid) { - dp = (struct dirent *) CAST_DOWN(caddr_t, uio_iov_base(uiop)); - dp->d_type = DT_UNKNOWN; - dp->d_fileno = 0; - dp->d_namlen = 0; - dp->d_name[0] = '\0'; - tl = (u_int32_t *)&dp->d_name[4]; - *tl++ = cookie.lval[0]; - *tl = cookie.lval[1]; - dp->d_reclen = DIRBLKSIZ; - uio_iov_base_add(uiop, DIRBLKSIZ); - uio_iov_len_add(uiop, -(DIRBLKSIZ)); - uio_uio_resid_add(uiop, -(DIRBLKSIZ)); - uiop->uio_offset += DIRBLKSIZ; - } - nfsmout: if (nd->nd_mrep != NULL) mbuf_freem(nd->nd_mrep); @@ -3563,25 +3544,6 @@ nfsrpc_readdirplus(vnode_t vp, struct ui *eofp = eof; } - /* -* Add extra empty records to any remaining DIRBLKSIZ chunks. -*/ - while (uio_uio_resid(uiop) > 0 && uio_uio_resid(uiop) != tresid) { - dp = (struct dirent *)uio_iov_base(uiop); - dp->d_type = DT_UNKNOWN; - dp->d_fileno = 0; - dp->d_namlen = 0; - dp->d_name[0] = '\0'; - tl = (u_int32_t *)&dp->d_name[4]; - *tl++ = cookie.lval[0]; - *tl = cookie.lval[1]; - dp->d_reclen = DIRBLKSIZ; - uio_iov_base_add(uiop, DIRBLKSIZ); - uio_iov_len_add(uiop, -(DIRBLKSIZ)); - uio_uio_resid_add(uiop, -(DIRBLKSIZ)); - uiop->uio_offset += DIRBLKSIZ; - } - nfsmout: if (nd->nd_mrep != NULL) mbuf_freem(nd->nd_mrep); ___ 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: r284100 - in stable: 10/sys/vm 9/sys/vm
Author: jhb Date: Sat Jun 6 20:37:40 2015 New Revision: 284100 URL: https://svnweb.freebsd.org/changeset/base/284100 Log: MFC 261811,282660,282706: Place VM objects on the object list when created and never remove them. 261811: Fix function name in KASSERT(). 282660: Place VM objects on the object list when created and never remove them. This is ok since objects come from a NOFREE zone and allows objects to be locked while traversing the object list without triggering a LOR. Ensure that objects on the list are marked DEAD while free or stillborn, and that they have a refcount of zero. This required updating most of the pagers to explicitly mark an object as dead when deallocating it. (Only the vnode pager did this previously.) 282706: Satisfy vm_object uma zone destructor requirements after r282660 when vnode object creation raced. Modified: stable/9/sys/vm/default_pager.c stable/9/sys/vm/device_pager.c stable/9/sys/vm/phys_pager.c stable/9/sys/vm/sg_pager.c stable/9/sys/vm/swap_pager.c stable/9/sys/vm/vm_meter.c stable/9/sys/vm/vm_object.c stable/9/sys/vm/vnode_pager.c Directory Properties: stable/9/sys/ (props changed) Changes in other areas also in this revision: Modified: stable/10/sys/vm/default_pager.c stable/10/sys/vm/device_pager.c stable/10/sys/vm/phys_pager.c stable/10/sys/vm/sg_pager.c stable/10/sys/vm/swap_pager.c stable/10/sys/vm/vm_meter.c stable/10/sys/vm/vm_object.c stable/10/sys/vm/vnode_pager.c Directory Properties: stable/10/ (props changed) Modified: stable/9/sys/vm/default_pager.c == --- stable/9/sys/vm/default_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/default_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -113,6 +113,7 @@ default_pager_dealloc(object) /* * OBJT_DEFAULT objects have no special resources allocated to them. */ + object->type = OBJT_DEAD; } /* Modified: stable/9/sys/vm/device_pager.c == --- stable/9/sys/vm/device_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/device_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -249,6 +249,8 @@ dev_pager_dealloc(object) != NULL) dev_pager_free_page(object, m); } + object->handle = NULL; + object->type = OBJT_DEAD; } static int Modified: stable/9/sys/vm/phys_pager.c == --- stable/9/sys/vm/phys_pager.cSat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/phys_pager.cSat Jun 6 20:37:40 2015 (r284100) @@ -129,6 +129,8 @@ phys_pager_dealloc(vm_object_t object) mtx_unlock(&phys_pager_mtx); VM_OBJECT_LOCK(object); } + object->handle = NULL; + object->type = OBJT_DEAD; } /* Modified: stable/9/sys/vm/sg_pager.c == --- stable/9/sys/vm/sg_pager.c Sat Jun 6 20:14:58 2015(r284099) +++ stable/9/sys/vm/sg_pager.c Sat Jun 6 20:37:40 2015(r284100) @@ -128,6 +128,8 @@ sg_pager_dealloc(vm_object_t object) sg = object->handle; sglist_free(sg); + object->handle = NULL; + object->type = OBJT_DEAD; } static int Modified: stable/9/sys/vm/swap_pager.c == --- stable/9/sys/vm/swap_pager.cSat Jun 6 20:14:58 2015 (r284099) +++ stable/9/sys/vm/swap_pager.cSat Jun 6 20:37:40 2015 (r284100) @@ -685,6 +685,8 @@ swap_pager_dealloc(vm_object_t object) * if paging is still in progress on some objects. */ swp_pager_meta_free_all(object); + object->handle = NULL; + object->type = OBJT_DEAD; } / Modified: stable/9/sys/vm/vm_meter.c == --- stable/9/sys/vm/vm_meter.c Sat Jun 6 20:14:58 2015(r284099) +++ stable/9/sys/vm/vm_meter.c Sat Jun 6 20:37:40 2015(r284100) @@ -110,14 +110,7 @@ vmtotal(SYSCTL_HANDLER_ARGS) */ mtx_lock(&vm_object_list_mtx); TAILQ_FOREACH(object, &vm_object_list, object_list) { - if (!VM_OBJECT_TRYLOCK(object)) { - /* -* Avoid a lock-order reversal. Consequently, -* the reported number of active pages may be -* greater than the actual number. -*/ - continue; - } + VM_OBJECT_LOCK(object); vm_object_clea
svn commit: r284100 - in stable: 10/sys/vm 9/sys/vm
Author: jhb Date: Sat Jun 6 20:37:40 2015 New Revision: 284100 URL: https://svnweb.freebsd.org/changeset/base/284100 Log: MFC 261811,282660,282706: Place VM objects on the object list when created and never remove them. 261811: Fix function name in KASSERT(). 282660: Place VM objects on the object list when created and never remove them. This is ok since objects come from a NOFREE zone and allows objects to be locked while traversing the object list without triggering a LOR. Ensure that objects on the list are marked DEAD while free or stillborn, and that they have a refcount of zero. This required updating most of the pagers to explicitly mark an object as dead when deallocating it. (Only the vnode pager did this previously.) 282706: Satisfy vm_object uma zone destructor requirements after r282660 when vnode object creation raced. Modified: stable/10/sys/vm/default_pager.c stable/10/sys/vm/device_pager.c stable/10/sys/vm/phys_pager.c stable/10/sys/vm/sg_pager.c stable/10/sys/vm/swap_pager.c stable/10/sys/vm/vm_meter.c stable/10/sys/vm/vm_object.c stable/10/sys/vm/vnode_pager.c Directory Properties: stable/10/ (props changed) Changes in other areas also in this revision: Modified: stable/9/sys/vm/default_pager.c stable/9/sys/vm/device_pager.c stable/9/sys/vm/phys_pager.c stable/9/sys/vm/sg_pager.c stable/9/sys/vm/swap_pager.c stable/9/sys/vm/vm_meter.c stable/9/sys/vm/vm_object.c stable/9/sys/vm/vnode_pager.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/10/sys/vm/default_pager.c == --- stable/10/sys/vm/default_pager.cSat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/default_pager.cSat Jun 6 20:37:40 2015 (r284100) @@ -113,6 +113,7 @@ default_pager_dealloc(object) /* * OBJT_DEFAULT objects have no special resources allocated to them. */ + object->type = OBJT_DEAD; } /* Modified: stable/10/sys/vm/device_pager.c == --- stable/10/sys/vm/device_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/device_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -252,6 +252,8 @@ dev_pager_dealloc(object) != NULL) dev_pager_free_page(object, m); } + object->handle = NULL; + object->type = OBJT_DEAD; } static int Modified: stable/10/sys/vm/phys_pager.c == --- stable/10/sys/vm/phys_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/phys_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -131,6 +131,8 @@ phys_pager_dealloc(vm_object_t object) mtx_unlock(&phys_pager_mtx); VM_OBJECT_WLOCK(object); } + object->handle = NULL; + object->type = OBJT_DEAD; } /* Modified: stable/10/sys/vm/sg_pager.c == --- stable/10/sys/vm/sg_pager.c Sat Jun 6 20:14:58 2015(r284099) +++ stable/10/sys/vm/sg_pager.c Sat Jun 6 20:37:40 2015(r284100) @@ -130,6 +130,8 @@ sg_pager_dealloc(vm_object_t object) sg = object->handle; sglist_free(sg); + object->handle = NULL; + object->type = OBJT_DEAD; } static int Modified: stable/10/sys/vm/swap_pager.c == --- stable/10/sys/vm/swap_pager.c Sat Jun 6 20:14:58 2015 (r284099) +++ stable/10/sys/vm/swap_pager.c Sat Jun 6 20:37:40 2015 (r284100) @@ -693,6 +693,8 @@ swap_pager_dealloc(vm_object_t object) * if paging is still in progress on some objects. */ swp_pager_meta_free_all(object); + object->handle = NULL; + object->type = OBJT_DEAD; } / Modified: stable/10/sys/vm/vm_meter.c == --- stable/10/sys/vm/vm_meter.c Sat Jun 6 20:14:58 2015(r284099) +++ stable/10/sys/vm/vm_meter.c Sat Jun 6 20:37:40 2015(r284100) @@ -111,14 +111,7 @@ vmtotal(SYSCTL_HANDLER_ARGS) */ mtx_lock(&vm_object_list_mtx); TAILQ_FOREACH(object, &vm_object_list, object_list) { - if (!VM_OBJECT_TRYWLOCK(object)) { - /* -* Avoid a lock-order reversal. Consequently, -* the reported number of active pages may be -* greater than the actual number. -*/ - continue; - } + VM_OBJECT_WLOCK(object); vm_ob
svn commit: r284099 - stable/10/sys/netinet
Author: ian Date: Sat Jun 6 20:14:58 2015 New Revision: 284099 URL: https://svnweb.freebsd.org/changeset/base/284099 Log: MFC r279236: Change struct attribute to avoid aligned operations mismatch Previous __alignment(4) allowed compiler to assume that operations are performed on aligned region. On ARM processor, this led to alignment fault Modified: stable/10/sys/netinet/ip.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netinet/ip.h == --- stable/10/sys/netinet/ip.h Sat Jun 6 20:01:06 2015(r284098) +++ stable/10/sys/netinet/ip.h Sat Jun 6 20:14:58 2015(r284099) @@ -67,7 +67,7 @@ struct ip { u_char ip_p; /* protocol */ u_short ip_sum; /* checksum */ struct in_addr ip_src,ip_dst; /* source and dest address */ -} __packed __aligned(4); +} __packed __aligned(2); #defineIP_MAXPACKET65535 /* maximum packet size */ ___ 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: r284098 - stable/10/sys/dev/cxgbe
Author: np Date: Sat Jun 6 20:01:06 2015 New Revision: 284098 URL: https://svnweb.freebsd.org/changeset/base/284098 Log: MFC r259150 (by adrian@) and r283864. r259150: Print out the full PCIe link negotiation during dmesg. I found this useful when checking whether a NIC is in a PCIE 3.0 8x slot or not. r283864: cxgbe: no need to display the per-lane GT/s rating of the pcie link. Modified: stable/10/sys/dev/cxgbe/t4_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_main.c == --- stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 19:43:41 2015 (r284097) +++ stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 20:01:06 2015 (r284098) @@ -906,9 +906,9 @@ t4_attach(device_t dev) } device_printf(dev, - "PCIe x%d, %d ports, %d %s interrupt%s, %d eq, %d iq\n", - sc->params.pci.width, sc->params.nports, sc->intr_count, - sc->intr_type == INTR_MSIX ? "MSI-X" : + "PCIe gen%d x%d, %d ports, %d %s interrupt%s, %d eq, %d iq\n", + sc->params.pci.speed, sc->params.pci.width, sc->params.nports, + sc->intr_count, sc->intr_type == INTR_MSIX ? "MSI-X" : (sc->intr_type == INTR_MSI ? "MSI" : "INTx"), sc->intr_count > 1 ? "s" : "", sc->sge.neq, sc->sge.niq); ___ 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: r284071 - head/libexec/atrun
Sweet, thanks! -a On 6 June 2015 at 12:47, Baptiste Daroussin wrote: > On Sat, Jun 06, 2015 at 12:09:36PM -0700, Adrian Chadd wrote: >> bad bapt, bad bapt. >> > Yeah I forgot bloody gcc 4.2 does yell at things a more recent gcc does not > yell > at... > > I fixed another one I have buildworld finishing on mips now > > Best regards, > Bapt ___ 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: r284071 - head/libexec/atrun
On Sat, Jun 06, 2015 at 12:09:36PM -0700, Adrian Chadd wrote: > bad bapt, bad bapt. > Yeah I forgot bloody gcc 4.2 does yell at things a more recent gcc does not yell at... I fixed another one I have buildworld finishing on mips now Best regards, Bapt pgpuJ5PheuXoL.pgp Description: PGP signature
svn commit: r284097 - head/usr.bin/mkstr
Author: bapt Date: Sat Jun 6 19:43:41 2015 New Revision: 284097 URL: https://svnweb.freebsd.org/changeset/base/284097 Log: Readd the warning level gcc 4.2 still complains Modified: head/usr.bin/mkstr/Makefile Modified: head/usr.bin/mkstr/Makefile == --- head/usr.bin/mkstr/Makefile Sat Jun 6 19:15:48 2015(r284096) +++ head/usr.bin/mkstr/Makefile Sat Jun 6 19:43:41 2015(r284097) @@ -3,4 +3,6 @@ PROG= mkstr +WARNS?=2 + .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"
svn commit: r284096 - in stable/10/sys: arm/conf modules/dtb/am335x
Author: ian Date: Sat Jun 6 19:15:48 2015 New Revision: 284096 URL: https://svnweb.freebsd.org/changeset/base/284096 Log: MFC r279824, r279827, r279825: Add a dtb module for AM335x systems (just Beaglebone right now). Remove the static DTB config and instead build modules/dtb/am335x. Also, remove WITHOUT_MODULES="ahc" which was added long ago to work around build problems that have long since been fixed correctly. Revert accidentally commited modules/Makefile file from r279824. Added: stable/10/sys/modules/dtb/am335x/ - copied from r279824, head/sys/modules/dtb/am335x/ Modified: stable/10/sys/arm/conf/BEAGLEBONE Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/BEAGLEBONE == --- stable/10/sys/arm/conf/BEAGLEBONE Sat Jun 6 19:15:08 2015 (r284095) +++ stable/10/sys/arm/conf/BEAGLEBONE Sat Jun 6 19:15:48 2015 (r284096) @@ -25,7 +25,7 @@ ident BEAGLEBONE include"../ti/am335x/std.am335x" -makeoptionsWITHOUT_MODULES="ahc" +makeoptionsMODULES_EXTRA="dtb/am335x" optionsHZ=100 optionsSCHED_4BSD # 4BSD scheduler @@ -158,5 +158,3 @@ device usfs # Flattened Device Tree optionsFDT # Configure using FDT/DTB data -optionsFDT_DTB_STATIC -makeoptionsFDT_DTS_FILE=beaglebone.dts ___ 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: r284095 - head/libexec/atrun
Author: adrian Date: Sat Jun 6 19:15:08 2015 New Revision: 284095 URL: https://svnweb.freebsd.org/changeset/base/284095 Log: Re-introduce this - it doesn't compile clean on a mips target (eg CARAMBOLA2.) Modified: head/libexec/atrun/Makefile Modified: head/libexec/atrun/Makefile == --- head/libexec/atrun/Makefile Sat Jun 6 18:49:02 2015(r284094) +++ head/libexec/atrun/Makefile Sat Jun 6 19:15:08 2015(r284095) @@ -14,6 +14,7 @@ CLEANFILES= ${MAN} CFLAGS+=-I${MAINSRC} -I${.CURDIR} CFLAGS+=-DLOGIN_CAP -DPAM +WARNS?=2 WFORMAT=0 LIBADD=pam util ___ 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: r284071 - head/libexec/atrun
bad bapt, bad bapt. -- >>> stage 4.4: building everything -- ===> lib (all) ===> libexec (all) ===> libexec/atrun (all) => lib/csu (all) ===> lib/csu/mips (all) cc1: warnings being treated as errors /usr/home/adrian/work/freebsd/head-embedded-2/src/libexec/atrun/atrun.c: In function 'run_file': /usr/home/adrian/work/freebsd/head-embedded-2/src/libexec/atrun/atrun.c:241: warning: comparison between signed and unsigned /usr/home/adrian/work/freebsd/head-embedded-2/src/libexec/atrun/atrun.c:245: warning: comparison between signed and unsigned -adrian On 6 June 2015 at 06:20, Baptiste Daroussin wrote: > Author: bapt > Date: Sat Jun 6 13:20:02 2015 > New Revision: 284071 > URL: https://svnweb.freebsd.org/changeset/base/284071 > > Log: > Remove WARNS atrun builds fine with clang and gcc > > Modified: > head/libexec/atrun/Makefile > > Modified: head/libexec/atrun/Makefile > == > --- head/libexec/atrun/Makefile Sat Jun 6 13:13:39 2015(r284070) > +++ head/libexec/atrun/Makefile Sat Jun 6 13:20:02 2015(r284071) > @@ -14,7 +14,6 @@ CLEANFILES= ${MAN} > CFLAGS+=-I${MAINSRC} -I${.CURDIR} > CFLAGS+=-DLOGIN_CAP -DPAM > > -WARNS?=2 > WFORMAT=0 > > LIBADD=pam util > ___ 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: r284094 - in stable/10/sys: arm/conf modules modules/dtb/imx6 modules/dtb/rpi
Author: ian Date: Sat Jun 6 18:49:02 2015 New Revision: 284094 URL: https://svnweb.freebsd.org/changeset/base/284094 Log: MFC r278338, r278340, r278458, r278519: Create a module to install the Raspberry Pi dtb files. Pull in the rpi.dts -> rpi.dtb module (dtb/rpi) and have it install rpi.dtb in /boot/dtb by default. Add a module to build the dtb files for all supported imx6 systems. Remove imx6s-wandboard.dts, there is no such file. Added: stable/10/sys/modules/dtb/imx6/ - copied from r279551, head/sys/modules/dtb/imx6/ stable/10/sys/modules/dtb/rpi/ - copied from r278338, head/sys/modules/dtb/rpi/ Modified: stable/10/sys/arm/conf/IMX6 stable/10/sys/arm/conf/RPI-B stable/10/sys/modules/Makefile stable/10/sys/modules/dtb/imx6/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/IMX6 == --- stable/10/sys/arm/conf/IMX6 Sat Jun 6 18:46:37 2015(r284093) +++ stable/10/sys/arm/conf/IMX6 Sat Jun 6 18:49:02 2015(r284094) @@ -153,6 +153,7 @@ device u3g # USB modems # Flattened Device Tree optionsFDT # Configure using FDT/DTB data +makeoptionsMODULES_EXTRA=dtb/imx6 # SoC-specific devices device ffec# Freescale Fast Ethernet Controller Modified: stable/10/sys/arm/conf/RPI-B == --- stable/10/sys/arm/conf/RPI-BSat Jun 6 18:46:37 2015 (r284093) +++ stable/10/sys/arm/conf/RPI-BSat Jun 6 18:49:02 2015 (r284094) @@ -138,4 +138,5 @@ options FDT # Configure using FDT/DTB # Note: DTB is normally loaded and modified by RPi boot loader, then # handed to kernel via U-Boot and ubldr. #options FDT_DTB_STATIC -makeoptionsFDT_DTS_FILE=rpi.dts +#makeoptions FDT_DTS_FILE=rpi.dts +makeoptionsMODULES_EXTRA=dtb/rpi Modified: stable/10/sys/modules/Makefile == --- stable/10/sys/modules/Makefile Sat Jun 6 18:46:37 2015 (r284093) +++ stable/10/sys/modules/Makefile Sat Jun 6 18:49:02 2015 (r284094) @@ -894,6 +894,8 @@ _zfs= zfs SUBDIR=${MODULES_OVERRIDE} .endif +SUBDIR+=${MODULES_EXTRA} + .for reject in ${WITHOUT_MODULES} SUBDIR:= ${SUBDIR:N${reject}} .endfor Modified: stable/10/sys/modules/dtb/imx6/Makefile == --- head/sys/modules/dtb/imx6/Makefile Mon Mar 2 22:12:56 2015 (r279551) +++ stable/10/sys/modules/dtb/imx6/Makefile Sat Jun 6 18:49:02 2015 (r284094) @@ -5,8 +5,7 @@ DTS=\ imx6q-cubox-i.dts \ imx6dl-hummingboard.dts \ imx6q-hummingboard.dts \ - imx6q-wandboard.dts \ imx6dl-wandboard.dts \ - imx6s-wandboard.dts + imx6q-wandboard.dts .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"
svn commit: r284093 - stable/10/sys/dev/cxgbe
Author: np Date: Sat Jun 6 18:46:37 2015 New Revision: 284093 URL: https://svnweb.freebsd.org/changeset/base/284093 Log: MFC r283858 and r284007. r283858: cxgbe: set minimum burst size when fetching freelist buffers to 128B. r284007: cxgbe: set the minimum burst size when fetching fl buffers to 128B for netmap rx queues too. This should have gone in as part of r283858. Modified: stable/10/sys/dev/cxgbe/t4_netmap.c stable/10/sys/dev/cxgbe/t4_sge.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/t4_netmap.c == --- stable/10/sys/dev/cxgbe/t4_netmap.c Sat Jun 6 18:31:28 2015 (r284092) +++ stable/10/sys/dev/cxgbe/t4_netmap.c Sat Jun 6 18:46:37 2015 (r284093) @@ -297,7 +297,7 @@ alloc_nm_rxq_hwq(struct port_info *pi, s (fl_pad ? F_FW_IQ_CMD_FL0PADEN : 0) | (black_hole == 2 ? F_FW_IQ_CMD_FL0PACKEN : 0)); c.fl0dcaen_to_fl0cidxfthresh = - htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_64B) | + htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_128B) | V_FW_IQ_CMD_FL0FBMAX(X_FETCHBURSTMAX_512B)); c.fl0size = htobe16(na->num_rx_desc / 8 + spg_len / EQ_ESIZE); c.fl0addr = htobe64(nm_rxq->fl_ba); Modified: stable/10/sys/dev/cxgbe/t4_sge.c == --- stable/10/sys/dev/cxgbe/t4_sge.cSat Jun 6 18:31:28 2015 (r284092) +++ stable/10/sys/dev/cxgbe/t4_sge.cSat Jun 6 18:46:37 2015 (r284093) @@ -2660,7 +2660,7 @@ alloc_iq_fl(struct port_info *pi, struct F_FW_IQ_CMD_FL0CONGEN); } c.fl0dcaen_to_fl0cidxfthresh = - htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_64B) | + htobe16(V_FW_IQ_CMD_FL0FBMIN(X_FETCHBURSTMIN_128B) | V_FW_IQ_CMD_FL0FBMAX(X_FETCHBURSTMAX_512B)); c.fl0size = htobe16(fl->qsize); c.fl0addr = htobe64(fl->ba); ___ 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: r284092 - stable/10/sys/dev/cxgbe/tom
Author: np Date: Sat Jun 6 18:31:28 2015 New Revision: 284092 URL: https://svnweb.freebsd.org/changeset/base/284092 Log: MFC r280878: cxgbe/tom: return rx credits promptly if the socket buffer's low water mark cannot be reached because the window advertised to the peer isn't wide enough. While here, tweak the normal credit return too. Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c == --- stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Jun 6 18:21:16 2015 (r284091) +++ stable/10/sys/dev/cxgbe/tom/t4_cpl_io.c Sat Jun 6 18:31:28 2015 (r284092) @@ -390,19 +390,17 @@ t4_rcvd(struct toedev *tod, struct tcpcb toep->rx_credits += toep->sb_cc - sb->sb_cc; toep->sb_cc = sb->sb_cc; } - credits = toep->rx_credits; - SOCKBUF_UNLOCK(sb); - - if (credits > 0 && - (credits + 16384 >= tp->rcv_wnd || credits >= 15 * 1024)) { + if (toep->rx_credits > 0 && + (tp->rcv_wnd <= 32 * 1024 || toep->rx_credits >= 64 * 1024 || + (toep->rx_credits >= 16 * 1024 && tp->rcv_wnd <= 128 * 1024) || + toep->sb_cc + tp->rcv_wnd < sb->sb_lowat)) { - credits = send_rx_credits(sc, toep, credits); - SOCKBUF_LOCK(sb); + credits = send_rx_credits(sc, toep, toep->rx_credits); toep->rx_credits -= credits; - SOCKBUF_UNLOCK(sb); tp->rcv_wnd += credits; tp->rcv_adv += credits; } + SOCKBUF_UNLOCK(sb); } /* @@ -1618,6 +1616,14 @@ do_rx_data(struct sge_iq *iq, const stru toep->rx_credits += toep->sb_cc - sb->sb_cc; sbappendstream_locked(sb, m); toep->sb_cc = sb->sb_cc; + if (toep->rx_credits > 0 && toep->sb_cc + tp->rcv_wnd < sb->sb_lowat) { + int credits; + + credits = send_rx_credits(sc, toep, toep->rx_credits); + toep->rx_credits -= credits; + tp->rcv_wnd += credits; + tp->rcv_adv += credits; + } sorwakeup_locked(so); SOCKBUF_UNLOCK_ASSERT(sb); ___ 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: r284091 - stable/10/sys/conf
Author: ian Date: Sat Jun 6 18:21:16 2015 New Revision: 284091 URL: https://svnweb.freebsd.org/changeset/base/284091 Log: MFC r278458, r278519: Pass MODULES_EXTRA to the modules build. While I'm here, also always pass WITHOUT_MODULES down. There's no need to make this conditional. Properly quote EXTRA_MODULES and WITHOUT_MODULES to ensure that they are passed down properly when there's more than one. Modified: stable/10/sys/conf/kern.pre.mk Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/conf/kern.pre.mk == --- stable/10/sys/conf/kern.pre.mk Sat Jun 6 18:03:36 2015 (r284090) +++ stable/10/sys/conf/kern.pre.mk Sat Jun 6 18:21:16 2015 (r284091) @@ -182,15 +182,13 @@ SYSTEM_DEP+= ${LDSCRIPT} MKMODULESENV+= MAKEOBJDIRPREFIX=${.OBJDIR}/modules KMODDIR=${KODIR} MKMODULESENV+= MACHINE_CPUARCH=${MACHINE_CPUARCH} +MKMODULESENV+= MODULES_EXTRA="${MODULES_EXTRA}" WITHOUT_MODULES="${WITHOUT_MODULES}" .if (${KERN_IDENT} == LINT) MKMODULESENV+= ALL_MODULES=LINT .endif .if defined(MODULES_OVERRIDE) MKMODULESENV+= MODULES_OVERRIDE="${MODULES_OVERRIDE}" .endif -.if defined(WITHOUT_MODULES) -MKMODULESENV+= WITHOUT_MODULES="${WITHOUT_MODULES}" -.endif .if defined(DEBUG) MKMODULESENV+= DEBUG_FLAGS="${DEBUG}" .endif ___ 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: r284089 - in stable/10/sys/dev/cxgbe: . iw_cxgbe tom
Author: np Date: Sat Jun 6 18:00:36 2015 New Revision: 284089 URL: https://svnweb.freebsd.org/changeset/base/284089 Log: MFC r278239 and r278374. r278239: cxgbe(4): reserve id for iSCSI upper layer driver. r278374: cxgbe(4): tidy up some of the interaction between the Upper Layer Drivers (ULDs) and the base if_cxgbe driver. Track the per-adapter activation of ULDs in a new "active_ulds" field. This was done pretty arbitrarily before this change -- via TOM_INIT_DONE in adapter->flags for TOM, and the (1 << MAX_NPORTS) bit in adapter->offload_map for iWARP. iWARP and hw-accelerated iSCSI rely on the TOE (supported by the TOM ULD). The rules are: a) If the iWARP and/or iSCSI ULDs are available when TOE is enabled then iWARP and/or iSCSI are enabled too. b) When the iWARP and iSCSI modules are loaded they go looking for adapters with TOE enabled and enable themselves on that adapter. c) You cannot deactivate or unload the TOM module from underneath iWARP or iSCSI. Any such attempt will fail with EBUSY. Modified: stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/iw_cxgbe/device.c stable/10/sys/dev/cxgbe/offload.h stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/tom/t4_listen.c stable/10/sys/dev/cxgbe/tom/t4_tom.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgbe/adapter.h == --- stable/10/sys/dev/cxgbe/adapter.h Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/adapter.h Sat Jun 6 18:00:36 2015 (r284089) @@ -186,7 +186,7 @@ enum { /* INTR_DIRECT = (1 << 2), No longer used. */ MASTER_PF = (1 << 3), ADAP_SYSCTL_CTX = (1 << 4), - TOM_INIT_DONE = (1 << 5), + /* TOM_INIT_DONE= (1 << 5), No longer used */ BUF_PACKING_OK = (1 << 6), CXGBE_BUSY = (1 << 9), @@ -751,7 +751,8 @@ struct adapter { uint16_t doorbells; int open_device_map; #ifdef TCP_OFFLOAD - int offload_map; + int offload_map;/* ports with IFCAP_TOE enabled */ + int active_ulds;/* ULDs activated on this adapter */ #endif int flags; Modified: stable/10/sys/dev/cxgbe/iw_cxgbe/device.c == --- stable/10/sys/dev/cxgbe/iw_cxgbe/device.c Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/iw_cxgbe/device.c Sat Jun 6 18:00:36 2015 (r284089) @@ -213,7 +213,7 @@ c4iw_activate(struct adapter *sc) ASSERT_SYNCHRONIZED_OP(sc); - if (isset(&sc->offload_map, MAX_NPORTS)) { + if (uld_active(sc, ULD_IWARP)) { KASSERT(0, ("%s: RDMA already eanbled on sc %p", __func__, sc)); return (0); } @@ -265,9 +265,9 @@ c4iw_activate_all(struct adapter *sc, vo if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4iwact") != 0) return; - if (!isset(&sc->offload_map, MAX_NPORTS) && - t4_activate_uld(sc, ULD_IWARP) == 0) - setbit(&sc->offload_map, MAX_NPORTS); + /* Activate iWARP if any port on this adapter has IFCAP_TOE enabled. */ + if (sc->offload_map && !uld_active(sc, ULD_IWARP)) + (void) t4_activate_uld(sc, ULD_IWARP); end_synchronized_op(sc, 0); } @@ -279,9 +279,8 @@ c4iw_deactivate_all(struct adapter *sc, if (begin_synchronized_op(sc, NULL, SLEEP_OK | INTR_OK, "t4iwdea") != 0) return; - if (isset(&sc->offload_map, MAX_NPORTS) && - t4_deactivate_uld(sc, ULD_IWARP) == 0) - clrbit(&sc->offload_map, MAX_NPORTS); + if (uld_active(sc, ULD_IWARP)) + (void) t4_deactivate_uld(sc, ULD_IWARP); end_synchronized_op(sc, 0); } Modified: stable/10/sys/dev/cxgbe/offload.h == --- stable/10/sys/dev/cxgbe/offload.h Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/offload.h Sat Jun 6 18:00:36 2015 (r284089) @@ -127,8 +127,10 @@ struct t4_virt_res { #ifdef TCP_OFFLOAD enum { - ULD_TOM = 1, - ULD_IWARP = 2, + ULD_TOM = 0, + ULD_IWARP, + ULD_ISCSI, + ULD_MAX = ULD_ISCSI }; struct adapter; @@ -155,5 +157,6 @@ int t4_unregister_uld(struct uld_info *) int t4_activate_uld(struct adapter *, int); int t4_deactivate_uld(struct adapter *, int); void t4_iscsi_init(struct ifnet *, unsigned int, const unsigned int *); +int uld_active(struct adapter *, int); #endif #endif Modified: stable/10/sys/dev/cxgbe/t4_main.c == --- stable/10/sys/dev/cxgbe/t4_main.c Sat Jun 6 17:25:45 2015 (r284088) +++ stable/10/sys/dev/cxgbe/t4_main.c Sat Jun
svn commit: r284088 - head/sys/sys
Author: marcel Date: Sat Jun 6 17:25:45 2015 New Revision: 284088 URL: https://svnweb.freebsd.org/changeset/base/284088 Log: Change BUS_PROBE_HOOVER from -500 to -100. We have PCI bus drivers return -1000 and -1 to establish a pecking order and we don't want catch-all or match-all drivers to attach instead of them. With this change poto(4) can be compiled into the kernel (or preloaded from the loader), without impact. Modified: head/sys/sys/bus.h Modified: head/sys/sys/bus.h == --- head/sys/sys/bus.h Sat Jun 6 17:08:06 2015(r284087) +++ head/sys/sys/bus.h Sat Jun 6 17:25:45 2015(r284088) @@ -612,7 +612,7 @@ voidbus_data_generation_update(void); #define BUS_PROBE_DEFAULT (-20) /* Base OS default driver */ #define BUS_PROBE_LOW_PRIORITY (-40) /* Older, less desirable drivers */ #define BUS_PROBE_GENERIC (-100) /* generic driver for dev */ -#define BUS_PROBE_HOOVER (-500) /* Generic dev for all devs on bus */ +#define BUS_PROBE_HOOVER (-100) /* Driver for any dev on bus */ #define BUS_PROBE_NOWILDCARD (-20) /* No wildcard device matches */ /** ___ 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: r284078 - head/sys/dev/pci
On Saturday, June 06, 2015 10:15:23 AM Marcel Moolenaar wrote: > > > On Jun 6, 2015, at 10:08 AM, John Baldwin wrote: > > > > On Saturday, June 06, 2015 09:18:22 AM Marcel Moolenaar wrote: > >> > >>> On Jun 6, 2015, at 9:03 AM, John Baldwin wrote: > >>> > >>> On Saturday, June 06, 2015 03:51:12 PM Marcel Moolenaar wrote: > Author: marcel > Date: Sat Jun 6 15:51:11 2015 > New Revision: 284078 > URL: https://svnweb.freebsd.org/changeset/base/284078 > > Log: > Don't return -1 as the probe priority. That's lower than what > BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the > kernel or preloaded, will render your system useless by virtue of > attaching to your PCI busses. > > Return BUS_PROBE_GENERIC instead. It's just the next priority up > from BUS_PROBE_HOOVER. No other meaning has been give to its use. > While BUS_PROBE_DEFAULT seems like a better candidate, it's hard > not to think that there must be some reason why these drivers > return -1 in the first place. > >>> > >>> BUS_PROBE_DEFAULT would conflict with other drivers that are supposed to > >>> override these, such as acpi_pcib_pci which should override pci_pci > >>> for PCI-PCI bridges in the ACPI namespace. That driver currently > >>> hardcodes > >>> -1000 itself. :-/ Then there's pcibios_pcib_probe for the $PIR PCI-PCI > >>> bridge driver for when ACPI isn't present. It returns -2000. The > >>> MPTable PCI-PCI bridge driver returns -1000 like ACPI. > >> > >> So that means we have a regression. Do you want me to back out > >> or should we just move forward and fix those too. > > > > Yeah, I just now realized this. If you can fix this quickly it's probably > > ok > > to just fix it vs backing it out and committing a larger change. > > I opted to back it out. I searched for all drivers that use > BUS_PROBE_HOOVER and it’s exactly one: proto(4). That’s a lot > easier then finding all drivers that return some negative > value that has some relation to PCI busses... > > I’m just going to change BUS_PROBE_HOOVER to -100 instead. > In follow-up rounds we can change magical constants to defines > to make the whole pecking order more obvious/visible. Ok. -- 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"
Re: svn commit: r284087 - head/sys/modules
On Saturday, June 06, 2015 05:08:07 PM Warner Losh wrote: > Author: imp > Date: Sat Jun 6 17:08:06 2015 > New Revision: 284087 > URL: https://svnweb.freebsd.org/changeset/base/284087 > > Log: > Turns out amd64 is hit too by ix. When it works, turn it back on. Can you post your errors? It builds fine for me and Jenkins hasn't been reporting any build errors since yesterday afternoon/evening. -- 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"
Re: svn commit: r284078 - head/sys/dev/pci
> On Jun 6, 2015, at 10:08 AM, John Baldwin wrote: > > On Saturday, June 06, 2015 09:18:22 AM Marcel Moolenaar wrote: >> >>> On Jun 6, 2015, at 9:03 AM, John Baldwin wrote: >>> >>> On Saturday, June 06, 2015 03:51:12 PM Marcel Moolenaar wrote: Author: marcel Date: Sat Jun 6 15:51:11 2015 New Revision: 284078 URL: https://svnweb.freebsd.org/changeset/base/284078 Log: Don't return -1 as the probe priority. That's lower than what BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the kernel or preloaded, will render your system useless by virtue of attaching to your PCI busses. Return BUS_PROBE_GENERIC instead. It's just the next priority up from BUS_PROBE_HOOVER. No other meaning has been give to its use. While BUS_PROBE_DEFAULT seems like a better candidate, it's hard not to think that there must be some reason why these drivers return -1 in the first place. >>> >>> BUS_PROBE_DEFAULT would conflict with other drivers that are supposed to >>> override these, such as acpi_pcib_pci which should override pci_pci >>> for PCI-PCI bridges in the ACPI namespace. That driver currently hardcodes >>> -1000 itself. :-/ Then there's pcibios_pcib_probe for the $PIR PCI-PCI >>> bridge driver for when ACPI isn't present. It returns -2000. The >>> MPTable PCI-PCI bridge driver returns -1000 like ACPI. >> >> So that means we have a regression. Do you want me to back out >> or should we just move forward and fix those too. > > Yeah, I just now realized this. If you can fix this quickly it's probably ok > to just fix it vs backing it out and committing a larger change. I opted to back it out. I searched for all drivers that use BUS_PROBE_HOOVER and it’s exactly one: proto(4). That’s a lot easier then finding all drivers that return some negative value that has some relation to PCI busses... I’m just going to change BUS_PROBE_HOOVER to -100 instead. In follow-up rounds we can change magical constants to defines to make the whole pecking order more obvious/visible. -- Marcel Moolenaar mar...@xcllnt.net signature.asc Description: Message signed with OpenPGP using GPGMail
Re: svn commit: r284078 - head/sys/dev/pci
On Saturday, June 06, 2015 09:18:22 AM Marcel Moolenaar wrote: > > > On Jun 6, 2015, at 9:03 AM, John Baldwin wrote: > > > > On Saturday, June 06, 2015 03:51:12 PM Marcel Moolenaar wrote: > >> Author: marcel > >> Date: Sat Jun 6 15:51:11 2015 > >> New Revision: 284078 > >> URL: https://svnweb.freebsd.org/changeset/base/284078 > >> > >> Log: > >> Don't return -1 as the probe priority. That's lower than what > >> BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the > >> kernel or preloaded, will render your system useless by virtue of > >> attaching to your PCI busses. > >> > >> Return BUS_PROBE_GENERIC instead. It's just the next priority up > >> from BUS_PROBE_HOOVER. No other meaning has been give to its use. > >> While BUS_PROBE_DEFAULT seems like a better candidate, it's hard > >> not to think that there must be some reason why these drivers > >> return -1 in the first place. > > > > BUS_PROBE_DEFAULT would conflict with other drivers that are supposed to > > override these, such as acpi_pcib_pci which should override pci_pci > > for PCI-PCI bridges in the ACPI namespace. That driver currently hardcodes > > -1000 itself. :-/ Then there's pcibios_pcib_probe for the $PIR PCI-PCI > > bridge driver for when ACPI isn't present. It returns -2000. The > > MPTable PCI-PCI bridge driver returns -1000 like ACPI. > > So that means we have a regression. Do you want me to back out > or should we just move forward and fix those too. Yeah, I just now realized this. If you can fix this quickly it's probably ok to just fix it vs backing it out and committing a larger change. For the x86 PCI bridge drivers, I think you can probably use BUS_PROBE_DEFAULT for ACPI and MPTable and BUS_PROBE_LOW_PRIORITY for the pcibios one. However, I haven't looked at other platforms. I believe there are some other PCI-PCI bridge drivers kicking around (for OFW on sparc64 and powerpc at least, not sure if there are others). It might be fine to lower HOOVER as well, but it's probably worth it to fix all drivers to use one of the BUS_PROBE constants (perhaps with an offset like 'BUS_PROBE_GENERIC - 10 or some such') rather than magic values. Unfortunately sweeping all device_probe calls is likely to be a bit tedious. :-/ -- 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: r284087 - head/sys/modules
Author: imp Date: Sat Jun 6 17:08:06 2015 New Revision: 284087 URL: https://svnweb.freebsd.org/changeset/base/284087 Log: Turns out amd64 is hit too by ix. When it works, turn it back on. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Sat Jun 6 17:04:36 2015(r284086) +++ head/sys/modules/Makefile Sat Jun 6 17:08:06 2015(r284087) @@ -618,7 +618,6 @@ _x86bios= x86bios .endif .if ${MACHINE_CPUARCH} == "amd64" -_ix= ix _ixl= ixl _ixlv= ixlv _linux64= linux64 ___ 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: r284086 - head/sys/dev/pci
Author: marcel Date: Sat Jun 6 17:04:36 2015 New Revision: 284086 URL: https://svnweb.freebsd.org/changeset/base/284086 Log: Revert previous change. The magical constants can't be changed (easily) without having to go to other drivers to change the magical return values. This wouldn't be so bad if there were proper defines for these constants. In particular dev/acpica/acpi_pcib_pci.c returns -1000 as the probe priority and it's expected that this driver gets to attach over the common PCI bus drivers. Modified: head/sys/dev/pci/eisa_pci.c head/sys/dev/pci/hostb_pci.c head/sys/dev/pci/ignore_pci.c head/sys/dev/pci/isa_pci.c head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/eisa_pci.c == --- head/sys/dev/pci/eisa_pci.c Sat Jun 6 16:47:45 2015(r284085) +++ head/sys/dev/pci/eisa_pci.c Sat Jun 6 17:04:36 2015(r284086) @@ -100,7 +100,7 @@ eisab_probe(device_t dev) if (matched) { device_set_desc(dev, "PCI-EISA bridge"); - return (BUS_PROBE_GENERIC); + return(-1); } return(ENXIO); } Modified: head/sys/dev/pci/hostb_pci.c == --- head/sys/dev/pci/hostb_pci.cSat Jun 6 16:47:45 2015 (r284085) +++ head/sys/dev/pci/hostb_pci.cSat Jun 6 17:04:36 2015 (r284086) @@ -63,7 +63,7 @@ pci_hostb_probe(device_t dev) pci_get_subclass(dev) == PCIS_BRIDGE_HOST) { device_set_desc(dev, "Host to PCI bridge"); device_quiet(dev); - return (BUS_PROBE_GENERIC); + return (-1); } return (ENXIO); } Modified: head/sys/dev/pci/ignore_pci.c == --- head/sys/dev/pci/ignore_pci.c Sat Jun 6 16:47:45 2015 (r284085) +++ head/sys/dev/pci/ignore_pci.c Sat Jun 6 17:04:36 2015 (r284086) @@ -66,7 +66,7 @@ ignore_pci_probe(device_t dev) case 0x10001042ul: /* SMC 37C665 */ device_set_desc(dev, "ignored"); device_quiet(dev); - return (BUS_PROBE_GENERIC); + return(-1); } return(ENXIO); } Modified: head/sys/dev/pci/isa_pci.c == --- head/sys/dev/pci/isa_pci.c Sat Jun 6 16:47:45 2015(r284085) +++ head/sys/dev/pci/isa_pci.c Sat Jun 6 17:04:36 2015(r284086) @@ -154,7 +154,7 @@ isab_pci_probe(device_t dev) if (matched) { device_set_desc(dev, "PCI-ISA bridge"); - return (BUS_PROBE_GENERIC); + return(-1); } return(ENXIO); } Modified: head/sys/dev/pci/pci_pci.c == --- head/sys/dev/pci/pci_pci.c Sat Jun 6 16:47:45 2015(r284085) +++ head/sys/dev/pci/pci_pci.c Sat Jun 6 17:04:36 2015(r284086) @@ -890,7 +890,7 @@ pcib_probe(device_t dev) if ((pci_get_class(dev) == PCIC_BRIDGE) && (pci_get_subclass(dev) == PCIS_BRIDGE_PCI)) { device_set_desc(dev, "PCI-PCI bridge"); - return (BUS_PROBE_GENERIC); + return(-1); } return(ENXIO); } ___ 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: r284085 - head/cddl/contrib/opensolaris/lib/libdtrace/common
Author: markj Date: Sat Jun 6 16:47:45 2015 New Revision: 284085 URL: https://svnweb.freebsd.org/changeset/base/284085 Log: libdtrace: allow D libraries to declare dependencies on kernel modules The "depends_on module" pragma can be used to declare a dependency on a DTrace module, which for kernel probes corresponds to a KLD. Such dependencies cannot be checked if the KLD is compiled into the kernel. Therefore, allow a module dependency to be satisfied if either a kernel module or a KLD with the specified name is loaded. Differential Revision:https://reviews.freebsd.org/D2653 Reviewed by: gnn, rpaulo Reported by: gnn Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.h head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_open.c head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_pragma.c Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.h == --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.hSat Jun 6 16:45:59 2015(r284084) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_impl.hSat Jun 6 16:47:45 2015(r284085) @@ -156,6 +156,21 @@ typedef struct dt_module { #defineDT_DM_KERNEL0x2 /* module is associated with a kernel object */ #defineDT_DM_PRIMARY 0x4 /* module is a krtld primary kernel object */ +#ifdef __FreeBSD__ +/* + * A representation of a FreeBSD kernel module, used when checking module + * dependencies. This differs from dt_module_t, which refers to a KLD in the + * case of kernel probes. Since modules can be identified regardless of whether + * they've been compiled into the kernel, we use them to identify DTrace + * modules. + */ +typedef struct dt_kmodule { + struct dt_kmodule *dkm_next;/* hash table entry */ + char *dkm_name; /* string name of module */ + dt_module_t *dkm_module;/* corresponding KLD module */ +} dt_kmodule_t; +#endif + typedef struct dt_provmod { char *dp_name; /* name of provider module */ struct dt_provmod *dp_next; /* next module */ @@ -235,6 +250,9 @@ struct dtrace_hdl { dt_idhash_t *dt_tls;/* hash table of thread-local identifiers */ dt_list_t dt_modlist; /* linked list of dt_module_t's */ dt_module_t **dt_mods; /* hash table of dt_module_t's */ +#ifdef __FreeBSD__ + dt_kmodule_t **dt_kmods; /* hash table of dt_kmodule_t's */ +#endif uint_t dt_modbuckets; /* number of module hash buckets */ uint_t dt_nmods;/* number of modules in hash and list */ dt_provmod_t *dt_provmod; /* linked list of provider modules */ Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c == --- head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Sat Jun 6 16:45:59 2015(r284084) +++ head/cddl/contrib/opensolaris/lib/libdtrace/common/dt_module.c Sat Jun 6 16:47:45 2015(r284085) @@ -37,6 +37,7 @@ #else #include #include +#include #include #endif @@ -542,6 +543,22 @@ dt_module_lookup_by_ctf(dtrace_hdl_t *dt return (ctfp ? ctf_getspecific(ctfp) : NULL); } +#ifdef __FreeBSD__ +dt_kmodule_t * +dt_kmodule_lookup(dtrace_hdl_t *dtp, const char *name) +{ + uint_t h = dt_strtab_hash(name, NULL) % dtp->dt_modbuckets; + dt_kmodule_t *dkmp; + + for (dkmp = dtp->dt_kmods[h]; dkmp != NULL; dkmp = dkmp->dkm_next) { + if (strcmp(dkmp->dkm_name, name) == 0) + return (dkmp); + } + + return (NULL); +} +#endif + static int dt_module_load_sect(dtrace_hdl_t *dtp, dt_module_t *dmp, ctf_sect_t *ctsp) { @@ -1124,6 +1141,12 @@ dt_module_update(dtrace_hdl_t *dtp, stru char fname[MAXPATHLEN]; struct stat64 st; int fd, err, bits; +#ifdef __FreeBSD__ + struct module_stat ms; + dt_kmodule_t *dkmp; + uint_t h; + int modid; +#endif dt_module_t *dmp; const char *s; @@ -1270,6 +1293,33 @@ dt_module_update(dtrace_hdl_t *dtp, stru if (dmp->dm_info.objfs_info_primary) dmp->dm_flags |= DT_DM_PRIMARY; +#ifdef __FreeBSD__ + ms.version = sizeof(ms); + for (modid = kldfirstmod(k_stat->id); modid > 0; + modid = modnext(modid)) { + if (modstat(modid, &ms) != 0) { + dt_dprintf("modstat failed for id %d in %s: %s\n", + modid, k_stat->name, strerror(errno)); + continue; + } + if (dt_kmodule_lookup(dtp, ms.name) != NULL) + continue; +
svn commit: r284084 - head/sys/modules
Author: imp Date: Sat Jun 6 16:45:59 2015 New Revision: 284084 URL: https://svnweb.freebsd.org/changeset/base/284084 Log: ix module doesn't compile on i386, so remove it from the build. It can be restored when it builds again. Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Sat Jun 6 16:38:40 2015(r284083) +++ head/sys/modules/Makefile Sat Jun 6 16:45:59 2015(r284084) @@ -512,7 +512,6 @@ _io=io .if ${MK_OFED} != "no" || defined(ALL_MODULES) _ipoib= ipoib .endif -_ix= ix _ixv= ixv _linprocfs=linprocfs _linsysfs= linsysfs @@ -619,6 +618,7 @@ _x86bios= x86bios .endif .if ${MACHINE_CPUARCH} == "amd64" +_ix= ix _ixl= ixl _ixlv= ixlv _linux64= linux64 ___ 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: r284083 - head/sys/dev/nand
Author: jhibbits Date: Sat Jun 6 16:38:40 2015 New Revision: 284083 URL: https://svnweb.freebsd.org/changeset/base/284083 Log: Map the LAW for the RouterBoard's NAND LBC memory. Without creating a LAW entry, any access to the NAND hangs the CPU. The original intent was to add a quirk to map all of the RouterBoard's LBC address space in one shot, which would fix it for both NAND and the CF, and that's probably still in the cards. However, for now, this makes NAND usable without a separate hack. Things left before the RouterBoard can run standalone: * Add partitions to the NAND (not specified by the FDT, which we currently require). * Create a YAFFS partition for the kernel. The Mikrotik boot loader requires a 4MB partition at the beginning of NAND, with a file called 'kernel' in the root. Modified: head/sys/dev/nand/nfc_rb.c Modified: head/sys/dev/nand/nfc_rb.c == --- head/sys/dev/nand/nfc_rb.c Sat Jun 6 16:36:13 2015(r284082) +++ head/sys/dev/nand/nfc_rb.c Sat Jun 6 16:38:40 2015(r284083) @@ -49,6 +49,9 @@ __FBSDID("$FreeBSD$"); #include #include + +#include + #include "nfc_if.h" #include "gpio_if.h" @@ -128,6 +131,7 @@ rb_nand_attach(device_t dev) struct rb_nand_softc *sc; phandle_t node; uint32_t ale[2],cle[2],nce[2],rdy[2]; + u_long size,start; int err; sc = device_get_softc(dev); @@ -168,6 +172,14 @@ rb_nand_attach(device_t dev) return (ENXIO); } + start = rman_get_start(sc->sc_mem); + size = rman_get_size(sc->sc_mem); + if (law_enable(OCP85XX_TGTIF_LBC, start, size) != 0) { + bus_release_resource(dev, SYS_RES_MEMORY, sc->rid, sc->sc_mem); + device_printf(dev, "could not allocate local address window.\n"); + return (ENXIO); + } + nand_init(&sc->nand_dev, dev, NAND_ECC_SOFT, 0, 0, NULL, NULL); err = nandbus_create(dev); ___ 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: r284082 - head/sys/fs/unionfs
Author: markj Date: Sat Jun 6 16:36:13 2015 New Revision: 284082 URL: https://svnweb.freebsd.org/changeset/base/284082 Log: unionfs: fix suspendability check bugs - MNTK_SUSPENDABLE is set in mnt_kern_flag, not mnt_flag. - The lower layer of a unionfs mount is read-only, so the mount should be suspendable iff the upper layer is suspendable. - Remove a couple of superfluous comments. Differential Revision:https://reviews.freebsd.org/D2714 Reviewed by: kib, mjg Modified: head/sys/fs/unionfs/union_vfsops.c Modified: head/sys/fs/unionfs/union_vfsops.c == --- head/sys/fs/unionfs/union_vfsops.c Sat Jun 6 16:20:39 2015 (r284081) +++ head/sys/fs/unionfs/union_vfsops.c Sat Jun 6 16:36:13 2015 (r284082) @@ -291,18 +291,11 @@ unionfs_domount(struct mount *mp) } MNT_ILOCK(mp); - /* -* Check mnt_flag -*/ if ((ump->um_lowervp->v_mount->mnt_flag & MNT_LOCAL) && (ump->um_uppervp->v_mount->mnt_flag & MNT_LOCAL)) mp->mnt_flag |= MNT_LOCAL; - /* -* Check mnt_kern_flag -*/ - if ((ump->um_lowervp->v_mount->mnt_flag & MNTK_SUSPENDABLE) || - (ump->um_uppervp->v_mount->mnt_flag & MNTK_SUSPENDABLE)) + if ((ump->um_uppervp->v_mount->mnt_kern_flag & MNTK_SUSPENDABLE) != 0) mp->mnt_kern_flag |= MNTK_SUSPENDABLE; MNT_IUNLOCK(mp); ___ 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: r284081 - head/sys/modules/proto
Author: marcel Date: Sat Jun 6 16:20:39 2015 New Revision: 284081 URL: https://svnweb.freebsd.org/changeset/base/284081 Log: Add proto_busdma.c to the module. Modified: head/sys/modules/proto/Makefile Modified: head/sys/modules/proto/Makefile == --- head/sys/modules/proto/Makefile Sat Jun 6 16:14:03 2015 (r284080) +++ head/sys/modules/proto/Makefile Sat Jun 6 16:20:39 2015 (r284081) @@ -5,6 +5,7 @@ KMOD= proto SRCS= \ proto_bus_pci.c \ + proto_busdma.c \ proto_core.c SRCS+= \ ___ 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: r284078 - head/sys/dev/pci
> On Jun 6, 2015, at 9:03 AM, John Baldwin wrote: > > On Saturday, June 06, 2015 03:51:12 PM Marcel Moolenaar wrote: >> Author: marcel >> Date: Sat Jun 6 15:51:11 2015 >> New Revision: 284078 >> URL: https://svnweb.freebsd.org/changeset/base/284078 >> >> Log: >> Don't return -1 as the probe priority. That's lower than what >> BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the >> kernel or preloaded, will render your system useless by virtue of >> attaching to your PCI busses. >> >> Return BUS_PROBE_GENERIC instead. It's just the next priority up >> from BUS_PROBE_HOOVER. No other meaning has been give to its use. >> While BUS_PROBE_DEFAULT seems like a better candidate, it's hard >> not to think that there must be some reason why these drivers >> return -1 in the first place. > > BUS_PROBE_DEFAULT would conflict with other drivers that are supposed to > override these, such as acpi_pcib_pci which should override pci_pci > for PCI-PCI bridges in the ACPI namespace. That driver currently hardcodes > -1000 itself. :-/ Then there's pcibios_pcib_probe for the $PIR PCI-PCI > bridge driver for when ACPI isn't present. It returns -2000. The > MPTable PCI-PCI bridge driver returns -1000 like ACPI. So that means we have a regression. Do you want me to back out or should we just move forward and fix those too. An alternative is to change BUS_PROBE_HOOVER to -10 and be done with it. Thoughts? -- Marcel Moolenaar mar...@xcllnt.net signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r284080 - in head/tools/bus_space: . C Python
Author: marcel Date: Sat Jun 6 16:14:03 2015 New Revision: 284080 URL: https://svnweb.freebsd.org/changeset/base/284080 Log: Add DMA tag management to the C library and Python binding. Added: head/tools/bus_space/busdma.c (contents, props changed) head/tools/bus_space/busdma.h (contents, props changed) Modified: head/tools/bus_space/C/Makefile head/tools/bus_space/C/lang.c head/tools/bus_space/C/libbus_space.h head/tools/bus_space/Makefile.inc head/tools/bus_space/Python/lang.c Modified: head/tools/bus_space/C/Makefile == --- head/tools/bus_space/C/Makefile Sat Jun 6 16:09:25 2015 (r284079) +++ head/tools/bus_space/C/Makefile Sat Jun 6 16:14:03 2015 (r284080) @@ -3,6 +3,7 @@ LIB= bus_space SHLIB_MAJOR= 0 SRCS= lang.c +INCS= libbus_space.h CFLAGS+= -I${.CURDIR}/.. Modified: head/tools/bus_space/C/lang.c == --- head/tools/bus_space/C/lang.c Sat Jun 6 16:09:25 2015 (r284079) +++ head/tools/bus_space/C/lang.c Sat Jun 6 16:14:03 2015 (r284080) @@ -31,9 +31,10 @@ __FBSDID("$FreeBSD$"); #include #include "bus_space.h" +#include "busdma.h" #include "libbus_space.h" -int +int16_t bus_space_read_1(int rid, long ofs) { uint8_t val; @@ -41,7 +42,7 @@ bus_space_read_1(int rid, long ofs) return ((!bs_read(rid, ofs, &val, sizeof(val))) ? -1 : (int)val); } -int +int32_t bus_space_read_2(int rid, long ofs) { uint16_t val; @@ -98,3 +99,41 @@ bus_space_subregion(int rid, long ofs, l return (bs_subregion(rid, ofs, sz)); } + +int +busdma_tag_create(const char *dev, bus_addr_t align, bus_addr_t bndry, +bus_addr_t maxaddr, bus_size_t maxsz, u_int nsegs, bus_size_t maxsegsz, +u_int datarate, u_int flags, busdma_tag_t *out_p) +{ + int res; + + res = bd_tag_create(dev, align, bndry, maxaddr, maxsz, nsegs, maxsegsz, + datarate, flags); + if (res == -1) + return (errno); + *out_p = res; + return (0); +} + +int +busdma_tag_derive(busdma_tag_t tag, bus_addr_t align, bus_addr_t bndry, +bus_addr_t maxaddr, bus_size_t maxsz, u_int nsegs, bus_size_t maxsegsz, +u_int datarate, u_int flags, busdma_tag_t *out_p) +{ + int res; + + res = bd_tag_derive(tag, align, bndry, maxaddr, maxsz, nsegs, maxsegsz, + datarate, flags); + if (res == -1) + return (errno); + *out_p = res; + return (0); +} + +int +busdma_tag_destroy(busdma_tag_t tag) +{ + + return (bd_tag_destroy(tag)); +} + Modified: head/tools/bus_space/C/libbus_space.h == --- head/tools/bus_space/C/libbus_space.h Sat Jun 6 16:09:25 2015 (r284079) +++ head/tools/bus_space/C/libbus_space.h Sat Jun 6 16:14:03 2015 (r284080) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2014 Marcel Moolenaar + * Copyright (c) 2014, 2015 Marcel Moolenaar * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -29,14 +29,28 @@ #ifndef _LIBBUS_SPACE_H_ #define_LIBBUS_SPACE_H_ -int bus_space_map(const char *dev); -int bus_space_read_1(int rid, long ofs); -int bus_space_read_2(int rid, long ofs); +intbus_space_map(const char *dev); +int16_tbus_space_read_1(int rid, long ofs); +int32_tbus_space_read_2(int rid, long ofs); int64_t bus_space_read_4(int rid, long ofs); -int bus_space_subregion(int rid, long ofs, long sz); -int bus_space_unmap(int rid); -int bus_space_write_1(int rid, long ofs, uint8_t val); -int bus_space_write_2(int rid, long ofs, uint16_t val); -int bus_space_write_4(int rid, long ofs, uint32_t val); +intbus_space_subregion(int rid, long ofs, long sz); +intbus_space_unmap(int rid); +intbus_space_write_1(int rid, long ofs, uint8_t val); +intbus_space_write_2(int rid, long ofs, uint16_t val); +intbus_space_write_4(int rid, long ofs, uint32_t val); + +typedef unsigned long bus_addr_t; +typedef unsigned long bus_size_t; +typedef int busdma_tag_t; + +intbusdma_tag_create(const char *dev, bus_addr_t align, bus_addr_t bndry, + bus_addr_t maxaddr, bus_size_t maxsz, u_int nsegs, + bus_size_t maxsegsz, u_int datarate, u_int flags, + busdma_tag_t *out_p); +intbusdma_tag_derive(busdma_tag_t tag, bus_addr_t align, bus_addr_t bndry, + bus_addr_t maxaddr, bus_size_t maxsz, u_int nsegs, + bus_size_t maxsegsz, u_int datarate, u_int flags, + busdma_tag_t *out_p); +intbusdma_tag_destroy(busdma_tag_t tag); #endif /* _LIBBUS_SPACE_H_ */ Modified: head/tools/bus_space/Makefile.inc == --- head/tools/bus_space/Makefile.inc Sat Jun 6 16:
svn commit: r284079 - head/sys/dev/proto
Author: marcel Date: Sat Jun 6 16:09:25 2015 New Revision: 284079 URL: https://svnweb.freebsd.org/changeset/base/284079 Log: DMA support part 1: DMA tag create & destroy Create a special resource (= device special file) for management of tags and maps, as well as for mapping memory into the address space. DMA resources are managed using the PROTO_IOC_BUSDMA ioctl. Part 1 implements tag creation, derivation and destruction. Added: head/sys/dev/proto/proto_busdma.c (contents, props changed) head/sys/dev/proto/proto_busdma.h (contents, props changed) Modified: head/sys/dev/proto/proto.h head/sys/dev/proto/proto_bus_pci.c head/sys/dev/proto/proto_core.c head/sys/dev/proto/proto_dev.h Modified: head/sys/dev/proto/proto.h == --- head/sys/dev/proto/proto.h Sat Jun 6 15:51:11 2015(r284078) +++ head/sys/dev/proto/proto.h Sat Jun 6 16:09:25 2015(r284079) @@ -33,11 +33,15 @@ #definePROTO_RES_UNUSED0 #definePROTO_RES_PCICFG10 +#definePROTO_RES_BUSDMA11 struct proto_res { int r_type; int r_rid; - struct resource *r_res; + union { + struct resource *res; + void *busdma; + } r_d; u_long r_size; union { void*cookie; Modified: head/sys/dev/proto/proto_bus_pci.c == --- head/sys/dev/proto/proto_bus_pci.c Sat Jun 6 15:51:11 2015 (r284078) +++ head/sys/dev/proto/proto_bus_pci.c Sat Jun 6 16:09:25 2015 (r284079) @@ -87,6 +87,7 @@ proto_pci_attach(device_t dev) sc = device_get_softc(dev); proto_add_resource(sc, PROTO_RES_PCICFG, 0, NULL); + proto_add_resource(sc, PROTO_RES_BUSDMA, 0, NULL); for (bar = 0; bar < PCIR_MAX_BAR_0; bar++) { rid = PCIR_BAR(bar); Added: head/sys/dev/proto/proto_busdma.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/proto/proto_busdma.c Sat Jun 6 16:09:25 2015 (r284079) @@ -0,0 +1,167 @@ +/*- + * Copyright (c) 2015 Marcel Moolenaar + * 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 ``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 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +MALLOC_DEFINE(M_PROTO_BUSDMA, "proto_busdma", "DMA management data"); + +static int +proto_busdma_tag_create(struct proto_ioc_busdma *ioc, +struct proto_tag **tag_io, bus_dma_tag_t *busdma_tag_io) +{ + struct proto_tag *tag; + int error; + + error = bus_dma_tag_create(*busdma_tag_io, ioc->u.tag.align, + ioc->u.tag.bndry, ioc->u.tag.maxaddr, BUS_SPACE_MAXADDR, + NULL, NULL, ioc->u.tag.maxsz, ioc->u.tag.nsegs, + ioc->u.tag.maxsegsz, ioc->u.tag.flags, NULL, NULL, + busdma_tag_io); + if (error) + return (error); + + tag = malloc(sizeof(*tag), M_PROTO_BUSDMA, M_WAITOK | M_ZERO); + tag->parent = *tag_io; + tag->busdma_tag = *busdma_tag_io; + *tag_io = tag; + return (0); +} + +static void +proto_busdma_tag_destroy(struct proto_tag *tag) +{ + + bus_dma_tag_destroy(tag->busdma_tag); + free(tag, M_PROTO_BUSDMA); +} + +static struct proto_tag * +proto_busdma_tag_lookup(struct proto_busdma *busdma, u_long key) +{ + struct proto_tag *tag; + +LIST_FOREACH(tag, &busdma->tags,
Re: svn commit: r284078 - head/sys/dev/pci
On Saturday, June 06, 2015 03:51:12 PM Marcel Moolenaar wrote: > Author: marcel > Date: Sat Jun 6 15:51:11 2015 > New Revision: 284078 > URL: https://svnweb.freebsd.org/changeset/base/284078 > > Log: > Don't return -1 as the probe priority. That's lower than what > BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the > kernel or preloaded, will render your system useless by virtue of > attaching to your PCI busses. > > Return BUS_PROBE_GENERIC instead. It's just the next priority up > from BUS_PROBE_HOOVER. No other meaning has been give to its use. > While BUS_PROBE_DEFAULT seems like a better candidate, it's hard > not to think that there must be some reason why these drivers > return -1 in the first place. BUS_PROBE_DEFAULT would conflict with other drivers that are supposed to override these, such as acpi_pcib_pci which should override pci_pci for PCI-PCI bridges in the ACPI namespace. That driver currently hardcodes -1000 itself. :-/ Then there's pcibios_pcib_probe for the $PIR PCI-PCI bridge driver for when ACPI isn't present. It returns -2000. The MPTable PCI-PCI bridge driver returns -1000 like ACPI. That relative order (ACPI and MPTable are most preferred, then $PIR, then generic PCI-PCI) is important for PCI INTx interrupt routing on x86. In general any platform which knows better how to route INTx interrupts than the swizzle defined for add-on cards that pci_pci uses should override the pci_pci driver via a higher probe value. In this case simply using the stock BUS_PROBE values doesn't quite work since there isn't just DEFAULT/GENERIC, but on x86 you have at least three levels. Also, BUS_PROBE_GENERIC does have a meaning and it is well suited to these drivers. It is for drivers that match large classes of devices rather than specific devices. In PCI terms that would mean a device that matches on class/subclass rather than vendor/device ID (which is true of these bridge drivers. ignore_pci is a different animal). -- 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: r284078 - head/sys/dev/pci
Author: marcel Date: Sat Jun 6 15:51:11 2015 New Revision: 284078 URL: https://svnweb.freebsd.org/changeset/base/284078 Log: Don't return -1 as the probe priority. That's lower than what BUS_PROBE_HOOVER is. Drivers like proto(4), when compiled into the kernel or preloaded, will render your system useless by virtue of attaching to your PCI busses. Return BUS_PROBE_GENERIC instead. It's just the next priority up from BUS_PROBE_HOOVER. No other meaning has been give to its use. While BUS_PROBE_DEFAULT seems like a better candidate, it's hard not to think that there must be some reason why these drivers return -1 in the first place. Differential Revision:D2705 Modified: head/sys/dev/pci/eisa_pci.c head/sys/dev/pci/hostb_pci.c head/sys/dev/pci/ignore_pci.c head/sys/dev/pci/isa_pci.c head/sys/dev/pci/pci_pci.c Modified: head/sys/dev/pci/eisa_pci.c == --- head/sys/dev/pci/eisa_pci.c Sat Jun 6 14:26:40 2015(r284077) +++ head/sys/dev/pci/eisa_pci.c Sat Jun 6 15:51:11 2015(r284078) @@ -100,7 +100,7 @@ eisab_probe(device_t dev) if (matched) { device_set_desc(dev, "PCI-EISA bridge"); - return(-1); + return (BUS_PROBE_GENERIC); } return(ENXIO); } Modified: head/sys/dev/pci/hostb_pci.c == --- head/sys/dev/pci/hostb_pci.cSat Jun 6 14:26:40 2015 (r284077) +++ head/sys/dev/pci/hostb_pci.cSat Jun 6 15:51:11 2015 (r284078) @@ -63,7 +63,7 @@ pci_hostb_probe(device_t dev) pci_get_subclass(dev) == PCIS_BRIDGE_HOST) { device_set_desc(dev, "Host to PCI bridge"); device_quiet(dev); - return (-1); + return (BUS_PROBE_GENERIC); } return (ENXIO); } Modified: head/sys/dev/pci/ignore_pci.c == --- head/sys/dev/pci/ignore_pci.c Sat Jun 6 14:26:40 2015 (r284077) +++ head/sys/dev/pci/ignore_pci.c Sat Jun 6 15:51:11 2015 (r284078) @@ -66,7 +66,7 @@ ignore_pci_probe(device_t dev) case 0x10001042ul: /* SMC 37C665 */ device_set_desc(dev, "ignored"); device_quiet(dev); - return(-1); + return (BUS_PROBE_GENERIC); } return(ENXIO); } Modified: head/sys/dev/pci/isa_pci.c == --- head/sys/dev/pci/isa_pci.c Sat Jun 6 14:26:40 2015(r284077) +++ head/sys/dev/pci/isa_pci.c Sat Jun 6 15:51:11 2015(r284078) @@ -154,7 +154,7 @@ isab_pci_probe(device_t dev) if (matched) { device_set_desc(dev, "PCI-ISA bridge"); - return(-1); + return (BUS_PROBE_GENERIC); } return(ENXIO); } Modified: head/sys/dev/pci/pci_pci.c == --- head/sys/dev/pci/pci_pci.c Sat Jun 6 14:26:40 2015(r284077) +++ head/sys/dev/pci/pci_pci.c Sat Jun 6 15:51:11 2015(r284078) @@ -890,7 +890,7 @@ pcib_probe(device_t dev) if ((pci_get_class(dev) == PCIC_BRIDGE) && (pci_get_subclass(dev) == PCIS_BRIDGE_PCI)) { device_set_desc(dev, "PCI-PCI bridge"); - return(-1); + return (BUS_PROBE_GENERIC); } return(ENXIO); } ___ 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: r284077 - head/sys/arm/freescale/imx
Author: br Date: Sat Jun 6 14:26:40 2015 New Revision: 284077 URL: https://svnweb.freebsd.org/changeset/base/284077 Log: Include a header required for vtophys(). Modified: head/sys/arm/freescale/imx/imx6_sdma.c Modified: head/sys/arm/freescale/imx/imx6_sdma.c == --- head/sys/arm/freescale/imx/imx6_sdma.c Sat Jun 6 13:49:54 2015 (r284076) +++ head/sys/arm/freescale/imx/imx6_sdma.c Sat Jun 6 14:26:40 2015 (r284077) @@ -48,6 +48,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"
svn commit: r284076 - head/sbin/badsect
Author: bapt Date: Sat Jun 6 13:49:54 2015 New Revision: 284076 URL: https://svnweb.freebsd.org/changeset/base/284076 Log: Remove useless WARNS Modified: head/sbin/badsect/Makefile Modified: head/sbin/badsect/Makefile == --- head/sbin/badsect/Makefile Sat Jun 6 13:39:20 2015(r284075) +++ head/sbin/badsect/Makefile Sat Jun 6 13:49:54 2015(r284076) @@ -4,6 +4,5 @@ PROG= badsect LIBADD=ufs MAN= badsect.8 -WARNS?=2 .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"
svn commit: r284075 - stable/10/share/man/man4
Author: ae Date: Sat Jun 6 13:39:20 2015 New Revision: 284075 URL: https://svnweb.freebsd.org/changeset/base/284075 Log: MFC r283897: Add example how to configure gre(4) tunnel with the same inner and outer addresses using multiple FIBs. Modified: stable/10/share/man/man4/gre.4 Directory Properties: stable/10/ (props changed) Modified: stable/10/share/man/man4/gre.4 == --- stable/10/share/man/man4/gre.4 Sat Jun 6 13:37:11 2015 (r284074) +++ stable/10/share/man/man4/gre.4 Sat Jun 6 13:39:20 2015 (r284075) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 7, 2014 +.Dd June 2, 2015 .Dt GRE 4 .Os .Sh NAME @@ -118,6 +118,44 @@ ifconfig greN inet 192.168.2.1 192.168.1 ifconfig greN inet tunnel B A route add -net 192.168.1 -netmask 255.255.255.0 192.168.1.1 .Ed +.Pp +In case when internal and external IP addresses are the same, +different routing tables (FIB) should be used. +The default FIB will be applied to IP packets before GRE encapsulation. +After encapsulation GRE interface should set different FIB number to +outgoing packet. +Then different FIB will be applied to such encapsulated packets. +According to this FIB packet should be routed to tunnel endpoint. +.Bd -literal +Host X -- Host A (198.51.100.1) ---tunnel--- Cisco D (203.0.113.1) -- Host E + \\ / +\\ / ++- Host B - Host C -+ + (198.51.100.254) +.Ed +.Pp +On Host A (FreeBSD): +.Pp +First of multiple FIBs should be configured via loader.conf: +.Bd -literal -offset indent +net.fibs=2 +net.add_addr_allfibs=0 +.Ed +.Pp +Then routes to the gateway and remote tunnel endpoint via this gateway +should be added to the second FIB: +.Bd -literal -offset indent +route add -net 198.51.100.0 -netmask 255.255.255.0 -fib 1 -iface em0 +route add -host 203.0.113.1 -fib 1 198.51.100.254 +.Ed +.Pp +And GRE tunnel should be configured to change FIB for encapsulated packets: +.Bd -literal -offset indent +ifconfig greN create +ifconfig greN inet 198.51.100.1 203.0.113.1 +ifconfig greN inet tunnel 198.51.100.1 203.0.113.1 tunnelfib 1 +.Ed +.Pp .Sh NOTES The MTU of .Nm ___ 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: r284074 - in stable/10: sbin/ifconfig sys/net sys/sys
Author: ae Date: Sat Jun 6 13:37:11 2015 New Revision: 284074 URL: https://svnweb.freebsd.org/changeset/base/284074 Log: MFC r282809: Add new socket ioctls SIOC[SG]TUNFIB to set FIB number of encapsulated packets on tunnel interfaces. Add support of these ioctls to gre(4), gif(4) and me(4) interfaces. For incoming packets M_SETFIB() should use if_fib value from ifnet structure, use proper value in gre(4) and me(4). Differential Revision: https://reviews.freebsd.org/D2462 Modified: stable/10/sbin/ifconfig/ifconfig.8 stable/10/sbin/ifconfig/iffib.c stable/10/sys/net/if_gif.c stable/10/sys/net/if_gre.c stable/10/sys/net/if_me.c stable/10/sys/sys/sockio.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/ifconfig/ifconfig.8 == --- stable/10/sbin/ifconfig/ifconfig.8 Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sbin/ifconfig/ifconfig.8 Sat Jun 6 13:37:11 2015 (r284074) @@ -321,6 +321,14 @@ using the kernel configuration option, or the .Va net.fibs tunable. +.It Cm tunnelfib Ar fib_number +Specify tunnel FIB. +A FIB +.Ar fib_number +is assigned to all packets encapsulated by tunnel interface, e.g., +.Xr gif 4 +and +.Xr gre 4 . .It Cm ipdst This is used to specify an Internet host who is willing to receive IP packets encapsulating IPX packets bound for a remote network. Modified: stable/10/sbin/ifconfig/iffib.c == --- stable/10/sbin/ifconfig/iffib.c Sat Jun 6 13:29:41 2015 (r284073) +++ stable/10/sbin/ifconfig/iffib.c Sat Jun 6 13:37:11 2015 (r284074) @@ -50,15 +50,15 @@ fib_status(int s) memset(&ifr, 0, sizeof(ifr)); strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCGIFFIB, (caddr_t)&ifr) == 0 && + ifr.ifr_fib != RT_DEFAULT_FIB) + printf("\tfib: %u\n", ifr.ifr_fib); - if (ioctl(s, SIOCGIFFIB, (caddr_t)&ifr) < 0) - return; - - /* Ignore if it is the default. */ - if (ifr.ifr_fib == 0) - return; - - printf("\tfib: %u\n", ifr.ifr_fib); + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + if (ioctl(s, SIOCGTUNFIB, (caddr_t)&ifr) == 0 && + ifr.ifr_fib != RT_DEFAULT_FIB) + printf("\ttunnelfib: %u\n", ifr.ifr_fib); } static void @@ -80,8 +80,28 @@ setiffib(const char *val, int dummy __un warn("ioctl (SIOCSIFFIB)"); } +static void +settunfib(const char *val, int dummy __unused, int s, +const struct afswtch *afp) +{ + unsigned long fib; + char *ep; + + fib = strtoul(val, &ep, 0); + if (*ep != '\0' || fib > UINT_MAX) { + warn("fib %s not valid", val); + return; + } + + strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); + ifr.ifr_fib = fib; + if (ioctl(s, SIOCSTUNFIB, (caddr_t)&ifr) < 0) + warn("ioctl (SIOCSTUNFIB)"); +} + static struct cmd fib_cmds[] = { DEF_CMD_ARG("fib", setiffib), + DEF_CMD_ARG("tunnelfib", settunfib), }; static struct afswtch af_fib = { Modified: stable/10/sys/net/if_gif.c == --- stable/10/sys/net/if_gif.c Sat Jun 6 13:29:41 2015(r284073) +++ stable/10/sys/net/if_gif.c Sat Jun 6 13:37:11 2015(r284074) @@ -919,6 +919,17 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, #endif } break; + case SIOCGTUNFIB: + ifr->ifr_fib = sc->gif_fibnum; + break; + case SIOCSTUNFIB: + if ((error = priv_check(curthread, PRIV_NET_GIF)) != 0) + break; + if (ifr->ifr_fib >= rt_numfibs) + error = EINVAL; + else + sc->gif_fibnum = ifr->ifr_fib; + break; case GIFGOPTS: options = sc->gif_options; error = copyout(&options, ifr->ifr_data, sizeof(options)); @@ -934,7 +945,6 @@ gif_ioctl(struct ifnet *ifp, u_long cmd, else sc->gif_options = options; break; - default: error = EINVAL; break; Modified: stable/10/sys/net/if_gre.c == --- stable/10/sys/net/if_gre.c Sat Jun 6 13:29:41 2015(r284073) +++ stable/10/sys/net/if_gre.c Sat Jun 6 13:37:11 2015(r284074) @@ -64,6 +64,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef INET @@ -441,6 +442,17 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, #endif } break; + case SIOCGTUNFIB: + ifr->
svn commit: r284073 - stable/10/sys/net
Author: ae Date: Sat Jun 6 13:29:41 2015 New Revision: 284073 URL: https://svnweb.freebsd.org/changeset/base/284073 Log: MFC r276902,282536: Pass mtag argument into m_tag_locate() to continue the search from the last found mtag. Modified: stable/10/sys/net/if_me.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/net/if_me.c == --- stable/10/sys/net/if_me.c Sat Jun 6 13:26:13 2015(r284072) +++ stable/10/sys/net/if_me.c Sat Jun 6 13:29:41 2015(r284073) @@ -487,7 +487,7 @@ me_check_nesting(struct ifnet *ifp, stru count = 1; mtag = NULL; - while ((mtag = m_tag_locate(m, MTAG_ME, 0, NULL)) != NULL) { + while ((mtag = m_tag_locate(m, MTAG_ME, 0, mtag)) != NULL) { if (*(struct ifnet **)(mtag + 1) == ifp) { log(LOG_NOTICE, "%s: loop detected\n", ifp->if_xname); return (EIO); ___ 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: r284072 - in stable/10: . sys/net sys/netinet sys/netinet6
Author: ae Date: Sat Jun 6 13:26:13 2015 New Revision: 284072 URL: https://svnweb.freebsd.org/changeset/base/284072 Log: MFC r276148: Remove in_gif.h and in6_gif.h files. They only contain function declarations used by gif(4). Instead declare these functions in C files. Also make some variables static. MFC r276215: Extern declarations in C files loses compile-time checking that the functions' calls match their definitions. Move them to header files. Deleted: stable/10/sys/netinet/in_gif.h stable/10/sys/netinet6/in6_gif.h Modified: stable/10/ObsoleteFiles.inc stable/10/sys/net/if_gif.c stable/10/sys/net/if_gif.h stable/10/sys/net/if_gre.c stable/10/sys/net/if_gre.h stable/10/sys/netinet/in_gif.c stable/10/sys/netinet/ip_gre.c stable/10/sys/netinet6/in6_gif.c stable/10/sys/netinet6/ip6_gre.c Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc == --- stable/10/ObsoleteFiles.inc Sat Jun 6 13:20:02 2015(r284071) +++ stable/10/ObsoleteFiles.inc Sat Jun 6 13:26:13 2015(r284072) @@ -40,6 +40,9 @@ # 20150506 OLD_FILES+=usr/share/man/man9/NDHASGIANT.9.gz +# 20141223: remove in6_gif.h and in_gif.h +OLD_FILES+=usr/include/netinet/in_gif.h +OLD_FILES+=usr/include/netinet6/in6_gif.h # 20141205: convert sbin/mdconfig/tests to ATF format tests OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test Modified: stable/10/sys/net/if_gif.c == --- stable/10/sys/net/if_gif.c Sat Jun 6 13:20:02 2015(r284071) +++ stable/10/sys/net/if_gif.c Sat Jun 6 13:26:13 2015(r284072) @@ -72,7 +72,6 @@ __FBSDID("$FreeBSD$"); #include #ifdef INET #include -#include #include #endif /* INET */ @@ -85,7 +84,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include #endif /* INET6 */ Modified: stable/10/sys/net/if_gif.h == --- stable/10/sys/net/if_gif.h Sat Jun 6 13:20:02 2015(r284071) +++ stable/10/sys/net/if_gif.h Sat Jun 6 13:26:13 2015(r284072) @@ -111,6 +111,16 @@ void gif_input(struct mbuf *, struct ifn int gif_output(struct ifnet *, struct mbuf *, const struct sockaddr *, struct route *); int gif_encapcheck(const struct mbuf *, int, int, void *); +#ifdef INET +int in_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +int in_gif_encapcheck(const struct mbuf *, int, int, void *); +int in_gif_attach(struct gif_softc *); +#endif +#ifdef INET6 +int in6_gif_output(struct ifnet *, struct mbuf *, int, uint8_t); +int in6_gif_encapcheck(const struct mbuf *, int, int, void *); +int in6_gif_attach(struct gif_softc *); +#endif #endif /* _KERNEL */ #define GIFGOPTS _IOWR('i', 150, struct ifreq) Modified: stable/10/sys/net/if_gre.c == --- stable/10/sys/net/if_gre.c Sat Jun 6 13:20:02 2015(r284071) +++ stable/10/sys/net/if_gre.c Sat Jun 6 13:26:13 2015(r284072) @@ -119,16 +119,6 @@ static int gre_set_tunnel(struct ifnet * struct sockaddr *); static voidgre_delete_tunnel(struct ifnet *); -intgre_input(struct mbuf **, int *, int); -#ifdef INET -extern int in_gre_attach(struct gre_softc *); -extern int in_gre_output(struct mbuf *, int, int); -#endif -#ifdef INET6 -extern int in6_gre_attach(struct gre_softc *); -extern int in6_gre_output(struct mbuf *, int, int); -#endif - SYSCTL_DECL(_net_link); static SYSCTL_NODE(_net_link, IFT_TUNNEL, gre, CTLFLAG_RW, 0, "Generic Routing Encapsulation"); Modified: stable/10/sys/net/if_gre.h == --- stable/10/sys/net/if_gre.h Sat Jun 6 13:20:02 2015(r284071) +++ stable/10/sys/net/if_gre.h Sat Jun 6 13:26:13 2015(r284072) @@ -100,6 +100,15 @@ struct gre_softc { #definegre_oip gre_gihdr->gi_ip #definegre_oip6gre_gi6hdr->gi6_ip6 +intgre_input(struct mbuf **, int *, int); +#ifdef INET +intin_gre_attach(struct gre_softc *); +intin_gre_output(struct mbuf *, int, int); +#endif +#ifdef INET6 +intin6_gre_attach(struct gre_softc *); +intin6_gre_output(struct mbuf *, int, int); +#endif /* * CISCO uses special type for GRE tunnel created as part of WCCP * connection, while in fact those packets are just IPv4 encapsulated Modified: stable/10/sys/netinet/in_gif.c == --- stable/10/sys/netinet/in_gif.c Sat Jun 6 13:20:02 2015 (r284071) +++ stable/10/sys/netinet/in_gif.c Sat Jun 6 13:26:13 2015 (r284072) @@ -57,7 +57,6 @@ __FBSDID("$FreeB
svn commit: r284071 - head/libexec/atrun
Author: bapt Date: Sat Jun 6 13:20:02 2015 New Revision: 284071 URL: https://svnweb.freebsd.org/changeset/base/284071 Log: Remove WARNS atrun builds fine with clang and gcc Modified: head/libexec/atrun/Makefile Modified: head/libexec/atrun/Makefile == --- head/libexec/atrun/Makefile Sat Jun 6 13:13:39 2015(r284070) +++ head/libexec/atrun/Makefile Sat Jun 6 13:20:02 2015(r284071) @@ -14,7 +14,6 @@ CLEANFILES= ${MAN} CFLAGS+=-I${MAINSRC} -I${.CURDIR} CFLAGS+=-DLOGIN_CAP -DPAM -WARNS?=2 WFORMAT=0 LIBADD=pam util ___ 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: r284070 - head/usr.bin/mail
Author: bapt Date: Sat Jun 6 13:13:39 2015 New Revision: 284070 URL: https://svnweb.freebsd.org/changeset/base/284070 Log: Add const to the copyright variable Bump WARNS to level 2 Modified: head/usr.bin/mail/Makefile head/usr.bin/mail/main.c Modified: head/usr.bin/mail/Makefile == --- head/usr.bin/mail/Makefile Sat Jun 6 13:09:49 2015(r284069) +++ head/usr.bin/mail/Makefile Sat Jun 6 13:13:39 2015(r284070) @@ -11,7 +11,7 @@ EFILES= mail.rc LINKS= ${BINDIR}/mail ${BINDIR}/Mail ${BINDIR}/mail ${BINDIR}/mailx MLINKS=mail.1 Mail.1 mail.1 mailx.1 -WARNS?=1 +WARNS?=2 .PATH: ${.CURDIR}/misc Modified: head/usr.bin/mail/main.c == --- head/usr.bin/mail/main.cSat Jun 6 13:09:49 2015(r284069) +++ head/usr.bin/mail/main.cSat Jun 6 13:13:39 2015(r284070) @@ -28,7 +28,7 @@ */ #ifndef lint -static char copyright[] = +static const char copyright[] = "@(#) Copyright (c) 1980, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ ___ 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: r284069 - head/usr.bin/keylogin
Author: bapt Date: Sat Jun 6 13:09:49 2015 New Revision: 284069 URL: https://svnweb.freebsd.org/changeset/base/284069 Log: Remove WARNS keylogin build fine with clang and gcc Modified: head/usr.bin/keylogin/Makefile Modified: head/usr.bin/keylogin/Makefile == --- head/usr.bin/keylogin/Makefile Sat Jun 6 13:08:48 2015 (r284068) +++ head/usr.bin/keylogin/Makefile Sat Jun 6 13:09:49 2015 (r284069) @@ -4,6 +4,4 @@ PROG= keylogin LIBADD=rpcsvc -WARNS?=0 - .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"
svn commit: r284068 - head/usr.bin/systat
Author: bapt Date: Sat Jun 6 13:08:48 2015 New Revision: 284068 URL: https://svnweb.freebsd.org/changeset/base/284068 Log: Bump WARNS level to 1 Modified: head/usr.bin/systat/Makefile Modified: head/usr.bin/systat/Makefile == --- head/usr.bin/systat/MakefileSat Jun 6 13:08:31 2015 (r284067) +++ head/usr.bin/systat/MakefileSat Jun 6 13:08:48 2015 (r284068) @@ -14,7 +14,7 @@ SRCS+=icmp6.c ip6.c CFLAGS+= -DINET6 .endif -WARNS?=0 +WARNS?=1 LIBADD=ncursesw m devstat kvm ___ 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: r284067 - head/usr.bin/systat
Author: bapt Date: Sat Jun 6 13:08:31 2015 New Revision: 284067 URL: https://svnweb.freebsd.org/changeset/base/284067 Log: Remove unused variable Modified: head/usr.bin/systat/main.c Modified: head/usr.bin/systat/main.c == --- head/usr.bin/systat/main.c Sat Jun 6 12:44:42 2015(r284066) +++ head/usr.bin/systat/main.c Sat Jun 6 13:08:31 2015(r284067) @@ -138,7 +138,6 @@ main(int argc, char **argv) { char errbuf[_POSIX2_LINE_MAX], dummy; size_t size; - double t; struct cmdentry *cmd = NULL; (void) setlocale(LC_ALL, ""); ___ 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: r284066 - in stable/10: . sbin/ifconfig share/man/man4 sys/conf sys/modules sys/modules/if_gif sys/modules/if_gre sys/modules/if_me sys/net sys/netinet sys/netinet6
Author: ae Date: Sat Jun 6 12:44:42 2015 New Revision: 284066 URL: https://svnweb.freebsd.org/changeset/base/284066 Log: MFC r274246: Overhaul if_gre(4). Split it into two modules: if_gre(4) for GRE encapsulation and if_me(4) for minimal encapsulation within IP. gre(4) changes: * convert to if_transmit; * rework locking: protect access to softc with rmlock, protect from concurrent ioctls with sx lock; * correct interface accounting for outgoing datagramms (count only payload size); * implement generic support for using IPv6 as delivery header; * make implementation conform to the RFC 2784 and partially to RFC 2890; * add support for GRE checksums - calculate for outgoing datagramms and check for inconming datagramms; * add support for sending sequence number in GRE header; * remove support of cached routes. This fixes problem, when gre(4) doesn't work at system startup. But this also removes support for having tunnels with the same addresses for inner and outer header. * deprecate support for various GREXXX ioctls, that doesn't used in FreeBSD. Use our standard ioctls for tunnels. me(4): * implementation conform to RFC 2004; * use if_transmit; * use the same locking model as gre(4); PR: 164475 MFC r274289 (by bz): gcc requires variables to be initialised in two places. One of them is correctly used only under the same conditional though. For module builds properly check if the kernel supports INET or INET6, as otherwise various mips kernels without IPv6 support would fail to build. MFC r274964: Add ip_gre.h to ObsoleteFiles.inc. Added: stable/10/share/man/man4/me.4 - copied unchanged from r274246, head/share/man/man4/me.4 stable/10/sys/modules/if_me/ - copied from r274246, head/sys/modules/if_me/ stable/10/sys/net/if_me.c - copied, changed from r274246, head/sys/net/if_me.c stable/10/sys/netinet6/ip6_gre.c - copied, changed from r274246, head/sys/netinet6/ip6_gre.c Deleted: stable/10/sys/netinet/ip_gre.h Modified: stable/10/ObsoleteFiles.inc stable/10/sbin/ifconfig/ifgre.c stable/10/share/man/man4/Makefile stable/10/share/man/man4/gre.4 stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/modules/Makefile stable/10/sys/modules/if_gif/Makefile stable/10/sys/modules/if_gre/Makefile stable/10/sys/net/if_gre.c stable/10/sys/net/if_gre.h stable/10/sys/netinet/ip_gre.c stable/10/sys/netinet6/in6_proto.c Directory Properties: stable/10/ (props changed) stable/10/sys/gnu/dts/ (props changed) Modified: stable/10/ObsoleteFiles.inc == --- stable/10/ObsoleteFiles.inc Sat Jun 6 12:43:05 2015(r284065) +++ stable/10/ObsoleteFiles.inc Sat Jun 6 12:44:42 2015(r284066) @@ -44,6 +44,8 @@ OLD_FILES+=usr/share/man/man9/NDHASGIANT OLD_FILES+=usr/tests/sbin/mdconfig/legacy_test OLD_FILES+=usr/tests/sbin/mdconfig/mdconfig.test OLD_FILES+=usr/tests/sbin/mdconfig/run.pl +# 20141107: overhaul if_gre(4) +OLD_FILES+=usr/include/netinet/ip_gre.h # 20141028: debug files accidentally installed as directory name OLD_FILES+=usr/lib/debug/usr/lib/i18n OLD_FILES+=usr/lib/debug/usr/lib/private Modified: stable/10/sbin/ifconfig/ifgre.c == --- stable/10/sbin/ifconfig/ifgre.c Sat Jun 6 12:43:05 2015 (r284065) +++ stable/10/sbin/ifconfig/ifgre.c Sat Jun 6 12:44:42 2015 (r284066) @@ -23,52 +23,50 @@ * THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif +#include +__FBSDID("$FreeBSD$"); #include #include #include #include - -#include -#include - -#include #include #include -#include #include +#include #include -#include #include -#include +#include #include -#include #include "ifconfig.h" +#defineGREBITS "\020\01ENABLE_CSUM\02ENABLE_SEQ" + static void gre_status(int s); static void gre_status(int s) { - int grekey = 0; + uint32_t opts = 0; - ifr.ifr_data = (caddr_t)&grekey; + ifr.ifr_data = (caddr_t)&opts; if (ioctl(s, GREGKEY, &ifr) == 0) - if (grekey != 0) - printf("\tgrekey: %d\n", grekey); + if (opts != 0) + printf("\tgrekey: 0x%x (%u)\n", opts, opts); + opts = 0; + if (ioctl(s, GREGOPTS, &ifr) != 0 || opts == 0) + return; + printb("\toptions", opts, GREBITS); + putchar('\n'); } static void setifgrekey(const char *val, int dummy __unused, int s, const struct afswtch *afp) { - uint32_t grekey = atol(val); + uint32_t grekey = strtol(val, NULL, 0); strncpy(ifr.ifr_name, name, sizeof (ifr.ifr_name)); ifr.ifr_data = (caddr_t
svn commit: r284065 - head/usr.bin/rsh
Author: bapt Date: Sat Jun 6 12:43:05 2015 New Revision: 284065 URL: https://svnweb.freebsd.org/changeset/base/284065 Log: Make global variables static Remove WARNS from Makefile Modified: head/usr.bin/rsh/Makefile head/usr.bin/rsh/rsh.c Modified: head/usr.bin/rsh/Makefile == --- head/usr.bin/rsh/Makefile Sat Jun 6 12:41:25 2015(r284064) +++ head/usr.bin/rsh/Makefile Sat Jun 6 12:43:05 2015(r284065) @@ -4,8 +4,6 @@ PROG= rsh CFLAGS+=-I${.CURDIR}/../../libexec/rlogind -WARNS?=2 - BINOWN=root BINMODE=4555 Modified: head/usr.bin/rsh/rsh.c == --- head/usr.bin/rsh/rsh.c Sat Jun 6 12:41:25 2015(r284064) +++ head/usr.bin/rsh/rsh.c Sat Jun 6 12:43:05 2015(r284065) @@ -77,10 +77,10 @@ __FBSDID("$FreeBSD$"); /* * rsh - remote shell */ -intrfd2; +static int rfd2; -int family = PF_UNSPEC; -char rlogin[] = "rlogin"; +static int family = PF_UNSPEC; +static char rlogin[] = "rlogin"; void connect_timeout(int); char *copyargs(char * const *); ___ 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: r284064 - head/usr.bin/rup
Author: bapt Date: Sat Jun 6 12:41:25 2015 New Revision: 284064 URL: https://svnweb.freebsd.org/changeset/base/284064 Log: Bump level WARNINGS to 3 Modified: head/usr.bin/rup/Makefile Modified: head/usr.bin/rup/Makefile == --- head/usr.bin/rup/Makefile Sat Jun 6 12:39:00 2015(r284063) +++ head/usr.bin/rup/Makefile Sat Jun 6 12:41:25 2015(r284064) @@ -2,8 +2,7 @@ PROG= rup -WARNS?=1 - +WARNS?=3 LIBADD=rpcsvc .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"
svn commit: r284063 - head/usr.bin/mkstr
Author: bapt Date: Sat Jun 6 12:39:00 2015 New Revision: 284063 URL: https://svnweb.freebsd.org/changeset/base/284063 Log: Make global variables static Remove WARNS from Makefile Modified: head/usr.bin/mkstr/Makefile head/usr.bin/mkstr/mkstr.c Modified: head/usr.bin/mkstr/Makefile == --- head/usr.bin/mkstr/Makefile Sat Jun 6 12:34:59 2015(r284062) +++ head/usr.bin/mkstr/Makefile Sat Jun 6 12:39:00 2015(r284063) @@ -3,6 +3,4 @@ PROG= mkstr -WARNS?=2 - .include Modified: head/usr.bin/mkstr/mkstr.c == --- head/usr.bin/mkstr/mkstr.c Sat Jun 6 12:34:59 2015(r284062) +++ head/usr.bin/mkstr/mkstr.c Sat Jun 6 12:39:00 2015(r284063) @@ -76,8 +76,8 @@ __FBSDID("$FreeBSD$"); * existing error message file for recompilation of single routines. */ -FILE *mesgread, *mesgwrite; -char name[100], *np; +static FILE*mesgread, *mesgwrite; +static charname[100], *np; void copystr(void); int fgetNUL(char *, int, FILE *); @@ -267,7 +267,7 @@ inithash(void) #defineNBUCKETS511 -struct hash { +static struct hash { longhval; unsigned hpt; struct hash *hnext; ___ 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: r284062 - head/usr.bin/vtfontcvt
Author: bapt Date: Sat Jun 6 12:34:59 2015 New Revision: 284062 URL: https://svnweb.freebsd.org/changeset/base/284062 Log: Remove WARNS vtfontcvt builds find with clang and gcc with maximum level warning Modified: head/usr.bin/vtfontcvt/Makefile Modified: head/usr.bin/vtfontcvt/Makefile == --- head/usr.bin/vtfontcvt/Makefile Sat Jun 6 12:10:10 2015 (r284061) +++ head/usr.bin/vtfontcvt/Makefile Sat Jun 6 12:34:59 2015 (r284062) @@ -3,6 +3,4 @@ PROG= vtfontcvt MAN8= vtfontcvt.8 -WARNS?=6 - .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"
svn commit: r284061 - head/usr.bin/colcrt
Author: bapt Date: Sat Jun 6 12:10:10 2015 New Revision: 284061 URL: https://svnweb.freebsd.org/changeset/base/284061 Log: Fix history Modified: head/usr.bin/colcrt/colcrt.1 Modified: head/usr.bin/colcrt/colcrt.1 == --- head/usr.bin/colcrt/colcrt.1Sat Jun 6 12:08:10 2015 (r284060) +++ head/usr.bin/colcrt/colcrt.1Sat Jun 6 12:10:10 2015 (r284061) @@ -28,7 +28,7 @@ .\" @(#)colcrt.1 8.1 (Berkeley) 6/30/93 .\" $FreeBSD$ .\" -.Dd July 31, 2004 +.Dd June 6, 2015 .Dt COLCRT 1 .Os .Sh NAME @@ -93,8 +93,8 @@ tbl exum2.n \&| nroff \-ms \&| colcrt \- .Sh HISTORY The .Nm -command appeared in -.Bx 3.0 . +utility first appeared in +.Bx 1 . .Sh BUGS Should fold underlines onto blanks even with the .Sq Fl ___ 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: r284060 - head/usr.bin/mkstr
Author: bapt Date: Sat Jun 6 12:08:10 2015 New Revision: 284060 URL: https://svnweb.freebsd.org/changeset/base/284060 Log: Fix HISTORY and add AUTHORS section Obtained from:OpenBSD (by schwarze@) Modified: head/usr.bin/mkstr/mkstr.1 Modified: head/usr.bin/mkstr/mkstr.1 == --- head/usr.bin/mkstr/mkstr.1 Sat Jun 6 12:04:38 2015(r284059) +++ head/usr.bin/mkstr/mkstr.1 Sat Jun 6 12:08:10 2015(r284060) @@ -28,7 +28,7 @@ .\" @(#)mkstr.18.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd November 1, 2002 +.Dd June 6, 2015 .Dt MKSTR 1 .Os .Sh NAME @@ -118,10 +118,16 @@ error(a1, a2, a3, a4) .Xr xstr 1 , .Xr lseek 2 .Sh HISTORY -An +The .Nm -utility appeared in -.Bx 3.0 . +utility first appeared in +.Bx 1 . +.Sh AUTHORS +.An -nosplit +.An Bill Joy +and +.An Chuck Haley , +1977. .Sh BUGS The .Nm ___ 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: r284059 - head/usr.bin/last
Author: bapt Date: Sat Jun 6 12:04:38 2015 New Revision: 284059 URL: https://svnweb.freebsd.org/changeset/base/284059 Log: Fix history, add AUTHORS section Obtained from:OpenBSD (by schwarze@) Modified: head/usr.bin/last/last.1 Modified: head/usr.bin/last/last.1 == --- head/usr.bin/last/last.1Sat Jun 6 12:01:35 2015(r284058) +++ head/usr.bin/last/last.1Sat Jun 6 12:04:38 2015(r284059) @@ -28,7 +28,7 @@ .\" @(#)last.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd January 21, 2010 +.Dd June 6, 2015 .Dt LAST 1 .Os .Sh NAME @@ -202,10 +202,15 @@ login data base .Xr ac 8 , .Xr lastlogin 8 .Sh HISTORY -A .Nm -utility appeared in -.Bx 3.0 . +utility first appeared in +.Bx 1 . +.Sh AUTHORS +.An -nosplit +The original version was written by +.An Howard P. Katseff ; +.An Keith Bostic +rewrote it in 1986/87 to add functionality and to improve code quality. .Sh BUGS If a login shell should terminate abnormally for some reason, it is likely that a logout record will not be written to 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: r284058 - head/usr.bin/fold
Author: bapt Date: Sat Jun 6 12:01:35 2015 New Revision: 284058 URL: https://svnweb.freebsd.org/changeset/base/284058 Log: Complete documenting the HISTORY Obtained from:OpenBSD (by schwarze@) Modified: head/usr.bin/fold/fold.1 Modified: head/usr.bin/fold/fold.1 == --- head/usr.bin/fold/fold.1Sat Jun 6 11:58:19 2015(r284057) +++ head/usr.bin/fold/fold.1Sat Jun 6 12:01:35 2015(r284058) @@ -28,7 +28,7 @@ .\"@(#)fold.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd December 15, 2006 +.Dd June 6, 2015 .Dt FOLD 1 .Os .Sh NAME @@ -84,6 +84,33 @@ The .Nm utility conforms to .St -p1003.1-2001 . +.Sh HISTORY +The +.Nm +utility first appeared in +.Bx 1 . +It was rewritten for +.Bx 4.3 Reno +to improve speed and modernize style. +The +.Fl b +and +.Fl s +options were added to +.Nx 1.0 +for +.St -p1003.2 +compliance. +.Sh AUTHORS +.An -nosplit +.An Bill Joy +wrote the original version of +.Nm +on June 28, 1977. +.An Kevin Ruddy +rewrote the command in 1990, and +.An J. T. Conklin +added the missing options in 1993. .Sh BUGS If underlining (see .Xr ul 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: r284057 - head/usr.bin/expand
Author: bapt Date: Sat Jun 6 11:58:19 2015 New Revision: 284057 URL: https://svnweb.freebsd.org/changeset/base/284057 Log: Fix history (appeared in 1BSD) Obtained from:OpenBSD (by schwarze@) Modified: head/usr.bin/expand/expand.1 Modified: head/usr.bin/expand/expand.1 == --- head/usr.bin/expand/expand.1Sat Jun 6 11:55:35 2015 (r284056) +++ head/usr.bin/expand/expand.1Sat Jun 6 11:58:19 2015 (r284057) @@ -28,7 +28,7 @@ .\"@(#)expand.18.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd October 13, 2006 +.Dd June 6, 2015 .Dt EXPAND 1 .Os .Sh NAME @@ -110,5 +110,5 @@ utilities conform to .Sh HISTORY The .Nm -command appeared in -.Bx 3.0 . +utility first appeared in +.Bx 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: r284056 - head/usr.bin/tset
Author: bapt Date: Sat Jun 6 11:55:35 2015 New Revision: 284056 URL: https://svnweb.freebsd.org/changeset/base/284056 Log: Complete documenting the HISTORY of what remains of the 1BSD heritage Obtained from:OpenBSD (by schwarze@) Modified: head/usr.bin/tset/tset.1 Modified: head/usr.bin/tset/tset.1 == --- head/usr.bin/tset/tset.1Sat Jun 6 11:42:43 2015(r284055) +++ head/usr.bin/tset/tset.1Sat Jun 6 11:55:35 2015(r284056) @@ -28,7 +28,7 @@ .\"@(#)tset.1 8.1 (Berkeley) 6/9/93 .\" $FreeBSD$ .\" -.Dd June 9, 1993 +.Dd June 6, 2015 .Dt TSET 1 .Os .Sh NAME @@ -400,5 +400,22 @@ older terminal interfaces. .Sh HISTORY The .Nm -command appeared in -.Bx 3.0 . +and +.Nm reset +utilities first appeared in +.Bx 1 . +.Sh AUTHORS +.An -nosplit +The original version of +.Nm tset +was written by +.An Eric P. Allman +in October 1977, and +.Nm reset +was originally written by +.An Kurt Shoens . +The current version also contains code by +.An Zeyd M. Ben-Halim , +.An Eric S. Raymond , +and +.An Thomas E. Dickey . ___ 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: r284055 - head/usr.bin/colrm
Author: bapt Date: Sat Jun 6 11:42:43 2015 New Revision: 284055 URL: https://svnweb.freebsd.org/changeset/base/284055 Log: Fix history: colrm(1) appeared in 1BSD not 3.0BSD Add Author section Obtained from:OpenBSD (change by schwarze@) Modified: head/usr.bin/colrm/colrm.1 Modified: head/usr.bin/colrm/colrm.1 == --- head/usr.bin/colrm/colrm.1 Sat Jun 6 11:19:21 2015(r284054) +++ head/usr.bin/colrm/colrm.1 Sat Jun 6 11:42:43 2015(r284055) @@ -28,7 +28,7 @@ .\" @(#)colrm.18.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd August 4, 2004 +.Dd June 6, 2015 .Dt COLRM 1 .Os .Sh NAME @@ -83,5 +83,10 @@ as described in .Sh HISTORY The .Nm -command appeared in -.Bx 3.0 . +utility first appeared in +.Bx 1 . +.Sh AUTHORS +.An Jeff Schriebman +wrote the original version of +.Nm +in November 1974. ___ 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: r284054 - head/share/misc
Author: brnrd (ports committer) Date: Sat Jun 6 11:19:21 2015 New Revision: 284054 URL: https://svnweb.freebsd.org/changeset/base/284054 Log: Add myself (brnrd / Bernard Spil) to committers docs - Add myself and vsevolod (mentor) to committers-ports.dot - Add koobs and vsevolod as mentors to committers-ports.dot Submitted by: br...@freebsd.org Approved by: vsevolod (mentor), koobs (mentor) Differential Revision: https://reviews.freebsd.org/D2648 Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot == --- head/share/misc/committers-ports.dotSat Jun 6 10:28:38 2015 (r284053) +++ head/share/misc/committers-ports.dotSat Jun 6 11:19:21 2015 (r284054) @@ -68,6 +68,7 @@ bf [label="Brendan Fabeny\n...@freebsd.or bland [label="Alexander Nedotsukov\nbl...@freebsd.org\n2003/08/14"] bmah [label="Bruce A. Mah\nb...@freebsd.org\n2000/08/23"] bofh [label="Muhammad Moinur Rahman\nb...@freebsd.org\n2014/12/23"] +brnrd [label="Bernard Spil\nbr...@freebsd.org\n2015/05/24"] brix [label="Henrik Brix Andersen\nb...@freebsd.org\n2007/10/31"] brooks [label="Brooks Davies\nbro...@freebsd.org\n2004/05/03"] bsam [label="Boris Samorodov\nb...@freebsd.org\n2006/07/20"] @@ -224,6 +225,7 @@ trociny [label="Mikolaj Golub\ntrociny@F uqs [label="Ulrich Spoerlein\n...@freebsd.org\n2012/01/19"] vd [label="Vasil Dimov\n...@freebsd.org\n2006/01/19"] vg [label="Veniamin Gvozdikov\n...@freebsd.org\n2013/06/11"] +vsevolod [label="Vsevolod Stakhov\nvsevo...@freebsd.org\n2005/07/22"] wen [label="Wen Heping\n...@freebsd.org\n2010/12/13"] wg [label="William Grzybowski\n...@freebsd.org\n2013/04/01"] wxs [label="Wesley Shields\n...@freebsd.org\n2008/01/03"] @@ -404,6 +406,7 @@ knu -> maho knu -> nobutaka knu -> nork +koobs -> brnrd koobs -> kami koobs -> xmj @@ -576,6 +579,8 @@ thierry -> riggs tmclaugh -> itetcu tmclaugh -> xride +vsevolod -> brnrd + wen -> cs wen -> culot wen -> pawel ___ 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: r284053 - head/lib/libc/aarch64/gen
Author: andrew Date: Sat Jun 6 10:28:38 2015 New Revision: 284053 URL: https://svnweb.freebsd.org/changeset/base/284053 Log: Set the correct register when calling sigprocmask in longjmp. Submitted by: Patrick Wildt Obtained from:dr...@bitrig.org Modified: head/lib/libc/aarch64/gen/setjmp.S Modified: head/lib/libc/aarch64/gen/setjmp.S == --- head/lib/libc/aarch64/gen/setjmp.S Sat Jun 6 09:28:40 2015 (r284052) +++ head/lib/libc/aarch64/gen/setjmp.S Sat Jun 6 10:28:38 2015 (r284053) @@ -80,7 +80,7 @@ ENTRY(longjmp) str x1, [sp, #16] /* Restore the signal mask */ - mov x1, #0 /* oset */ + mov x2, #0 /* oset */ add x1, x0, #(_JB_SIGMASK * 8) /* set */ mov x0, #3 /* SIG_BLOCK */ bl sigprocmask ___ 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: r284052 - in stable/10/sys: arm/conf conf dev/cxgbe modules modules/cxgbe/if_cxgbe powerpc/conf
Author: np Date: Sat Jun 6 09:28:40 2015 New Revision: 284052 URL: https://svnweb.freebsd.org/changeset/base/284052 Log: MFC r276480, r276485, r276498, r277225, r277226, r277227, r277230, r277637, and r283149 (by emaste@). r276485 is the real change here, the rest deal with the fallout of mp_ring's reliance on 64b atomics. Use the incorrectly spelled 'eigth' from struct pkthdr in this branch instead of MFC'ing r261733, which would have renamed the field of a public structure in a -STABLE branch. --- r276480: Temporarily unplug cxgbe(4) from !amd64 builds. r276485: cxgbe(4): major tx rework. a) Front load as much work as possible in if_transmit, before any driver lock or software queue has to get involved. b) Replace buf_ring with a brand new mp_ring (multiproducer ring). This is specifically for the tx multiqueue model where one of the if_transmit producer threads becomes the consumer and other producers carry on as usual. mp_ring is implemented as standalone code and it should be possible to use it in any driver with tx multiqueue. It also has: - the ability to enqueue/dequeue multiple items. This might become significant if packet batching is ever implemented. - an abdication mechanism to allow a thread to give up writing tx descriptors and have another if_transmit thread take over. A thread that's writing tx descriptors can end up doing so for an unbounded time period if a) there are other if_transmit threads continuously feeding the sofware queue, and b) the chip keeps up with whatever the thread is throwing at it. - accurate statistics about interesting events even when the stats come at the expense of additional branches/conditional code. The NIC txq lock is uncontested on the fast path at this point. I've left it there for synchronization with the control events (interface up/down, modload/unload). c) Add support for "type 1" coalescing work request in the normal NIC tx path. This work request is optimized for frames with a single item in the DMA gather list. These are very common when forwarding packets. Note that netmap tx in cxgbe already uses these "type 1" work requests. d) Do not request automatic cidx updates every 32 descriptors. Instead, request updates via bits in individual work requests (still every 32 descriptors approximately). Also, request an automatic final update when the queue idles after activity. This means NIC tx reclaim is still performed lazily but it will catch up quickly as soon as the queue idles. This seems to be the best middle ground and I'll probably do something similar for netmap tx as well. e) Implement a faster tx path for WRQs (used by TOE tx and control queues, _not_ by the normal NIC tx). Allow work requests to be written directly to the hardware descriptor ring if room is available. I will convert t4_tom and iw_cxgbe modules to this faster style gradually. r276498: cxgbe(4): remove buf_ring specific restriction on the txq size. r277225: Make cxgbe(4) buildable with the gcc in base. r277226: Allow cxgbe(4) to be built on i386. Driver attach will succeed only on a subset of i386 systems. r277227: Plug cxgbe(4) back into !powerpc && !arm builds, instead of building it on amd64 only. r277230: Build cxgbe(4) on powerpc64 too. r277637: Make sure the compiler flag to get cxgbe(4) to compile with gcc is used only when gcc is being used. This is what r277225 should have been. Added: stable/10/sys/dev/cxgbe/t4_mp_ring.c - copied, changed from r276485, head/sys/dev/cxgbe/t4_mp_ring.c stable/10/sys/dev/cxgbe/t4_mp_ring.h - copied unchanged from r276485, head/sys/dev/cxgbe/t4_mp_ring.h Modified: stable/10/sys/arm/conf/NOTES stable/10/sys/conf/NOTES stable/10/sys/conf/files stable/10/sys/dev/cxgbe/adapter.h stable/10/sys/dev/cxgbe/t4_l2t.c stable/10/sys/dev/cxgbe/t4_main.c stable/10/sys/dev/cxgbe/t4_sge.c stable/10/sys/modules/Makefile stable/10/sys/modules/cxgbe/if_cxgbe/Makefile stable/10/sys/powerpc/conf/NOTES Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/conf/NOTES == --- stable/10/sys/arm/conf/NOTESSat Jun 6 06:12:14 2015 (r284051) +++ stable/10/sys/arm/conf/NOTESSat Jun 6 09:28:40 2015 (r284052) @@ -82,6 +82,7 @@ nodevice snake_saver nodevice star_saver nodevice warp_saver +nodevice cxgbe nodevice pcii nodevice snd_cmi nodevice tnt4882 Modified: stable/10/sys/conf/NOTES == --- stable/10/sys/conf/NOTESSat Jun 6 06:12:14 2015(r284051) +++ stable/10/sys/conf/NOTESSat Jun 6 09:28:40 2015(r284052) @@ -1907,8 +1907,8 @@ devicexmphy