svn commit: r280680 - head/usr.bin/top
Author: kevlo Date: Thu Mar 26 09:13:16 2015 New Revision: 280680 URL: https://svnweb.freebsd.org/changeset/base/280680 Log: Print size_t's with %zu rather than "%zd. Reviewed by: bde Modified: head/usr.bin/top/machine.c Modified: head/usr.bin/top/machine.c == --- head/usr.bin/top/machine.c Thu Mar 26 08:38:53 2015(r280679) +++ head/usr.bin/top/machine.c Thu Mar 26 09:13:16 2015(r280680) @@ -373,7 +373,7 @@ machine_init(struct statics *statics, ch size = sizeof(long) * maxcpu * CPUSTATES; times = malloc(size); if (times == NULL) - err(1, "malloc %zd bytes", size); + err(1, "malloc %zu bytes", size); if (sysctlbyname("kern.cp_times", times, &size, NULL, 0) == -1) err(1, "sysctlbyname kern.cp_times"); pcpu_cp_time = calloc(1, size); @@ -1004,7 +1004,7 @@ format_next_process(caddr_t handle, char argbuflen = cmdlen * 4; argbuf = (char *)malloc(argbuflen + 1); if (argbuf == NULL) { - warn("malloc(%zd)", argbuflen + 1); + warn("malloc(%zu)", argbuflen + 1); free(cmdbuf); return NULL; } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280685 - head/sys/geom
Author: mav Date: Thu Mar 26 11:02:29 2015 New Revision: 280685 URL: https://svnweb.freebsd.org/changeset/base/280685 Log: When searching for provider by name, prefer non-withered one. MFC after:2 weeks Modified: head/sys/geom/geom_subr.c Modified: head/sys/geom/geom_subr.c == --- head/sys/geom/geom_subr.c Thu Mar 26 10:44:16 2015(r280684) +++ head/sys/geom/geom_subr.c Thu Mar 26 11:02:29 2015(r280685) @@ -683,21 +683,27 @@ g_provider_by_name(char const *arg) { struct g_class *cp; struct g_geom *gp; - struct g_provider *pp; + struct g_provider *pp, *wpp; if (strncmp(arg, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) arg += sizeof(_PATH_DEV) - 1; + wpp = NULL; LIST_FOREACH(cp, &g_classes, class) { LIST_FOREACH(gp, &cp->geom, geom) { LIST_FOREACH(pp, &gp->provider, provider) { - if (!strcmp(arg, pp->name)) + if (strcmp(arg, pp->name) != 0) + continue; + if ((gp->flags & G_GEOM_WITHER) == 0 && + (pp->flags & G_PF_WITHER) == 0) return (pp); + else + wpp = pp; } } } - return (NULL); + return (wpp); } void ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280686 - head/sys/geom
Author: mav Date: Thu Mar 26 11:19:24 2015 New Revision: 280686 URL: https://svnweb.freebsd.org/changeset/base/280686 Log: Report withered providers as such alike to GEOMs. MFC after:2 weeks Modified: head/sys/geom/geom_dump.c Modified: head/sys/geom/geom_dump.c == --- head/sys/geom/geom_dump.c Thu Mar 26 11:02:29 2015(r280685) +++ head/sys/geom/geom_dump.c Thu Mar 26 11:19:24 2015(r280686) @@ -216,7 +216,9 @@ g_conf_provider(struct sbuf *sb, struct sbuf_printf(sb, "\t %u\n", pp->sectorsize); sbuf_printf(sb, "\t %u\n", pp->stripesize); sbuf_printf(sb, "\t %u\n", pp->stripeoffset); - if (pp->geom->flags & G_GEOM_WITHER) + if (pp->flags & G_PF_WITHER) + sbuf_printf(sb, "\t \n"); + else if (pp->geom->flags & G_GEOM_WITHER) ; else if (pp->geom->dumpconf != NULL) { sbuf_printf(sb, "\t \n"); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280687 - in head: lib/libgeom sbin/geom/class/part sys/geom/part
Author: mav Date: Thu Mar 26 12:17:47 2015 New Revision: 280687 URL: https://svnweb.freebsd.org/changeset/base/280687 Log: Make GEOM_PART work in presence of previous withered self. MFC after:2 weeks Sponsored by: iXsystems, Inc. Modified: head/lib/libgeom/geom_xml2tree.c head/sbin/geom/class/part/geom_part.c head/sys/geom/part/g_part.c Modified: head/lib/libgeom/geom_xml2tree.c == --- head/lib/libgeom/geom_xml2tree.cThu Mar 26 11:19:24 2015 (r280686) +++ head/lib/libgeom/geom_xml2tree.cThu Mar 26 12:17:47 2015 (r280687) @@ -186,6 +186,7 @@ static void EndElement(void *userData, const char *name) { struct mystate *mt; + struct gconf *c; struct gconfig *gc; char *p; @@ -259,7 +260,14 @@ EndElement(void *userData, const char *n return; } - if (mt->config != NULL) { + if (mt->config != NULL || (!strcmp(name, "wither") && + (mt->provider != NULL || mt->geom != NULL))) { + if (mt->config != NULL) + c = mt->config; + else if (mt->provider != NULL) + c = &mt->provider->lg_config; + else + c = &mt->geom->lg_config; gc = calloc(1, sizeof *gc); if (gc == NULL) { mt->error = errno; @@ -270,14 +278,15 @@ EndElement(void *userData, const char *n } gc->lg_name = strdup(name); if (gc->lg_name == NULL) { + free(gc); mt->error = errno; XML_StopParser(mt->parser, 0); warn("Cannot allocate memory during processing of '%s' " "element", name); return; } - gc->lg_val = p; - LIST_INSERT_HEAD(mt->config, gc, lg_config); + gc->lg_val = p ? p : strdup("1"); + LIST_INSERT_HEAD(c, gc, lg_config); return; } Modified: head/sbin/geom/class/part/geom_part.c == --- head/sbin/geom/class/part/geom_part.c Thu Mar 26 11:19:24 2015 (r280686) +++ head/sbin/geom/class/part/geom_part.c Thu Mar 26 12:17:47 2015 (r280687) @@ -207,15 +207,20 @@ find_class(struct gmesh *mesh, const cha static struct ggeom * find_geom(struct gclass *classp, const char *name) { - struct ggeom *gp; + struct ggeom *gp, *wgp; if (strncmp(name, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0) name += sizeof(_PATH_DEV) - 1; + wgp = NULL; LIST_FOREACH(gp, &classp->lg_geom, lg_geom) { - if (strcmp(gp->lg_name, name) == 0) + if (strcmp(gp->lg_name, name) != 0) + continue; + if (find_geomcfg(gp, "wither") == NULL) return (gp); + else + wgp = gp; } - return (NULL); + return (wgp); } static const char * @@ -609,6 +614,8 @@ gpart_show_geom(struct ggeom *gp, const off_t length, secsz; int idx, wblocks, wname, wmax; + if (find_geomcfg(gp, "wither")) + return; scheme = find_geomcfg(gp, "scheme"); if (scheme == NULL) errx(EXIT_FAILURE, "Scheme not found for geom %s", gp->lg_name); Modified: head/sys/geom/part/g_part.c == --- head/sys/geom/part/g_part.c Thu Mar 26 11:19:24 2015(r280686) +++ head/sys/geom/part/g_part.c Thu Mar 26 12:17:47 2015(r280687) @@ -452,7 +452,8 @@ g_part_find_geom(const char *name) { struct g_geom *gp; LIST_FOREACH(gp, &g_part_class.geom, geom) { - if (!strcmp(name, gp->name)) + if ((gp->flags & G_GEOM_WITHER) == 0 && + strcmp(name, gp->name) == 0) break; } return (gp); @@ -474,10 +475,6 @@ g_part_parm_geom(struct gctl_req *req, c gctl_error(req, "%d %s '%s'", EINVAL, name, gname); return (EINVAL); } - if ((gp->flags & G_GEOM_WITHER) != 0) { - gctl_error(req, "%d %s", ENXIO, gname); - return (ENXIO); - } *v = gp; return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280688 - head/share/man/man4
Author: ru Date: Thu Mar 26 12:52:21 2015 New Revision: 280688 URL: https://svnweb.freebsd.org/changeset/base/280688 Log: Corrected descriptions of net.inet.icmp.icmplim and icmplim_output. Reviewed by: pluknet Modified: head/share/man/man4/icmp.4 Modified: head/share/man/man4/icmp.4 == --- head/share/man/man4/icmp.4 Thu Mar 26 12:17:47 2015(r280687) +++ head/share/man/man4/icmp.4 Thu Mar 26 12:52:21 2015(r280688) @@ -28,7 +28,7 @@ .\" @(#)icmp.4 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd September 30, 2014 +.Dd March 26, 2015 .Dt ICMP 4 .Os .Sh NAME @@ -177,13 +177,11 @@ Defaults to 0. .It Va icmplim .Pq Vt integer Bandwidth limit for ICMP replies in packets/second. -Used when -.Va icmplim_output -is non-zero. +If set to zero, no limiting will occur. Defaults to 200. .It Va icmplim_output .Pq Vt boolean -Enable/disable bandwidth limiting of ICMP replies. +Enable/disable logging of ICMP replies bandwidth limiting. Defaults to true. .It Va drop_redirect .Pq Vt boolean ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280689 - head/sys/mips/conf
Author: gjb Date: Thu Mar 26 12:58:30 2015 New Revision: 280689 URL: https://svnweb.freebsd.org/changeset/base/280689 Log: Remove duplicate AH_DEBUG_ALQ option. Sponsored by: The FreeBSD Foundation Modified: head/sys/mips/conf/AR91XX_BASE Modified: head/sys/mips/conf/AR91XX_BASE == --- head/sys/mips/conf/AR91XX_BASE Thu Mar 26 12:52:21 2015 (r280688) +++ head/sys/mips/conf/AR91XX_BASE Thu Mar 26 12:58:30 2015 (r280689) @@ -68,7 +68,6 @@ deviceath_ahb # Atheros host bus glue optionsATH_DEBUG optionsATH_DIAGAPI option ATH_ENABLE_11N -option AH_DEBUG_ALQ # Don't bother compiling the whole HAL - AH_SUPPORT_AR9130 breaks the # rest of the 11n chipset support at the moment and the pre-AR5212 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r280636 - head/include
On Thu, 26 Mar 2015 17:37:53 +1100 (EST) Bruce Evans wrote: > On Wed, 25 Mar 2015, Pedro Giffuni wrote: >> On 03/25/15 21:14, Bruce Evans wrote: >>> On Wed, 25 Mar 2015, Pedro F. Giffuni wrote: Log: Temporarily revert 280458. GCC is still carries an old version of cdefs.h which doesn't accept multiple parameters for the nonnull attribute. Since this issue probably affects many ports in the tree we will revert it for now until gcc gets fixed. >>> >>> Note that sys/cdefs.h is supposed to work with any version of >>> gcc back to gcc-1, and does mostly work back to at least gcc-2.95. >>> The whole point of sys/cdefs.h is to provide compatibity macros >>> for old and other non-default compilers. Standard compilers don't >>> even have __attribute__(()). So no changes in future versions >>> of gcc will fix the previous commit. >> >> cdefs.h still works for all versions of gcc back to gcc-1 AFAICT. > > I now remember other bugs in it. I think you put the varargs stuff > in the non-gcc version. That won't work compilers that don't support > varargs for macros. Neither will not changing the non-gcc version. > > glibc (2.6 at least) avoids using varargs in its __nonnull() macro > by using the same portable method that is used in many optional > debugging statements including FreeBSD's KASSERT(). (KASSERT() is > broken as designed. It never needed this since it wasn't implmented > until several years after C99 standardized varargs for macros.) > The macro takes a single arg consisting of a normal list of args > enclosed in parentheses. The extra parentheses are not passed to > the __attribute__() list. All invocations of the macro must be > ugly to supply the parantheses. The parentheses give a large > syntactic difference, so the ugliness cannot be fixed easily by > switching to varargs macros. For KASSERT(), there would be about > 7500 in /usr/src lines to clean up. For __nonnull(), there would > be only about lines 160 in /usr/src to change. Mostly > __nonnull(1) -> __nonnull((1)). But __nonnull() is more likely to > be (mis)used in ports. Maybe introduce a __nonnull_all macro and leave __nonnull varargs-free: #define __nonnull(x)__attribute__((__nonnull__(x))) #define __nonnull_all __attribute__((__nonnull__)) Then in the rare cases where multiple arguments must be nonnull but __nonnull_all doesn't apply you can use multiple __nonnull: int f(void *, void *, void *) __nonnull(1) __nonnull(2); >> The reason why I had to revert the change is actually a systematic >> bug in gcc: during it's build process gcc generates a new cdefs.h >> from our headers. Attempting to use an older gcc from ports >> that was build with the broken mono-parameter __nonnull() ended >> up causing breakage in any code using signal.h or pthreads.h. > > I see. gcc's "fixed" headers cause lots of problems. I've complained about this multiple times in the past. The gcc ports should not install these "fixed" headers. Pedro, by reverting this commit you only allow this problem to persist, so please reapply it. You also shouldn't wait weeks before applying the next commit. No amount of waiting is enough. There will always be users bitten by it. The problem is in the ports. It needs to be fixed there. If you receive any problem reports that are caused by this gcc problem, forward them to the gcc port maintainer. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280690 - head/sys/netpfil/pf
Author: pluknet Date: Thu Mar 26 13:31:04 2015 New Revision: 280690 URL: https://svnweb.freebsd.org/changeset/base/280690 Log: Static'ize pf_fillup_fragment body to match its declaration. Missed in 278925. Modified: head/sys/netpfil/pf/pf_norm.c Modified: head/sys/netpfil/pf/pf_norm.c == --- head/sys/netpfil/pf/pf_norm.c Thu Mar 26 12:58:30 2015 (r280689) +++ head/sys/netpfil/pf/pf_norm.c Thu Mar 26 13:31:04 2015 (r280690) @@ -386,7 +386,7 @@ pf_create_fragment(u_short *reason) return (frent); } -struct pf_fragment * +static struct pf_fragment * pf_fillup_fragment(struct pf_fragment_cmp *key, struct pf_frent *frent, u_short *reason) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r280636 - head/include
On 03/26/15 01:37, Bruce Evans wrote: On Wed, 25 Mar 2015, Pedro Giffuni wrote: On 03/25/15 21:14, Bruce Evans wrote: On Wed, 25 Mar 2015, Pedro F. Giffuni wrote: Log: Temporarily revert 280458. GCC is still carries an old version of cdefs.h which doesn't accept multiple parameters for the nonnull attribute. Since this issue probably affects many ports in the tree we will revert it for now until gcc gets fixed. Note that sys/cdefs.h is supposed to work with any version of gcc back to gcc-1, and does mostly work back to at least gcc-2.95. The whole point of sys/cdefs.h is to provide compatibity macros for old and other non-default compilers. Standard compilers don't even have __attribute__(()). So no changes in future versions of gcc will fix the previous commit. cdefs.h still works for all versions of gcc back to gcc-1 AFAICT. I now remember other bugs in it. I think you put the varargs stuff in the non-gcc version. That won't work compilers that don't support varargs for macros. Neither will not changing the non-gcc version. According to the gcc documentation [1] "Variadic macros are a new feature in C99. GNU CPP has supported them for a long time, but only with a named variable argument (‘args...’, not ‘...’ and |__VA_ARGS__|). If you are concerned with portability to previous versions of GCC, you should use only named variable arguments. On the other hand, if you are concerned with portability to other conforming implementations of C99, you should use only |__VA_ARGS__|." I gave priority for C99 conformant compilers instead of older (which?) gcc versions. glibc (2.6 at least) avoids using varargs in its __nonnull() macro by using the same portable method that is used in many optional debugging statements including FreeBSD's KASSERT(). I will take a look at KASSERT(), I normally avoid looking at glibc as it is likely to have GNUisms, and maybe even license issues. (KASSERT() is broken as designed. It never needed this since it wasn't implmented until several years after C99 standardized varargs for macros.) The macro takes a single arg consisting of a normal list of args enclosed in parentheses. Hmm.. I think Android's Bionic libc does the same, it's really ugly. Thanks, Pedro. [1] https://gcc.gnu.org/onlinedocs/cpp/Variadic-Macros.html ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r280636 - head/include
On 03/26/15 08:20, Tijl Coosemans wrote: On Thu, 26 Mar 2015 17:37:53 +1100 (EST) Bruce Evans wrote: --- snip --- glibc (2.6 at least) avoids using varargs in its __nonnull() macro by using the same portable method that is used in many optional debugging statements including FreeBSD's KASSERT(). (KASSERT() is broken as designed. It never needed this since it wasn't implmented until several years after C99 standardized varargs for macros.) The macro takes a single arg consisting of a normal list of args enclosed in parentheses. The extra parentheses are not passed to the __attribute__() list. All invocations of the macro must be ugly to supply the parantheses. The parentheses give a large syntactic difference, so the ugliness cannot be fixed easily by switching to varargs macros. For KASSERT(), there would be about 7500 in /usr/src lines to clean up. For __nonnull(), there would be only about lines 160 in /usr/src to change. Mostly __nonnull(1) -> __nonnull((1)). But __nonnull() is more likely to be (mis)used in ports. Maybe introduce a __nonnull_all macro and leave __nonnull varargs-free: #define __nonnull(x)__attribute__((__nonnull__(x))) #define __nonnull_all __attribute__((__nonnull__)) Then in the rare cases where multiple arguments must be nonnull but __nonnull_all doesn't apply you can use multiple __nonnull: int f(void *, void *, void *) __nonnull(1) __nonnull(2); the __all extension takes more space than the extra parenthesis. I honestly see no reason to cope with pre-C99 compilers. The base compilers accept the standard varargs fine, for previous compilers we will ignore non standard varargs and use the null implementation. The reason why I had to revert the change is actually a systematic bug in gcc: during it's build process gcc generates a new cdefs.h from our headers. Attempting to use an older gcc from ports that was build with the broken mono-parameter __nonnull() ended up causing breakage in any code using signal.h or pthreads.h. I see. gcc's "fixed" headers cause lots of problems. I've complained about this multiple times in the past. The gcc ports should not install these "fixed" headers. Yes it is a gcc bug. And I already forwarded the issue to the gcc maintainer. Pedro, by reverting this commit you only allow this problem to persist, so please reapply it. You also shouldn't wait weeks before applying the next commit. No amount of waiting is enough. There will always be users bitten by it. The problem is in the ports. It needs to be fixed there. If you receive any problem reports that are caused by this gcc problem, forward them to the gcc port maintainer. There's no good reason not to be nice with our developers. I will update cdefs with a week anticipation and point them to update gcc after the header changes. I will MFC the cdefs updates but not the header changes. Pedro. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r280636 - head/include
On 26 Mar 2015, at 14:20, Tijl Coosemans wrote: > > On Thu, 26 Mar 2015 17:37:53 +1100 (EST) Bruce Evans > wrote: >> On Wed, 25 Mar 2015, Pedro Giffuni wrote: ... >>> The reason why I had to revert the change is actually a systematic >>> bug in gcc: during it's build process gcc generates a new cdefs.h >>> from our headers. Attempting to use an older gcc from ports >>> that was build with the broken mono-parameter __nonnull() ended >>> up causing breakage in any code using signal.h or pthreads.h. >> >> I see. gcc's "fixed" headers cause lots of problems. > > I've complained about this multiple times in the past. The gcc ports > should not install these "fixed" headers. Indeed. See also this recent discussion on -current: https://lists.freebsd.org/pipermail/freebsd-current/2015-March/055111.html where a "fixed" stdio.h (from a gcc port) causes trouble. -Dimitry signature.asc Description: Message signed with OpenPGP using GPGMail
svn commit: r280691 - in head/sys/mips: include mips
Author: br Date: Thu Mar 26 14:51:24 2015 New Revision: 280691 URL: https://svnweb.freebsd.org/changeset/base/280691 Log: Add 64 byte linesize cache flushing routines for L1 instruction, L1 data and L2 data caches. Sponsored by: HEIF5 Modified: head/sys/mips/include/cache_mipsNN.h head/sys/mips/include/cache_r4k.h head/sys/mips/mips/cache.c head/sys/mips/mips/cache_mipsNN.c Modified: head/sys/mips/include/cache_mipsNN.h == --- head/sys/mips/include/cache_mipsNN.hThu Mar 26 13:31:04 2015 (r280690) +++ head/sys/mips/include/cache_mipsNN.hThu Mar 26 14:51:24 2015 (r280691) @@ -43,37 +43,50 @@ voidmipsNN_cache_init(struct mips_cpuin void mipsNN_icache_sync_all_16(void); void mipsNN_icache_sync_all_32(void); +void mipsNN_icache_sync_all_64(void); +void mipsNN_icache_sync_all_128(void); void mipsNN_icache_sync_range_16(vm_offset_t, vm_size_t); void mipsNN_icache_sync_range_32(vm_offset_t, vm_size_t); +void mipsNN_icache_sync_range_64(vm_offset_t, vm_size_t); +void mipsNN_icache_sync_range_128(vm_offset_t, vm_size_t); void mipsNN_icache_sync_range_index_16(vm_offset_t, vm_size_t); void mipsNN_icache_sync_range_index_32(vm_offset_t, vm_size_t); +void mipsNN_icache_sync_range_index_64(vm_offset_t, vm_size_t); +void mipsNN_icache_sync_range_index_128(vm_offset_t, vm_size_t); void mipsNN_pdcache_wbinv_all_16(void); void mipsNN_pdcache_wbinv_all_32(void); +void mipsNN_pdcache_wbinv_all_64(void); +void mipsNN_pdcache_wbinv_all_128(void); void mipsNN_pdcache_wbinv_range_16(vm_offset_t, vm_size_t); void mipsNN_pdcache_wbinv_range_32(vm_offset_t, vm_size_t); +void mipsNN_pdcache_wbinv_range_64(vm_offset_t, vm_size_t); +void mipsNN_pdcache_wbinv_range_128(vm_offset_t, vm_size_t); void mipsNN_pdcache_wbinv_range_index_16(vm_offset_t, vm_size_t); void mipsNN_pdcache_wbinv_range_index_32(vm_offset_t, vm_size_t); +void mipsNN_pdcache_wbinv_range_index_64(vm_offset_t, vm_size_t); +void mipsNN_pdcache_wbinv_range_index_128(vm_offset_t, vm_size_t); void mipsNN_pdcache_inv_range_16(vm_offset_t, vm_size_t); void mipsNN_pdcache_inv_range_32(vm_offset_t, vm_size_t); +void mipsNN_pdcache_inv_range_64(vm_offset_t, vm_size_t); +void mipsNN_pdcache_inv_range_128(vm_offset_t, vm_size_t); void mipsNN_pdcache_wb_range_16(vm_offset_t, vm_size_t); void mipsNN_pdcache_wb_range_32(vm_offset_t, vm_size_t); -void mipsNN_icache_sync_all_128(void); -void mipsNN_icache_sync_range_128(vm_offset_t, vm_size_t); -void mipsNN_icache_sync_range_index_128(vm_offset_t, vm_size_t); -void mipsNN_pdcache_wbinv_all_128(void); -void mipsNN_pdcache_wbinv_range_128(vm_offset_t, vm_size_t); -void mipsNN_pdcache_wbinv_range_index_128(vm_offset_t, vm_size_t); -void mipsNN_pdcache_inv_range_128(vm_offset_t, vm_size_t); +void mipsNN_pdcache_wb_range_64(vm_offset_t, vm_size_t); void mipsNN_pdcache_wb_range_128(vm_offset_t, vm_size_t); void mipsNN_sdcache_wbinv_all_32(void); -void mipsNN_sdcache_wbinv_range_32(vm_offset_t, vm_size_t); -void mipsNN_sdcache_wbinv_range_index_32(vm_offset_t, vm_size_t); -void mipsNN_sdcache_inv_range_32(vm_offset_t, vm_size_t); -void mipsNN_sdcache_wb_range_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wbinv_all_64(void); void mipsNN_sdcache_wbinv_all_128(void); +void mipsNN_sdcache_wbinv_range_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wbinv_range_64(vm_offset_t, vm_size_t); void mipsNN_sdcache_wbinv_range_128(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wbinv_range_index_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wbinv_range_index_64(vm_offset_t, vm_size_t); void mipsNN_sdcache_wbinv_range_index_128(vm_offset_t, vm_size_t); +void mipsNN_sdcache_inv_range_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_inv_range_64(vm_offset_t, vm_size_t); void mipsNN_sdcache_inv_range_128(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wb_range_32(vm_offset_t, vm_size_t); +void mipsNN_sdcache_wb_range_64(vm_offset_t, vm_size_t); void mipsNN_sdcache_wb_range_128(vm_offset_t, vm_size_t); #endif /* _MACHINE_CACHE_MIPSNN_H_ */ Modified: head/sys/mips/include/cache_r4k.h == --- head/sys/mips/include/cache_r4k.h Thu Mar 26 13:31:04 2015 (r280690) +++ head/sys/mips/include/cache_r4k.h Thu Mar 26 14:51:24 2015 (r280691) @@ -114,6 +114,25 @@ do { \ } while (/*CONSTCOND*/0) /* + * cache_r4k_op_8lines_64: + * + * Perform the specified cache operation on 8 64-byte cache lines. + */ +#definecache_r4k_op_8lines_64(va, op) \ +do { \ + __asm __volatile(
svn commit: r280692 - head/sys/modules
Author: jhibbits Date: Thu Mar 26 14:55:22 2015 New Revision: 280692 URL: https://svnweb.freebsd.org/changeset/base/280692 Log: Make several modules unconditionally built, there's no need for them to be hidden. These modules pass a tinderbox build. Discussed with: ian and others MFC after:1 month Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Thu Mar 26 14:51:24 2015(r280691) +++ head/sys/modules/Makefile Thu Mar 26 14:55:22 2015(r280692) @@ -108,7 +108,7 @@ SUBDIR= \ ${_et} \ ${_ex} \ ${_exca} \ - ${_ext2fs} \ + ext2fs \ ${_fatm} \ fdc \ fdescfs \ @@ -132,7 +132,7 @@ SUBDIR= \ ${_hptrr} \ hwpmc \ ${_hyperv} \ - ${_i2c} \ + i2c \ ${_ibcore} \ ${_ibcs2} \ ${_ichwd} \ @@ -315,11 +315,11 @@ SUBDIR= \ siis \ sis \ sk \ - ${_smbfs} \ + smbfs \ sn \ ${_snc} \ snp \ - ${_sound} \ + sound \ ${_speaker} \ ${_splash} \ ${_sppp} \ @@ -498,10 +498,8 @@ _em= em _ep= ep _et= et _exca= exca -_ext2fs= ext2fs _fe= fe _filemon= filemon -_i2c= i2c .if ${MK_OFED} != "no" || defined(ALL_MODULES) _ibcore=ibcore .endif @@ -530,8 +528,6 @@ _rdma= rdma _safe= safe _scsi_low= scsi_low _si= si -_smbfs=smbfs -_sound=sound _speaker= speaker _splash= splash _sppp= sppp @@ -688,7 +684,6 @@ _snc= snc .if ${MACHINE_CPUARCH} == "arm" _cfi= cfi _cpsw= cpsw -_sound=sound .endif .if ${MACHINE_CPUARCH} == "powerpc" @@ -709,14 +704,11 @@ _nvram= powermac_nvram _opensolaris= opensolaris .endif _pccard= pccard -_smbfs=smbfs -_sound=sound _wi= wi .endif .if ${MACHINE_ARCH} == "powerpc64" _drm2= drm2 -_i2c= i2c .if ${MK_ZFS} != "no" || defined(ALL_MODULES) _zfs= zfs .endif @@ -726,13 +718,10 @@ _zfs= zfs _auxio=auxio _em= em _epic= epic -_i2c= i2c _igb= igb .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _opensolaris= opensolaris .endif -_smbfs=smbfs -_sound=sound .if ${MK_ZFS} != "no" || defined(ALL_MODULES) _zfs= zfs .endif ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280696 - head/share/misc
Author: kp Date: Thu Mar 26 15:27:38 2015 New Revision: 280696 URL: https://svnweb.freebsd.org/changeset/base/280696 Log: Add myself (kp) to committers-src.dot Approved by: philip (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot == --- head/share/misc/committers-src.dot Thu Mar 26 15:25:01 2015 (r280695) +++ head/share/misc/committers-src.dot Thu Mar 26 15:27:38 2015 (r280696) @@ -211,6 +211,7 @@ kensmith [label="Ken Smith\nkensmith@Fre kevlo [label="Kevin Lo\nke...@freebsd.org\n2006/07/23"] kib [label="Konstantin Belousov\n...@freebsd.org\n2006/06/03"] kmacy [label="Kip Macy\nkm...@freebsd.org\n2005/06/01"] +kp [label="Kristof Provost\n...@freebsd.org\n2015/03/22"] le [label="Lukas Ertl\n...@freebsd.org\n2004/02/02"] loos [label="Luiz Otavio O Souza\nl...@freebsd.org\n2013/07/03"] lstewart [label="Lawrence Stewart\nlstew...@freebsd.org\n2008/10/06"] @@ -446,6 +447,7 @@ gnn -> np gnn -> davide gnn -> arybchik gnn -> erj +gnn -> kp grehan -> bryanv @@ -624,6 +626,7 @@ philip -> ed philip -> jls philip -> matteo philip -> uqs +philip -> kp phk -> jkoshy phk -> mux ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280697 - head/usr.sbin/pmcstudy
Author: rrs Date: Thu Mar 26 15:40:47 2015 New Revision: 280697 URL: https://svnweb.freebsd.org/changeset/base/280697 Log: Update the manual page to be a bit more sane. It still may need some work, but at least now it will read properly. (gnn you are still on the hook to help out with this like you committed). Sponsored by: Netflix. Added: head/usr.sbin/pmcstudy/pmcstudy.8 (contents, props changed) Deleted: head/usr.sbin/pmcstudy/pmcstudy.1 Modified: head/usr.sbin/pmcstudy/Makefile head/usr.sbin/pmcstudy/pmcstudy.c Modified: head/usr.sbin/pmcstudy/Makefile == --- head/usr.sbin/pmcstudy/Makefile Thu Mar 26 15:27:38 2015 (r280696) +++ head/usr.sbin/pmcstudy/Makefile Thu Mar 26 15:40:47 2015 (r280697) @@ -2,6 +2,7 @@ # $FreeBSD$ PROG= pmcstudy +MAN= pmcstudy.8 SRCS= pmcstudy.c eval_expr.c CFLAGS+= -Wall -Werror Added: head/usr.sbin/pmcstudy/pmcstudy.8 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pmcstudy/pmcstudy.8 Thu Mar 26 15:40:47 2015 (r280697) @@ -0,0 +1,131 @@ +.\" Copyright (c) 2015 +.\"Netflix Inc. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd Mar 26, 2015 +.Dt PMCSTUDY 1 +.Os +.Sh NAME +.Nm pmcstudy +.Nd Perform various study's on a systems overall PMC's. +.Sh SYNOPSIS +.Nm +.Oo Fl i Ar inputfile | Fl T | Fl v | Fl m Ar max | Fl e exp | Fl Ar E | Fl h | fl H Oc +.Nm +.Fl i Ar inputfile +.Nm +.Fl v +.Nm +.Fl m Ar max +.Nm +.Fl e Ar exp-name +.Nm +.Fl E Ar your-expr +.Nm +.Fl h +.Nm +.Fl H +.Nm +.Fl T +.Sh DESCRIPTION +The +.Nm +program is designed to run various tests against your systems +performance. There are roughly 20-22 canned tests that setup specific +PMC's and then run various formulas on the output information. +These formulas can be found in Intel documentation "Using Intel Vtune +amplifier xe on NNN Generation Intel Core Processors". The NNN is either +2nd, 3rd or 4th generation i.e. Sandy Bridge, Ivy Bridge and Haswell. +Currently the program only works on these three Intel processor types. +.Sh OPTIONS +The following options are available: +.Bl -tag -width indent +.It Fl i Ar filename +If this option is supplied, instead of running a +.Xr pmcstat 8 +command to collecte the current running information the filename will be read +in as input instead. +.It Fl H +This option will display the complete list of canned formulas that can be run including +there names which can be input to the +.Fl e +option. +.It Fl e Ar name +Execute the canned test +.Ar name +on the running kernel. +.It Fl h +If you add this option to the +.Fl e +option the test will not execute but instead give you a small description +of the test that would run. +.It Fl T +This option will execute a test of every PMC to validate that they are working +on your system. If a PMC does not show up in this test chances +are the kernel hwpmc driver needs updating with new PMC information. +.It Fl m Ar num +This option can restrict the number of one second samples that will +be collected by your system when running a test (it bounds the +time the test will run). Without this option the test will run +for 1024 seconds or until the user types ctrl-c. +.It Fl v +The verbose option adds debugging output to the command. +.It Fl E Ar expression +This option can be used by those that have there own ideas +on what formulas that you want to run. The expression given to +the +.Fl E +option is a "formula". The formula can declare directly the PMC's by name +or you can use
svn commit: r280698 - head/usr.sbin/pmcstudy
Author: rrs Date: Thu Mar 26 15:43:57 2015 New Revision: 280698 URL: https://svnweb.freebsd.org/changeset/base/280698 Log: Opps its section 8 not 1 silly. MFC after:3 days Sponsored by: Netflix Modified: head/usr.sbin/pmcstudy/pmcstudy.8 Modified: head/usr.sbin/pmcstudy/pmcstudy.8 == --- head/usr.sbin/pmcstudy/pmcstudy.8 Thu Mar 26 15:40:47 2015 (r280697) +++ head/usr.sbin/pmcstudy/pmcstudy.8 Thu Mar 26 15:43:57 2015 (r280698) @@ -25,7 +25,7 @@ .\" $FreeBSD$ .\" .Dd Mar 26, 2015 -.Dt PMCSTUDY 1 +.Dt PMCSTUDY 8 .Os .Sh NAME .Nm pmcstudy ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280699 - head/usr.sbin/pmcstudy
Author: brueffer Date: Thu Mar 26 15:54:54 2015 New Revision: 280699 URL: https://svnweb.freebsd.org/changeset/base/280699 Log: Rough first mdoc, spelling and grammar cleanup pass. Modified: head/usr.sbin/pmcstudy/pmcstudy.8 Modified: head/usr.sbin/pmcstudy/pmcstudy.8 == --- head/usr.sbin/pmcstudy/pmcstudy.8 Thu Mar 26 15:43:57 2015 (r280698) +++ head/usr.sbin/pmcstudy/pmcstudy.8 Thu Mar 26 15:54:54 2015 (r280699) @@ -29,14 +29,14 @@ .Os .Sh NAME .Nm pmcstudy -.Nd Perform various study's on a systems overall PMC's. +.Nd Perform various studies on a system's overall PMCs. .Sh SYNOPSIS .Nm .Oo Fl i Ar inputfile | Fl T | Fl v | Fl m Ar max | Fl e exp | Fl Ar E | Fl h | fl H Oc -.Nm -.Fl i Ar inputfile .Nm -.Fl v +.Fl i Ar inputfile +.Nm +.Fl v .Nm .Fl m Ar max .Nm @@ -53,23 +53,25 @@ The .Nm program is designed to run various tests against your systems -performance. There are roughly 20-22 canned tests that setup specific -PMC's and then run various formulas on the output information. +performance. +There are roughly 20-22 canned tests that setup specific +PMCs and then run various formulas on the output information. These formulas can be found in Intel documentation "Using Intel Vtune -amplifier xe on NNN Generation Intel Core Processors". The NNN is either -2nd, 3rd or 4th generation i.e. Sandy Bridge, Ivy Bridge and Haswell. +amplifier xe on NNN Generation Intel Core Processors". +The NNN is either +2nd, 3rd or 4th generation i.e., Sandy Bridge, Ivy Bridge and Haswell. Currently the program only works on these three Intel processor types. .Sh OPTIONS The following options are available: .Bl -tag -width indent .It Fl i Ar filename If this option is supplied, instead of running a -.Xr pmcstat 8 -command to collecte the current running information the filename will be read +.Xr pmcstat 8 +command to collect the current running information the filename will be read in as input instead. .It Fl H This option will display the complete list of canned formulas that can be run including -there names which can be input to the +their names which can be input to the .Fl e option. .It Fl e Ar name @@ -83,22 +85,28 @@ option the test will not execute but ins of the test that would run. .It Fl T This option will execute a test of every PMC to validate that they are working -on your system. If a PMC does not show up in this test chances -are the kernel hwpmc driver needs updating with new PMC information. +on your system. +If a PMC does not show up in this test chances +are the kernel +.Xr hwpmc 4 +driver needs updating with new PMC information. .It Fl m Ar num This option can restrict the number of one second samples that will be collected by your system when running a test (it bounds the -time the test will run). Without this option the test will run +time the test will run). +Without this option the test will run for 1024 seconds or until the user types ctrl-c. .It Fl v The verbose option adds debugging output to the command. .It Fl E Ar expression -This option can be used by those that have there own ideas -on what formulas that you want to run. The expression given to -the +This option can be used by those that have their own ideas +on what formulas they want to run. +The expression given to the .Fl E -option is a "formula". The formula can declare directly the PMC's by name -or you can use an abbreviation %NNN. To find out the abbreviations +option is a "formula". +The formula can declare directly the PMCs by name +or you can use an abbreviation %NNN. +To find out the abbreviations on your system you may run the .Fl L option. @@ -107,21 +115,25 @@ An example of a formula of your own migh "FP_ASSIST.ANY / INST_RETIRED.ANY_P" or using the abbreviations on a Haswell machine you would type .Fl E -" %176 / %150". You must have spaces between each entry and -you may use paraenthisis to prioritize the operators. Add (+), Subtract (-), -Divide (/) and Multiplication (*) are supported. You may also introduce -constant numbers as well. So for example you can do a standard efficency +" %176 / %150". +You must have spaces between each entry and +you may use parentheses to prioritize the operators. +Add (+), Subtract (-), +Divide (/) and Multiplication (*) are supported. +You may also introduce +constant numbers. +For example you can do a standard efficency test like -.FL E +.Fl E "UOPS_RETIRED.RETIRE_SLOTS / (4 * CPU_CLK_UNHALTED.THREAD_P)". - .It Fl L -This option will list all known PMC's and there abbreviation (%NNN). +This option will list all known PMCs and their abbreviation (%NNN). +.El .Sh SEE ALSO .Xr pmc 3 , .Xr pmclog 3 , .Xr hwpmc 4 , -.Xr pmcstat 8 , +.Xr pmcstat 8 .Sh HISTORY The .Nm ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to
svn commit: r280700 - head/sys/sys
Author: pfg Date: Thu Mar 26 16:00:35 2015 New Revision: 280700 URL: https://svnweb.freebsd.org/changeset/base/280700 Log: Introduce some allocation function attributes. Bring support for two gcc function attributes that are likely to be used in our system headers: __alloc_size The alloc_size attribute is used to tell the compiler that the function return value points to memory, where the size is given by one or two of the functions parameters. __result_use_check Causes a warning to be emitted if a caller of the function with this attribute does not use its return value. This is known in gcc as "warn_unused_result" but we considered the original naming unsuitable for an attribute. The __alloc_size attribute required some workarounds for lint(1). Both attributes are supported by clang. Also see: D2107 MFC after:3 days Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h == --- head/sys/sys/cdefs.hThu Mar 26 15:54:54 2015(r280699) +++ head/sys/sys/cdefs.hThu Mar 26 16:00:35 2015(r280700) @@ -40,6 +40,9 @@ * Testing against Clang-specific extensions. */ +#ifndef__has_attribute +#define__has_attribute(x) 0 +#endif #ifndef__has_extension #define__has_extension __has_feature #endif @@ -209,6 +212,7 @@ #define__unused #define__packed #define__aligned(x) +#define__alloc_size(...) #define__section(x) #define__weak #else @@ -233,6 +237,11 @@ #define__aligned(x)__attribute__((__aligned__(x))) #define__section(x)__attribute__((__section__(x))) #endif +#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) +#define__alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) +#else +#define__alloc_size(...) +#endif #if defined(__INTEL_COMPILER) #define__dead2 __attribute__((__noreturn__)) #define__pure2 __attribute__((__const__)) @@ -242,7 +251,7 @@ #define__aligned(x)__attribute__((__aligned__(x))) #define__section(x)__attribute__((__section__(x))) #endif -#endif +#endif /* lint */ #if !__GNUC_PREREQ__(2, 95) #define__alignof(x)__offsetof(struct { char __a; x __b; }, __b) @@ -363,8 +372,10 @@ #if __GNUC_PREREQ__(3, 4) #define__fastcall __attribute__((__fastcall__)) +#define__result_use_check __attribute__((__warn_unused_result__)) #else #define__fastcall +#define__result_use_check #endif #if __GNUC_PREREQ__(4, 1) ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280701 - head/usr.bin/ministat
Author: kp Date: Thu Mar 26 17:13:11 2015 New Revision: 280701 URL: https://svnweb.freebsd.org/changeset/base/280701 Log: Clarify the ministat default width The man page states that: '-w widthWidth of ASCII-art plot in characters, default is 74.' This is not entirely correct. The mini-help is more accurate: '-w : width of graph/test output (default 74 or terminal width)' In other words: the man page fails to explain that ministat will default to the terminal width, not 74. It will only fall back to 74 if stdout is not a TTY. Submitted by: Ben Hutchings Approved by: philip (mentor) Modified: head/usr.bin/ministat/ministat.1 Modified: head/usr.bin/ministat/ministat.1 == --- head/usr.bin/ministat/ministat.1Thu Mar 26 16:00:35 2015 (r280700) +++ head/usr.bin/ministat/ministat.1Thu Mar 26 17:13:11 2015 (r280701) @@ -68,7 +68,9 @@ See .Xr strtok 3 for details. .It Fl w Ar width -Width of ASCII-art plot in characters, default is 74. +Width of ASCII-art plot in characters. +The default is the terminal width, or 74 if standard output is not a +terminal. .El .Pp A sample output could look like this: ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280702 - head/sys/vm
Author: mav Date: Thu Mar 26 17:21:12 2015 New Revision: 280702 URL: https://svnweb.freebsd.org/changeset/base/280702 Log: Make swapper release orphaned (lost) GEOM provider. Swap device is still reported as enabled, and system still may crash later if some swapped-out kernel pages were lost with the device, but at least GEOM and CAM can now release the lost disk, allowing it to be reconnected. MFC after:2 weeks Sponsored by: iXsystems, Inc. Modified: head/sys/vm/swap_pager.c Modified: head/sys/vm/swap_pager.c == --- head/sys/vm/swap_pager.cThu Mar 26 17:13:11 2015(r280701) +++ head/sys/vm/swap_pager.cThu Mar 26 17:21:12 2015(r280702) @@ -2563,18 +2563,42 @@ DECLARE_GEOM_CLASS(g_swap_class, g_class static void +swapgeom_close_ev(void *arg, int flags) +{ + struct g_consumer *cp; + + cp = arg; + g_access(cp, -1, -1, 0); + g_detach(cp); + g_destroy_consumer(cp); +} + +static void swapgeom_done(struct bio *bp2) { + struct swdevt *sp; struct buf *bp; + struct g_consumer *cp; + int destroy; bp = bp2->bio_caller2; + cp = bp2->bio_from; bp->b_ioflags = bp2->bio_flags; if (bp2->bio_error) bp->b_ioflags |= BIO_ERROR; bp->b_resid = bp->b_bcount - bp2->bio_completed; bp->b_error = bp2->bio_error; bufdone(bp); + mtx_lock(&sw_dev_mtx); + destroy = ((--cp->index) == 0 && cp->private); + if (destroy) { + sp = bp2->bio_caller1; + sp->sw_id = NULL; + } + mtx_unlock(&sw_dev_mtx); g_destroy_bio(bp2); + if (destroy) + g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); } static void @@ -2583,13 +2607,17 @@ swapgeom_strategy(struct buf *bp, struct struct bio *bio; struct g_consumer *cp; + mtx_lock(&sw_dev_mtx); cp = sp->sw_id; if (cp == NULL) { + mtx_unlock(&sw_dev_mtx); bp->b_error = ENXIO; bp->b_ioflags |= BIO_ERROR; bufdone(bp); return; } + cp->index++; + mtx_unlock(&sw_dev_mtx); if (bp->b_iocmd == BIO_WRITE) bio = g_new_bio(); else @@ -2601,6 +2629,7 @@ swapgeom_strategy(struct buf *bp, struct return; } + bio->bio_caller1 = sp; bio->bio_caller2 = bp; bio->bio_cmd = bp->b_iocmd; bio->bio_offset = (bp->b_blkno - sp->sw_first) * PAGE_SIZE; @@ -2624,31 +2653,36 @@ static void swapgeom_orphan(struct g_consumer *cp) { struct swdevt *sp; + int destroy; mtx_lock(&sw_dev_mtx); - TAILQ_FOREACH(sp, &swtailq, sw_list) - if (sp->sw_id == cp) + TAILQ_FOREACH(sp, &swtailq, sw_list) { + if (sp->sw_id == cp) { sp->sw_flags |= SW_CLOSING; + break; + } + } + cp->private = (void *)(uintptr_t)1; + destroy = ((sp != NULL) && (cp->index == 0)); + if (destroy) + sp->sw_id = NULL; mtx_unlock(&sw_dev_mtx); -} - -static void -swapgeom_close_ev(void *arg, int flags) -{ - struct g_consumer *cp; - - cp = arg; - g_access(cp, -1, -1, 0); - g_detach(cp); - g_destroy_consumer(cp); + if (destroy) + swapgeom_close_ev(cp, 0); } static void swapgeom_close(struct thread *td, struct swdevt *sw) { + struct g_consumer *cp; + mtx_lock(&sw_dev_mtx); + cp = sw->sw_id; + sw->sw_id = NULL; + mtx_unlock(&sw_dev_mtx); /* XXX: direct call when Giant untangled */ - g_waitfor_event(swapgeom_close_ev, sw->sw_id, M_WAITOK, NULL); + if (cp != NULL) + g_waitfor_event(swapgeom_close_ev, cp, M_WAITOK, NULL); } @@ -2689,6 +2723,8 @@ swapongeom_ev(void *arg, int flags) if (gp == NULL) gp = g_new_geomf(&g_swap_class, "swap"); cp = g_new_consumer(gp); + cp->index = 0; /* Number of active I/Os. */ + cp->private = NULL; /* Orphanization flag */ g_attach(cp, pp); /* * XXX: Everytime you think you can improve the margin for ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r280183 - in head/sys: dev/drm2 dev/drm2/i915 dev/drm2/radeon dev/drm2/ttm modules modules/drm2 modules/drm2/drm2 modules/drm2/radeonkms
On 0317T2302, Jean-Sébastien Pédron wrote: > On 17.03.2015 21:29, Edward Tomasz Napierała wrote: > >> o Support for the setmaster/dropmaster ioctls. For instance, they > >> are used to run multiple X servers simultaneously. > > > > Does it fix fast user switching in Xorg/GNOME, by any chance? > > Maybe, I don't know how this works in GNOME. But as long as it relies on > two X sessions running at the same time, then yes it surely helps. I've just tested, and user switching in GNOME works now. Yay! ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280704 - head/contrib/gcc/config/aarch64
Author: andrew Date: Thu Mar 26 18:25:53 2015 New Revision: 280704 URL: https://svnweb.freebsd.org/changeset/base/280704 Log: Also define DWARF_FRAME_REGISTERS. This is used to size arrays, without this exceptions could write over the stack. Sponsored by: The FreeBSD Foundation Modified: head/contrib/gcc/config/aarch64/aarch64.h Modified: head/contrib/gcc/config/aarch64/aarch64.h == --- head/contrib/gcc/config/aarch64/aarch64.h Thu Mar 26 17:51:11 2015 (r280703) +++ head/contrib/gcc/config/aarch64/aarch64.h Thu Mar 26 18:25:53 2015 (r280704) @@ -1,3 +1,3 @@ -/* $FreeBSD */ #define FIRST_PSEUDO_REGISTER 67 +#define DWARF_FRAME_REGISTERS 97 ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r280697 - head/usr.sbin/pmcstudy
Randall, On Thu, Mar 26, 2015 at 03:40:48PM +, Randall Stewart wrote: R> Added: R> head/usr.sbin/pmcstudy/pmcstudy.8 (contents, props changed) R> Deleted: R> head/usr.sbin/pmcstudy/pmcstudy.1 Now you need to add pmcstudy.1 to ObsoleteFiles.inc. -- Totus tuus, Glebius. ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280706 - head/sys/dev/cxgbe
Author: np Date: Thu Mar 26 18:45:51 2015 New Revision: 280706 URL: https://svnweb.freebsd.org/changeset/base/280706 Log: cxgbe(4): provide the exact RSS hash type instead of a catch-all value to the upper layers. Modified: head/sys/dev/cxgbe/t4_sge.c Modified: head/sys/dev/cxgbe/t4_sge.c == --- head/sys/dev/cxgbe/t4_sge.c Thu Mar 26 18:44:59 2015(r280705) +++ head/sys/dev/cxgbe/t4_sge.c Thu Mar 26 18:45:51 2015(r280706) @@ -1736,6 +1736,12 @@ t4_eth_rx(struct sge_iq *iq, const struc #if defined(INET) || defined(INET6) struct lro_ctrl *lro = &rxq->lro; #endif + static const int sw_hashtype[4][2] = { + {M_HASHTYPE_NONE, M_HASHTYPE_NONE}, + {M_HASHTYPE_RSS_IPV4, M_HASHTYPE_RSS_IPV6}, + {M_HASHTYPE_RSS_TCP_IPV4, M_HASHTYPE_RSS_TCP_IPV6}, + {M_HASHTYPE_RSS_UDP_IPV4, M_HASHTYPE_RSS_UDP_IPV6}, + }; KASSERT(m0 != NULL, ("%s: no payload with opcode %02x", __func__, rss->opcode)); @@ -1745,7 +1751,7 @@ t4_eth_rx(struct sge_iq *iq, const struc m0->m_data += fl_pktshift; m0->m_pkthdr.rcvif = ifp; - M_HASHTYPE_SET(m0, M_HASHTYPE_OPAQUE); + M_HASHTYPE_SET(m0, sw_hashtype[rss->hash_type][rss->ipv6]); m0->m_pkthdr.flowid = be32toh(rss->hash_val); if (cpl->csum_calc && !cpl->err_vec) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280709 - head/sys/arm/mv/armadaxp
Author: ian Date: Thu Mar 26 19:33:07 2015 New Revision: 280709 URL: https://svnweb.freebsd.org/changeset/base/280709 Log: Use pmap_mapdev()/unmapdev() to temporarily map on-chip sram while copying the startup trampoline code. The old code allocated a kva page, mapped it using using pmap_kenter_nocache(), then freed the kva without destroying the mapping. This is the only use of pmap_kenter_nocache() in the system, so redoing this one use of allows it to be garbage collected in the near future. Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c Modified: head/sys/arm/mv/armadaxp/armadaxp_mp.c == --- head/sys/arm/mv/armadaxp/armadaxp_mp.c Thu Mar 26 19:13:54 2015 (r280708) +++ head/sys/arm/mv/armadaxp/armadaxp_mp.c Thu Mar 26 19:33:07 2015 (r280709) @@ -106,7 +106,7 @@ void platform_mp_start_ap(void) { uint32_t reg, *src, *dst, cpu_num, div_val, cputype; - vm_offset_t smp_boot, pmu_boot_off; + vm_offset_t pmu_boot_off; /* * Initialization procedure depends on core revision, * in this step CHIP ID is checked to choose proper procedure @@ -114,22 +114,18 @@ platform_mp_start_ap(void) cputype = cpufunc_id(); cputype &= CPU_ID_CPU_MASK; - smp_boot = kva_alloc(PAGE_SIZE); - pmap_kenter_nocache(smp_boot, 0x); - dst = (uint32_t *) smp_boot; /* * Set the PA of CPU0 Boot Address Redirect register used in * mptramp according to the actual SoC registers' base address. */ pmu_boot_off = (CPU_PMU(0) - MV_BASE) + CPU_PMU_BOOT; mptramp_pmu_boot = fdt_immr_pa + pmu_boot_off; - + dst = pmap_mapdev(0x, PAGE_SIZE); for (src = (uint32_t *)mptramp; src < (uint32_t *)mptramp_end; src++, dst++) { *dst = *src; } - kva_free(smp_boot, PAGE_SIZE); - + pmap_unmapdev((vm_offset_t)dst, PAGE_SIZE); if (cputype == CPU_ID_MV88SV584X_V7) { /* Core rev A0 */ div_val = read_cpu_clkdiv(CPU_DIVCLK_CTRL2_RATIO_FULL1); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280710 - head
Author: rrs Date: Thu Mar 26 20:08:25 2015 New Revision: 280710 URL: https://svnweb.freebsd.org/changeset/base/280710 Log: Per Gleb, add the pmcstudy.1.gz which was moved to pmcstudy.8.gz Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Thu Mar 26 19:33:07 2015(r280709) +++ head/ObsoleteFiles.inc Thu Mar 26 20:08:25 2015(r280710) @@ -38,6 +38,8 @@ # xargs -n1 | sort | uniq -d; # done +# 20150326 +OLD_FILES+=usr/share/man/man1/pmcstudy.1.gz # 20150315: new clang import which bumps version from 3.5.1 to 3.6.0. OLD_FILES+=usr/include/clang/3.5.1/__wmmintrin_aes.h OLD_FILES+=usr/include/clang/3.5.1/__wmmintrin_pclmul.h ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280711 - head/sys/arm64/include
Author: andrew Date: Thu Mar 26 21:10:42 2015 New Revision: 280711 URL: https://svnweb.freebsd.org/changeset/base/280711 Log: Add more arm64 machine dependent headers. With this we now have the minimum set of machine headers needed to build the userland toolchain. Differential Revision:https://reviews.freebsd.org/D2148 Reviewed by: imp Sponsored by: The FreeBSD Foundation Added: head/sys/arm64/include/frame.h (contents, props changed) head/sys/arm64/include/ptrace.h (contents, props changed) head/sys/arm64/include/reg.h (contents, props changed) head/sys/arm64/include/sysarch.h (contents, props changed) Added: head/sys/arm64/include/frame.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/frame.h Thu Mar 26 21:10:42 2015 (r280711) @@ -0,0 +1,69 @@ +/*- + * Copyright (c) 2014 Andrew Turner + * Copyright (c) 2014 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef _MACHINE_FRAME_H_ +#define_MACHINE_FRAME_H_ + +#ifndef LOCORE + +#include +#include + +/* + * NOTE: keep this structure in sync with struct reg and struct mcontext. + */ +struct trapframe { + uint64_t tf_sp; + uint64_t tf_lr; + uint64_t tf_elr; + uint64_t tf_spsr; + uint64_t tf_x[30]; +}; + +/* + * Signal frame, pushedonto the user stack + */ +struct sigframe { + siginfo_t sf_si; /* actual saved siginfo */ + ucontext_t sf_uc; /* actual saved ucontext */ +}; + +/* + * There is no fixed frame layout, other than to be 16-byte aligned + */ +struct frame { + int dummy; +}; + +#endif /* !LOCORE */ + +#endif /* !_MACHINE_FRAME_H_ */ Added: head/sys/arm64/include/ptrace.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/ptrace.h Thu Mar 26 21:10:42 2015 (r280711) @@ -0,0 +1 @@ +/* $FreeBSD$ */ Added: head/sys/arm64/include/reg.h == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm64/include/reg.hThu Mar 26 21:10:42 2015 (r280711) @@ -0,0 +1,66 @@ +/*- + * Copyright (c) 2014 Andrew Turner + * Copyright (c) 2014-2015 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBS
svn commit: r280712 - in head/sys: arm/arm arm/include conf
Author: ian Date: Thu Mar 26 21:13:53 2015 New Revision: 280712 URL: https://svnweb.freebsd.org/changeset/base/280712 Log: New pmap code for armv6. Disabled by default, option ARM_NEW_PMAP enables it. This is pretty much a complete rewrite based on the existing i386 code. The patches have been circulating for a couple years and have been looked at by plenty of people, but I'm not putting anybody on the hook as having reviewed this in any formal sense except myself. After this has gotten wider testing from the user community, ARM_NEW_PMAP will become the default and various dregs of the old pmap code will be removed. Submitted by: Svatopluk Kraus , Michal Meloun Added: head/sys/arm/arm/pmap-v6-new.c (contents, props changed) head/sys/arm/include/pmap-v6.h (contents, props changed) head/sys/arm/include/pmap_var.h (contents, props changed) head/sys/arm/include/pte-v6.h (contents, props changed) Modified: head/sys/arm/arm/genassym.c head/sys/arm/arm/machdep.c head/sys/arm/arm/mem.c head/sys/arm/arm/minidump_machdep.c head/sys/arm/arm/mp_machdep.c head/sys/arm/arm/swtch.S head/sys/arm/include/machdep.h head/sys/arm/include/pcb.h head/sys/arm/include/pmap.h head/sys/arm/include/pte.h head/sys/arm/include/sf_buf.h head/sys/arm/include/smp.h head/sys/arm/include/vm.h head/sys/arm/include/vmparam.h head/sys/conf/files.arm head/sys/conf/options.arm Modified: head/sys/arm/arm/genassym.c == --- head/sys/arm/arm/genassym.c Thu Mar 26 21:10:42 2015(r280711) +++ head/sys/arm/arm/genassym.c Thu Mar 26 21:13:53 2015(r280712) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -58,12 +59,19 @@ __FBSDID("$FreeBSD$"); ASSYM(KERNBASE, KERNBASE); ASSYM(PCB_NOALIGNFLT, PCB_NOALIGNFLT); +#ifdef ARM_NEW_PMAP +ASSYM(CPU_ASID_KERNEL,CPU_ASID_KERNEL); +#endif ASSYM(PCB_ONFAULT, offsetof(struct pcb, pcb_onfault)); +#ifndef ARM_NEW_PMAP ASSYM(PCB_DACR, offsetof(struct pcb, pcb_dacr)); +#endif ASSYM(PCB_FLAGS, offsetof(struct pcb, pcb_flags)); ASSYM(PCB_PAGEDIR, offsetof(struct pcb, pcb_pagedir)); +#ifndef ARM_NEW_PMAP ASSYM(PCB_L1VEC, offsetof(struct pcb, pcb_l1vec)); ASSYM(PCB_PL1VEC, offsetof(struct pcb, pcb_pl1vec)); +#endif ASSYM(PCB_R4, offsetof(struct pcb, pcb_regs.sf_r4)); ASSYM(PCB_R5, offsetof(struct pcb, pcb_regs.sf_r5)); ASSYM(PCB_R6, offsetof(struct pcb, pcb_regs.sf_r6)); @@ -131,7 +139,6 @@ ASSYM(PC_CURPMAP, offsetof(struct pcpu, #endif ASSYM(PAGE_SIZE, PAGE_SIZE); -ASSYM(PDESIZE, PDESIZE); ASSYM(PMAP_DOMAIN_KERNEL, PMAP_DOMAIN_KERNEL); #ifdef PMAP_INCLUDE_PTE_SYNC ASSYM(PMAP_INCLUDE_PTE_SYNC, 1); @@ -145,8 +152,13 @@ ASSYM(TRAPFRAMESIZE, sizeof(struct trapf ASSYM(MAXCOMLEN, MAXCOMLEN); ASSYM(MAXCPU, MAXCPU); +ASSYM(_NCPUWORDS, _NCPUWORDS); ASSYM(NIRQ, NIRQ); ASSYM(PCPU_SIZE, sizeof(struct pcpu)); +ASSYM(P_VMSPACE, offsetof(struct proc, p_vmspace)); +ASSYM(VM_PMAP, offsetof(struct vmspace, vm_pmap)); +ASSYM(PM_ACTIVE, offsetof(struct pmap, pm_active)); +ASSYM(PC_CPUID, offsetof(struct pcpu, pc_cpuid)); ASSYM(DCACHE_LINE_SIZE, offsetof(struct cpuinfo, dcache_line_size)); ASSYM(DCACHE_LINE_MASK, offsetof(struct cpuinfo, dcache_line_mask)); Modified: head/sys/arm/arm/machdep.c == --- head/sys/arm/arm/machdep.c Thu Mar 26 21:10:42 2015(r280711) +++ head/sys/arm/arm/machdep.c Thu Mar 26 21:13:53 2015(r280712) @@ -138,6 +138,14 @@ int _min_bzero_size = 0; extern int *end; #ifdef FDT +vm_paddr_t pmap_pa; + +#ifdef ARM_NEW_PMAP +vm_offset_t systempage; +vm_offset_t irqstack; +vm_offset_t undstack; +vm_offset_t abtstack; +#else /* * This is the number of L2 page tables required for covering max * (hypothetical) memsize of 4GB and all kernel mappings (vectors, msgbuf, @@ -147,15 +155,13 @@ extern int *end; static struct pv_addr kernel_pt_table[KERNEL_PT_MAX]; -vm_paddr_t pmap_pa; - struct pv_addr systempage; static struct pv_addr msgbufpv; struct pv_addr irqstack; struct pv_addr undstack; struct pv_addr abtstack; static struct pv_addr kernelstack; - +#endif #endif #if defined(LINUX_BOOT_ABI) @@ -381,9 +387,11 @@ cpu_startup(void *dummy) vm_pager_bufferinit(); pcb->pcb_regs.sf_sp = (u_int)thread0.td_kstack + USPACE_SVC_STACK_TOP; - vector_page_setprot(VM_PROT_READ); pmap_set_pcb_pagedir(pmap_kernel(), pcb); +#ifndef ARM_NEW_PMAP + vector_page_setprot(VM_PROT_READ); pmap_postinit(); +#endif #ifdef ARM_TP_ADDRESS #ifdef ARM_CACHE_LOCK_ENABLE pmap_kenter_user(ARM_TP_ADDRESS, ARM_TP_ADDRESS); @@ -1003,6 +1011,19 @@ init_proc0(vm_offset_t kstack) pcpup->pc_curpcb = thread0.td_pcb; } +#ifdef ARM_NEW_PMAP +void +set_stackptrs(int cpu) +{ + + set_stackptr(PSR_I
svn commit: r280713 - head/lib/libc/gen
Author: jilles Date: Thu Mar 26 21:58:06 2015 New Revision: 280713 URL: https://svnweb.freebsd.org/changeset/base/280713 Log: setmode(): Use sysctl kern.proc.umask instead of umask() if possible. The kern.proc.umask. sysctl allows querying the umask without temporarily modifying it. Modified: head/lib/libc/gen/setmode.c Modified: head/lib/libc/gen/setmode.c == --- head/lib/libc/gen/setmode.c Thu Mar 26 21:13:53 2015(r280712) +++ head/lib/libc/gen/setmode.c Thu Mar 26 21:58:06 2015(r280713) @@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include +#include #include #include @@ -68,6 +69,7 @@ typedef struct bitcmd { #defineCMD2_OBITS 0x08 #defineCMD2_UBITS 0x10 +static mode_t getumask(void); static BITCMD *addcmd(BITCMD *, mode_t, mode_t, mode_t, mode_t); static void compress_mode(BITCMD *); #ifdef SETMODE_DEBUG @@ -169,7 +171,6 @@ setmode(const char *p) int serrno; char op, *ep; BITCMD *set, *saveset, *endset; - sigset_t sigset, sigoset; mode_t mask, perm, permXbits, who; long perml; int equalopdone; @@ -182,15 +183,9 @@ setmode(const char *p) /* * Get a copy of the mask for the permissions that are mask relative. -* Flip the bits, we want what's not set. Since it's possible that -* the caller is opening files inside a signal handler, protect them -* as best we can. +* Flip the bits, we want what's not set. */ - sigfillset(&sigset); - (void)_sigprocmask(SIG_BLOCK, &sigset, &sigoset); - (void)umask(mask = umask(0)); - mask = ~mask; - (void)_sigprocmask(SIG_SETMASK, &sigoset, NULL); + mask = ~getumask(); setlen = SET_LEN + 2; @@ -346,6 +341,35 @@ out: return NULL; } +static mode_t +getumask(void) +{ + sigset_t sigset, sigoset; + size_t len; + mode_t mask; + u_short smask; + + /* +* First try requesting the umask without temporarily modifying it. +* Note that this does not work if the sysctl +* security.bsd.unprivileged_proc_debug is set to 0. +*/ + len = sizeof(smask); + if (sysctl((int[4]){ CTL_KERN, KERN_PROC, KERN_PROC_UMASK, getpid() }, + 4, &smask, &len, NULL, 0) == 0) + return (smask); + + /* +* Since it's possible that the caller is opening files inside a signal +* handler, protect them as best we can. +*/ + sigfillset(&sigset); + (void)_sigprocmask(SIG_BLOCK, &sigset, &sigoset); + (void)umask(mask = umask(0)); + (void)_sigprocmask(SIG_SETMASK, &sigoset, NULL); + return (mask); +} + static BITCMD * addcmd(BITCMD *set, mode_t op, mode_t who, mode_t oparg, mode_t mask) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280714 - head/sys/netinet
Author: tuexen Date: Thu Mar 26 22:05:31 2015 New Revision: 280714 URL: https://svnweb.freebsd.org/changeset/base/280714 Log: Improve the selection of the destination address of SACK chunks. This fixes https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=196755 and is joint work with rrs@. MFC after: 1 week Modified: head/sys/netinet/sctp_output.c head/sys/netinet/sctp_structs.h Modified: head/sys/netinet/sctp_output.c == --- head/sys/netinet/sctp_output.c Thu Mar 26 21:58:06 2015 (r280713) +++ head/sys/netinet/sctp_output.c Thu Mar 26 22:05:31 2015 (r280714) @@ -10409,32 +10409,17 @@ sctp_send_sack(struct sctp_tcb *stcb, in a_chk->sent = SCTP_DATAGRAM_UNSENT; a_chk->whoTo = NULL; - if ((asoc->numduptsns) || - (!(asoc->last_data_chunk_from->dest_state & SCTP_ADDR_REACHABLE))) { + if (!(asoc->last_data_chunk_from->dest_state & SCTP_ADDR_REACHABLE)) { /*- -* Ok, we have some duplicates or the destination for the -* sack is unreachable, lets see if we can select an -* alternate than asoc->last_data_chunk_from +* Ok, the destination for the SACK is unreachable, lets see if +* we can select an alternate to asoc->last_data_chunk_from */ - if ((asoc->last_data_chunk_from->dest_state & SCTP_ADDR_REACHABLE) && - (asoc->used_alt_onsack > asoc->numnets)) { - /* We used an alt last time, don't this time */ - a_chk->whoTo = NULL; - } else { - asoc->used_alt_onsack++; - a_chk->whoTo = sctp_find_alternate_net(stcb, asoc->last_data_chunk_from, 0); - } + a_chk->whoTo = sctp_find_alternate_net(stcb, asoc->last_data_chunk_from, 0); if (a_chk->whoTo == NULL) { /* Nope, no alternate */ a_chk->whoTo = asoc->last_data_chunk_from; - asoc->used_alt_onsack = 0; } } else { - /* -* No duplicates so we use the last place we received data -* from. -*/ - asoc->used_alt_onsack = 0; a_chk->whoTo = asoc->last_data_chunk_from; } if (a_chk->whoTo) { Modified: head/sys/netinet/sctp_structs.h == --- head/sys/netinet/sctp_structs.h Thu Mar 26 21:58:06 2015 (r280713) +++ head/sys/netinet/sctp_structs.h Thu Mar 26 22:05:31 2015 (r280714) @@ -1174,7 +1174,6 @@ struct sctp_association { struct sctp_scoping scope; /* flags to handle send alternate net tracking */ - uint8_t used_alt_onsack; uint8_t used_alt_asconfack; uint8_t fast_retran_loss_recovery; uint8_t sat_t3_loss_recovery; ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280716 - head/sbin/md5
Author: delphij Date: Thu Mar 26 22:34:27 2015 New Revision: 280716 URL: https://svnweb.freebsd.org/changeset/base/280716 Log: - Correct type for checkAgainst. - Staticify flags that are not used outside the file scope. PR: bin/193471 Submitted by: Robert Sprowson MFC after:2 weeks Modified: head/sbin/md5/md5.c Modified: head/sbin/md5/md5.c == --- head/sbin/md5/md5.c Thu Mar 26 22:31:55 2015(r280715) +++ head/sbin/md5/md5.c Thu Mar 26 22:34:27 2015(r280716) @@ -42,11 +42,11 @@ __FBSDID("$FreeBSD$"); #define TEST_BLOCK_COUNT 10 #define MDTESTCOUNT 8 -int qflag; -int rflag; -int sflag; -unsigned char* checkAgainst; -intchecksFailed; +static int qflag; +static int rflag; +static int sflag; +static char* checkAgainst; +static int checksFailed; typedef void (DIGEST_Init)(void *); typedef void (DIGEST_Update)(void *, const unsigned char *, size_t); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r280442 - head/sys/dev/sound/pcm
Hans Petter Selasky wrote this message on Tue, Mar 24, 2015 at 16:31 +: > Author: hselasky > Date: Tue Mar 24 16:31:22 2015 > New Revision: 280442 > URL: https://svnweb.freebsd.org/changeset/base/280442 > > Log: > Make all PCM core sysctls tunable and remove redundant TUNABLE() > statements. This allows for setting all PCM core parameters in the > kernel environment through loader.conf(5) or kenv(1) which is useful > for pluggable PCM devices like USB audio devices which might be > plugged after that sysctl.conf(5) is executed. should we make sysctl.conf set all vars as tunables too then? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280719 - head
Author: rodrigc Date: Thu Mar 26 23:37:03 2015 New Revision: 280719 URL: https://svnweb.freebsd.org/changeset/base/280719 Log: Add --sysroot to the compiler flags for clang or gcc external toolchains Before this fix, --sysroot was only added to the compiler flags if a clang external toolchain was used. Reviewed by: imp Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 == --- head/Makefile.inc1 Thu Mar 26 22:50:35 2015(r280718) +++ head/Makefile.inc1 Thu Mar 26 23:37:03 2015(r280719) @@ -384,9 +384,9 @@ DEPFLAGS+= -I${WORLDTMP}/usr/include/c++ TARGET_ABI?= unknown TARGET_TRIPLE?=${TARGET_ARCH:C/amd64/x86_64/}-${TARGET_ABI}-freebsd11.0 XCFLAGS+= -target ${TARGET_TRIPLE} +.endif XCFLAGS+= --sysroot=${WORLDTMP} ${BFLAGS} XCXXFLAGS+=--sysroot=${WORLDTMP} ${BFLAGS} -.endif .else .if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX}) BFLAGS+= -B${CROSS_BINUTILS_PREFIX} ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280720 - head/sys/net
Author: ae Date: Thu Mar 26 23:40:22 2015 New Revision: 280720 URL: https://svnweb.freebsd.org/changeset/base/280720 Log: Fix a possible mbuf leak on interface departure. Reported by: Alexandre Martins Modified: head/sys/net/if_lagg.c Modified: head/sys/net/if_lagg.c == --- head/sys/net/if_lagg.c Thu Mar 26 23:37:03 2015(r280719) +++ head/sys/net/if_lagg.c Thu Mar 26 23:40:22 2015(r280720) @@ -1669,7 +1669,11 @@ lagg_input(struct ifnet *ifp, struct mbu ETHER_BPF_MTAP(scifp, m); - m = (lp->lp_detaching == 0) ? lagg_proto_input(sc, lp, m) : NULL; + if (lp->lp_detaching != 0) { + m_freem(m); + m = NULL; + } else + m = lagg_proto_input(sc, lp, m); if (m != NULL) { if (scifp->if_flags & IFF_MONITOR) { ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280721 - in head: etc/defaults etc/periodic/daily share/man/man5
Author: jhb Date: Fri Mar 27 00:37:41 2015 New Revision: 280721 URL: https://svnweb.freebsd.org/changeset/base/280721 Log: Allow additional flags to be passed to netstat -i in the daily status check. In particular, this allows an administrator to specify "-h" for human readable output if that is preferred. The default setting passes "-d", so that can be excluded by using a custom setting. Differential Revision:https://reviews.freebsd.org/D2034 Submitted by: Lystopad Aleksandr (patch to add option for -h) Reviewed by: bz MFC after:1 week Modified: head/etc/defaults/periodic.conf head/etc/periodic/daily/420.status-network head/share/man/man5/periodic.conf.5 Modified: head/etc/defaults/periodic.conf == --- head/etc/defaults/periodic.conf Thu Mar 26 23:40:22 2015 (r280720) +++ head/etc/defaults/periodic.conf Fri Mar 27 00:37:41 2015 (r280721) @@ -113,6 +113,7 @@ daily_status_gconcat_enable="NO"# Che # 420.status-network daily_status_network_enable="YES" # Check network status daily_status_network_usedns="YES" # DNS lookups are ok +daily_status_network_netstat_flags="-d"# netstat(1) flags # 430.status-rwho daily_status_rwho_enable="YES" # Check system status Modified: head/etc/periodic/daily/420.status-network == --- head/etc/periodic/daily/420.status-network Thu Mar 26 23:40:22 2015 (r280720) +++ head/etc/periodic/daily/420.status-network Fri Mar 27 00:37:41 2015 (r280721) @@ -16,12 +16,14 @@ case "$daily_status_network_enable" in echo "" echo "Network interface status:" + flags="${daily_status_network_netstat_flags}" case "$daily_status_network_usedns" in [Yy][Ee][Ss]) - netstat -id && rc=0 || rc=3;; + ;; *) - netstat -idn && rc=0 || rc=3;; - esac;; + flags="${flags} -n";; + esac + netstat -i ${flags} && rc=0 || rc=3;; *) rc=0;; esac Modified: head/share/man/man5/periodic.conf.5 == --- head/share/man/man5/periodic.conf.5 Thu Mar 26 23:40:22 2015 (r280720) +++ head/share/man/man5/periodic.conf.5 Fri Mar 27 00:37:41 2015 (r280721) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 13, 2015 +.Dd March 26, 2015 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -401,6 +401,16 @@ Set to .Dq Li YES if you want to run .Nm netstat Fl i . +.It Va daily_status_network_netstat_flags +.Pq Vt str +Set to additional arguments for the +.Xr netstat 1 +utility when +.Va daily_status_network_enable +is set to +.Dq Li YES . +The default is +.Fl d . .It Va daily_status_network_usedns .Pq Vt bool Set to ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r280700 - head/sys/sys
On Thu, 26 Mar 2015, Pedro F. Giffuni wrote: Log: Introduce some allocation function attributes. Bring support for two gcc function attributes that are likely to be used in our system headers: ... The __alloc_size attribute required some workarounds for lint(1). Both attributes are supported by clang. It is broken for all non-C99 compilers, the same as __nonull(). lint may be one of these, depending on implementation details and on how well it supports non-C99 mode (I think it knows almost nothing of C99, but uses cpp and is not careful to kill C99 features). FreeBSD even has a non-C90 compiler (modulo bugs). It is named c89. Even the compilers that implement most of C99 have a C90 mode. This is specifed by the compiler flag -std=c89 or -std=gnu89. The follow breakage happens for ... and/or __VA_ARGS__: - c89 -E on ... alone q.c:1:13: warning: variadic macros are a C99 feature [-Wvariadic-macros] #define foo(...) ^ foo(1, 2, 3) then expands to nothing. - c89 -E on ... and __VA_ARGS__: Same warning. __VA_ARGS__ then expands as in C99. - clang -E -std=c89: Same as in C99. -std=c89 is not very std. - clang -E -std=c89 -pedantic Same as for c89. c89 uses -pedantic so as to be more std. - gcc295 -E -std=c89: z.c:1: warning: invalid character in macro parameter name z.c:1: badly punctuated parameter list in `#define' foo(1, 2, 3) then expands to nothing for the empty macro and __VA_ARGS__ expands as in C99. -std=c89 actually works for gcc295 - gcc34 -E -std=c89 [-pedantic], - gcc42 -E -std=c89 [-pedantic]: Like clang, but with a better error message: q.c:1:13: warning: anonymous variadic macros were introduced in C99 - gcc48 -E -std=c89 [-pedantic]: Like clang, except the error message has not regressed so far (it is verbose as in clang, but missing colorization). - TenDRA 5.0.0 (an actual C90 compiler. I sometimes use this for its better diagnostics. Though very verbose, the references to C90 section numbers are useful): "z4.c", line 1: Error: [ISO C90 6.8.3]: Badly punctuated parameters for macro 'foo'. "z4.c", line 3: Error: [ISO C90 6.8.3]: Macro 'foo' applied with 3 arguments, not 0. TenDRA has its own headers which are very clean, but to use it even to do syntax checks, you have to use the system headers (tcc -Ysystem). Modified: head/sys/sys/cdefs.h == --- head/sys/sys/cdefs.hThu Mar 26 15:54:54 2015(r280699) +++ head/sys/sys/cdefs.hThu Mar 26 16:00:35 2015(r280700) @@ -209,6 +212,7 @@ #define __unused #define __packed #define __aligned(x) +#define__alloc_size(...) #define __section(x) #define __weak #else The first bug is here. This is for lint. This is supposed to give a null macro, but actually gives a syntax error except for C99 compilers. @@ -233,6 +237,11 @@ #define __aligned(x)__attribute__((__aligned__(x))) #define __section(x)__attribute__((__section__(x))) #endif +#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) +#define__alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) This is broken by namespace pollution. alloc_size is in the application namespace. It must be spelled with underscores like all the other attributes in the macros. The "..." in this is broken in c89 mode. Passing the #if only guarantees that the attribute is supported. It doesn't guarantee that "..." is supported. The name of the attribute may be relevant here too. We want most the special macros to work in c89 and other strict standard modes. Their names are spelled with underscores to make this possible. Standard modes turn off gcc features like asm() and even "inline". Perhaps they do the same for alloc_size(). +#else +#define__alloc_size(...) +#endif Similarly for all hard-coded uses of "...". This #else clause is supposed to give compatibility for all compilers that don't support alloc_size(). But most of these compilers also don't support "...", so this almost never works. @@ -363,8 +372,10 @@ #if __GNUC_PREREQ__(3, 4) #define __fastcall __attribute__((__fastcall__)) +#define__result_use_check __attribute__((__warn_unused_result__)) #else #define __fastcall +#define__result_use_check #endif Changes like this are correct since they don't depend on compiler-[option]- dependent syntactic features. Bruce ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r280700 - head/sys/sys
> Il giorno 26/mar/2015, alle ore 19:40, Bruce Evans ha > scritto: > > On Thu, 26 Mar 2015, Pedro F. Giffuni wrote: > >> Log: >> Introduce some allocation function attributes. >> >> Bring support for two gcc function attributes that are likely to be used >> in our system headers: >> ... >> The __alloc_size attribute required some workarounds for lint(1). >> Both attributes are supported by clang. > > It is broken for all non-C99 compilers, the same as __nonull(). lint > may be one of these, depending on implementation details and on how > well it supports non-C99 mode (I think it knows almost nothing of > C99, but uses cpp and is not careful to kill C99 features). > It is not a bug, it’s a feature. I did check and variadic macros were introduced in gcc 2.95. the __nonnull() stuff requires gcc 3.3. __alloc_size requires gcc 4.3. All compilers we use in base and support in FreeBSD have the feature. For the base system it doesn’t really make sense to hold new features to support inferior compilers. If you need an older compiler it may be perhaps to support a new platform and I recall gcc 2.95 doesn’t even support amd64. > FreeBSD even has a non-C90 compiler (modulo bugs). It is named c89. Even the > compilers that implement most of C99 have a C90 mode. This > is specifed by the compiler flag -std=c89 or -std=gnu89. > OK. you can cause breakage by using old modes.This may have to be evaluated running an exp run on the ports tree. > The follow breakage happens for ... and/or __VA_ARGS__: > > - c89 -E on ... alone >q.c:1:13: warning: variadic macros are a C99 feature [-Wvariadic-macros] >#define foo(...) >^ >foo(1, 2, 3) then expands to nothing. > > - c89 -E on ... and __VA_ARGS__: >Same warning. __VA_ARGS__ then expands as in C99. > > - clang -E -std=c89: >Same as in C99. -std=c89 is not very std. > > - clang -E -std=c89 -pedantic >Same as for c89. c89 uses -pedantic so as to be more std. > > - gcc295 -E -std=c89: >z.c:1: warning: invalid character in macro parameter name >z.c:1: badly punctuated parameter list in `#define' > >foo(1, 2, 3) then expands to nothing for the empty macro >and __VA_ARGS__ expands as in C99. -std=c89 actually works >for gcc295 > > - gcc34 -E -std=c89 [-pedantic], > - gcc42 -E -std=c89 [-pedantic]: >Like clang, but with a better error message: > >q.c:1:13: warning: anonymous variadic macros were introduced in C99 > > - gcc48 -E -std=c89 [-pedantic]: >Like clang, except the error message has not regressed so far (it >is verbose as in clang, but missing colorization). > The above are all warnings. You can usually get around those by setting options and those won’t stop your code from building. > - TenDRA 5.0.0 (an actual C90 compiler. I sometimes use this for its > better diagnostics. Though very verbose, the references to C90 > section numbers are useful): > TenDRA is awesome. I recall it uses it’s own C headers with different compatibility modes so it won’t be affected by cdefs.h and the use of such macros in our headers. >"z4.c", line 1: Error: > [ISO C90 6.8.3]: Badly punctuated parameters for macro 'foo'. > >"z4.c", line 3: Error: > [ISO C90 6.8.3]: Macro 'foo' applied with 3 arguments, not 0. > > TenDRA has its own headers which are very clean, but to use it > even to do syntax checks, you have to use the system headers > (tcc -Ysystem). > >> Modified: head/sys/sys/cdefs.h >> == >> --- head/sys/sys/cdefs.h Thu Mar 26 15:54:54 2015(r280699) >> +++ head/sys/sys/cdefs.h Thu Mar 26 16:00:35 2015(r280700) >> @@ -209,6 +212,7 @@ >> #define __unused >> #define __packed >> #define __aligned(x) >> +#define __alloc_size(...) >> #define __section(x) >> #define __weak >> #else > > The first bug is here. This is for lint. This is supposed to give a > null macro, but actually gives a syntax error except for C99 compilers. > I tried to update lint and fix it. I did the former and I failed the later. Other BSDs (Dragonfly and OpenBSD) were less patient ;). Compilers without some level of C99 compliance are likely to have much bigger problems to compile FreeBSD. If someone with real need for such support submits s fix I’ll be glad to commit it, but at this time I would really like to use __alloc_size( 1, 2) for calloc(). >> @@ -233,6 +237,11 @@ >> #define __aligned(x)__attribute__((__aligned__(x))) >> #define __section(x)__attribute__((__section__(x))) >> #endif >> +#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) >> +#define __alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) > > This is broken by namespace pollution. alloc_size is in the application > namespace. It must be spelled with underscores like all the other > attributes in the macros. > I overlooked that, t
svn commit: r280725 - head/usr.sbin/bhyve
Author: grehan Date: Fri Mar 27 01:58:44 2015 New Revision: 280725 URL: https://svnweb.freebsd.org/changeset/base/280725 Log: Move legacy interrupt allocation for virtio devices to common code. There are a number of assumptions about legacy interrupts always being available in virtio so don't allow back-ends to make the decision to support them. This fixes the issue seen with virtio-rnd on OpenBSD. MSI-x vectors were not being used, and the virtio-rnd backend wasn't allocating a legacy interrupt resulting in a bhyve assert and guest exit. Reported by: Julian Hsiao, madoka at nyanisore dot net Reviewed by: neel MFC after:1 week Modified: head/usr.sbin/bhyve/pci_virtio_block.c head/usr.sbin/bhyve/pci_virtio_net.c head/usr.sbin/bhyve/virtio.c Modified: head/usr.sbin/bhyve/pci_virtio_block.c == --- head/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 01:48:54 2015 (r280724) +++ head/usr.sbin/bhyve/pci_virtio_block.c Fri Mar 27 01:58:44 2015 (r280725) @@ -370,8 +370,6 @@ pci_vtblk_init(struct vmctx *ctx, struct pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_STORAGE); pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_BLOCK); - pci_lintr_request(pi); - if (vi_intr_init(&sc->vbsc_vs, 1, fbsdrun_virtio_msix())) { blockif_close(sc->bc); free(sc); Modified: head/usr.sbin/bhyve/pci_virtio_net.c == --- head/usr.sbin/bhyve/pci_virtio_net.cFri Mar 27 01:48:54 2015 (r280724) +++ head/usr.sbin/bhyve/pci_virtio_net.cFri Mar 27 01:58:44 2015 (r280725) @@ -640,8 +640,6 @@ pci_vtnet_init(struct vmctx *ctx, struct pci_set_cfgdata8(pi, PCIR_CLASS, PCIC_NETWORK); pci_set_cfgdata16(pi, PCIR_SUBDEV_0, VIRTIO_TYPE_NET); - pci_lintr_request(pi); - /* link always up */ sc->vsc_config.status = 1; Modified: head/usr.sbin/bhyve/virtio.c == --- head/usr.sbin/bhyve/virtio.cFri Mar 27 01:48:54 2015 (r280724) +++ head/usr.sbin/bhyve/virtio.cFri Mar 27 01:58:44 2015 (r280725) @@ -148,8 +148,13 @@ vi_intr_init(struct virtio_softc *vs, in return (1); } else vs->vs_flags &= ~VIRTIO_USE_MSIX; + /* Only 1 MSI vector for bhyve */ pci_emul_add_msicap(vs->vs_pi, 1); + + /* Legacy interrupts are mandatory for virtio devices */ + pci_lintr_request(vs->vs_pi); + return (0); } ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280726 - head/sys/sys
Author: pfg Date: Fri Mar 27 02:01:22 2015 New Revision: 280726 URL: https://svnweb.freebsd.org/changeset/base/280726 Log: Fix __size_alloc() Use underscore for the attributes name: this should fix the use of the attributes in macros for lint(1). Suggested by: bde X-MFC with: r280700 Modified: head/sys/sys/cdefs.h Modified: head/sys/sys/cdefs.h == --- head/sys/sys/cdefs.hFri Mar 27 01:58:44 2015(r280725) +++ head/sys/sys/cdefs.hFri Mar 27 02:01:22 2015(r280726) @@ -212,7 +212,6 @@ #define__unused #define__packed #define__aligned(x) -#define__alloc_size(...) #define__section(x) #define__weak #else @@ -237,11 +236,6 @@ #define__aligned(x)__attribute__((__aligned__(x))) #define__section(x)__attribute__((__section__(x))) #endif -#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) -#define__alloc_size(...) __attribute__((alloc_size(__VA_ARGS__))) -#else -#define__alloc_size(...) -#endif #if defined(__INTEL_COMPILER) #define__dead2 __attribute__((__noreturn__)) #define__pure2 __attribute__((__const__)) @@ -384,6 +378,12 @@ #define__returns_twice #endif +#if __has_attribute(alloc_size) || __GNUC_PREREQ__(4, 3) +#define__alloc_size(...) __attribute__((__alloc_size__(__VA_ARGS__))) +#else +#define__alloc_size(...) +#endif + /* XXX: should use `#if __STDC_VERSION__ < 199901'. */ #if !__GNUC_PREREQ__(2, 7) && !defined(__INTEL_COMPILER) #define__func__NULL ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280727 - in head: share/mk sys/conf
Author: imp Date: Fri Mar 27 02:35:11 2015 New Revision: 280727 URL: https://svnweb.freebsd.org/changeset/base/280727 Log: Add support for specifying unsupported / broken options that override any defaults or user specified actions on the command line. This would be useful for specifying features that are always broken or that cannot make sense on a specific architecture, like ACPI on pc98 or EISA on !i386 (!x86 usage of EISA is broken and there's no supported hardware that could have it in any event). Any items in __ALWAYS_NO_OPTIONS are forced to "no" regardless of other settings. Differential Revision: https://reviews.freebsd.org/D2011 Modified: head/share/mk/bsd.mkopt.mk head/sys/conf/kern.opts.mk Modified: head/share/mk/bsd.mkopt.mk == --- head/share/mk/bsd.mkopt.mk Fri Mar 27 02:01:22 2015(r280726) +++ head/share/mk/bsd.mkopt.mk Fri Mar 27 02:35:11 2015(r280727) @@ -67,6 +67,15 @@ MK_${var}:= no # MK_* options which are always no, usually because they are # unsupported/badly broken on this architecture. # +.for var in ${__ALWAYS_NO_OPTIONS} +MK_${var}:=no +.endfor +.undef __ALWAYS_NO_OPTIONS + +# +# MK_* options which are always no, usually because they are +# unsupported/badly broken on this architecture. +# .for var in ${BROKEN_OPTIONS} MK_${var}:=no .endfor Modified: head/sys/conf/kern.opts.mk == --- head/sys/conf/kern.opts.mk Fri Mar 27 02:01:22 2015(r280726) +++ head/sys/conf/kern.opts.mk Fri Mar 27 02:35:11 2015(r280727) @@ -120,6 +120,16 @@ MK_${var}:=no #end of bsd.mkopt.mk expanded inline. # +# MK_* options which are always no, usually because they are +# unsupported/badly broken on this architecture. +# +.for var in ${__ALWAYS_NO_OPTIONS} +MK_${var}:=no +.endfor +.undef __ALWAYS_NO_OPTIONS +#end of bsd.mkopt.mk expanded inline. + +# # MK_*_SUPPORT options which default to "yes" unless their corresponding # MK_* variable is set to "no". # ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280728 - head/sys/conf
Author: imp Date: Fri Mar 27 02:35:25 2015 New Revision: 280728 URL: https://svnweb.freebsd.org/changeset/base/280728 Log: Categorize certain kernel builds as being broken in certain places. Differential Revision: https://reviews.freebsd.org/D2011 Modified: head/sys/conf/kern.opts.mk Modified: head/sys/conf/kern.opts.mk == --- head/sys/conf/kern.opts.mk Fri Mar 27 02:35:11 2015(r280727) +++ head/sys/conf/kern.opts.mk Fri Mar 27 02:35:25 2015(r280728) @@ -75,6 +75,34 @@ BROKEN_OPTIONS+= EISA BROKEN_OPTIONS+= OFED .endif +# Options that cannot be turned on this architecture, usually because +# of compilation or other issues so severe it cannot be used even +# on an experimental basis +__ALWAYS_NO_OPTIONS= + +# Things that don't work based on the CPU +.if ${MACHINE_CPUARCH} == "arm" +__ALWAYS_NO_OPTIONS+= CDDL ZFS +.endif + +.if ${MACHINE_CPUARCH} == "mips" +__ALWAYS_NO_OPTIONS+= CDDL ZFS +.endif + +.if ${MACHINE_CPUARCH} == "powerpc" && ${MACHINE_ARCH} != "powerpc64" +__ALWAYS_NO_OPTIONS+= ZFS +.endif + +# Things that don't work because the kernel doesn't have the support +# for them. +.if ${MACHINE} != "i386" +__ALWAYS_NO_OPTIONS+= EISA +.endif + +.if ${MACHINE} != "i386" && ${MACHINE} != "amd64" +__ALWAYS_NO_OPTIONS+= OFED +.endif + # expanded inline from bsd.mkopt.mk to avoid share/mk dependency # Those that default to yes ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
svn commit: r280729 - head/sys/modules
Author: imp Date: Fri Mar 27 02:35:33 2015 New Revision: 280729 URL: https://svnweb.freebsd.org/changeset/base/280729 Log: sym and cxgb build on arm, add them to the build. Differential Revision: https://reviews.freebsd.org/D514 Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile == --- head/sys/modules/Makefile Fri Mar 27 02:35:25 2015(r280728) +++ head/sys/modules/Makefile Fri Mar 27 02:35:33 2015(r280729) @@ -466,7 +466,7 @@ _syscons= syscons _vpo= vpo .endif -.if ${MACHINE_CPUARCH} != "arm" && ${MACHINE_CPUARCH} != "mips" +.if ${MACHINE_CPUARCH} != "mips" # no BUS_SPACE_UNSPECIFIED # No barrier instruction support (specific to this driver) _sym= sym ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r280728 - head/sys/conf
On Mar 26, 2015, at 19:35, Warner Losh wrote: > > Author: imp > Date: Fri Mar 27 02:35:25 2015 > New Revision: 280728 > URL: https://svnweb.freebsd.org/changeset/base/280728 > > Log: > Categorize certain kernel builds as being broken in certain places. > > Differential Revision: https://reviews.freebsd.org/D2011 > > Modified: > head/sys/conf/kern.opts.mk > > Modified: head/sys/conf/kern.opts.mk > == > --- head/sys/conf/kern.opts.mkFri Mar 27 02:35:11 2015 > (r280727) > +++ head/sys/conf/kern.opts.mkFri Mar 27 02:35:25 2015 > (r280728) > @@ -75,6 +75,34 @@ BROKEN_OPTIONS+= EISA > BROKEN_OPTIONS+= OFED > .endif > > +# Options that cannot be turned on this architecture, usually because > +# of compilation or other issues so severe it cannot be used even > +# on an experimental basis > +__ALWAYS_NO_OPTIONS= > + > +# Things that don't work based on the CPU > +.if ${MACHINE_CPUARCH} == "arm" > +__ALWAYS_NO_OPTIONS+= CDDL ZFS > +.endif This isn't entirely true. With a properly tuned ARC and kmem size, ZFS seems to work on a BeagleBone. There have been reports on the freebsd-arm mailing list this month. Based on my understanding of your previous commit, it looks like this can't be overridden which is a problem. -- Rui Paulo ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"
Re: svn commit: r280728 - head/sys/conf
> On Mar 26, 2015, at 9:04 PM, Rui Paulo wrote: > > On Mar 26, 2015, at 19:35, Warner Losh wrote: >> >> Author: imp >> Date: Fri Mar 27 02:35:25 2015 >> New Revision: 280728 >> URL: https://svnweb.freebsd.org/changeset/base/280728 >> >> Log: >> Categorize certain kernel builds as being broken in certain places. >> >> Differential Revision: https://reviews.freebsd.org/D2011 >> >> Modified: >> head/sys/conf/kern.opts.mk >> >> Modified: head/sys/conf/kern.opts.mk >> == >> --- head/sys/conf/kern.opts.mk Fri Mar 27 02:35:11 2015 >> (r280727) >> +++ head/sys/conf/kern.opts.mk Fri Mar 27 02:35:25 2015 >> (r280728) >> @@ -75,6 +75,34 @@ BROKEN_OPTIONS+= EISA >> BROKEN_OPTIONS+= OFED >> .endif >> >> +# Options that cannot be turned on this architecture, usually because >> +# of compilation or other issues so severe it cannot be used even >> +# on an experimental basis >> +__ALWAYS_NO_OPTIONS= >> + >> +# Things that don't work based on the CPU >> +.if ${MACHINE_CPUARCH} == "arm" >> +__ALWAYS_NO_OPTIONS+= CDDL ZFS >> +.endif > > This isn't entirely true. With a properly tuned ARC and kmem size, ZFS seems > to work on a BeagleBone. There have been reports on the freebsd-arm mailing > list this month. Based on my understanding of your previous commit, it looks > like this can't be overridden which is a problem. Yea, the ships passed in the night. I’ve had these changes in my tree for a while. However, It kinda can be overridden by compiling the modules directly. Since the actual module’s Makefiles don’t depend on this, I think we’re OK. Can you test building a kernel on the BBB you have and let me know if it produces working ZFS? Warner signature.asc Description: Message signed with OpenPGP using GPGMail