svn commit: r261590 - in head/sys: kern net
Author: glebius Date: Fri Feb 7 13:47:33 2014 New Revision: 261590 URL: http://svnweb.freebsd.org/changeset/base/261590 Log: Remove identical vnet sysctl handlers, and handle CTLFLAG_VNET in the sysctl_root(). Note: SYSCTL_VNET_* macros can be removed as well. All is needed to virtualize a sysctl oid is set CTLFLAG_VNET on it. But for now keep macros in place to avoid large code churn. Sponsored by: Nginx, Inc. Modified: head/sys/kern/kern_sysctl.c head/sys/net/vnet.c head/sys/net/vnet.h Modified: head/sys/kern/kern_sysctl.c == --- head/sys/kern/kern_sysctl.c Fri Feb 7 13:40:22 2014(r261589) +++ head/sys/kern/kern_sysctl.c Fri Feb 7 13:47:33 2014(r261590) @@ -1491,7 +1491,10 @@ sysctl_root(SYSCTL_HANDLER_ARGS) #endif oid-oid_running++; SYSCTL_XUNLOCK(); - +#ifdef VIMAGE + if ((oid-oid_kind CTLFLAG_VNET) arg1 != NULL) + arg1 = (void *)(curvnet-vnet_data_base + (uintptr_t)arg1); +#endif if (!(oid-oid_kind CTLFLAG_MPSAFE)) mtx_lock(Giant); error = oid-oid_handler(oid, arg1, arg2, req); Modified: head/sys/net/vnet.c == --- head/sys/net/vnet.c Fri Feb 7 13:40:22 2014(r261589) +++ head/sys/net/vnet.c Fri Feb 7 13:47:33 2014(r261590) @@ -464,47 +464,6 @@ vnet_data_copy(void *start, int size) } /* - * Variants on sysctl_handle_foo that know how to handle virtualized global - * variables: if 'arg1' is a pointer, then we transform it to the local vnet - * offset. - */ -int -vnet_sysctl_handle_int(SYSCTL_HANDLER_ARGS) -{ - - if (arg1 != NULL) - arg1 = (void *)(curvnet-vnet_data_base + (uintptr_t)arg1); - return (sysctl_handle_int(oidp, arg1, arg2, req)); -} - -int -vnet_sysctl_handle_opaque(SYSCTL_HANDLER_ARGS) -{ - - if (arg1 != NULL) - arg1 = (void *)(curvnet-vnet_data_base + (uintptr_t)arg1); - return (sysctl_handle_opaque(oidp, arg1, arg2, req)); -} - -int -vnet_sysctl_handle_string(SYSCTL_HANDLER_ARGS) -{ - - if (arg1 != NULL) - arg1 = (void *)(curvnet-vnet_data_base + (uintptr_t)arg1); - return (sysctl_handle_string(oidp, arg1, arg2, req)); -} - -int -vnet_sysctl_handle_uint(SYSCTL_HANDLER_ARGS) -{ - - if (arg1 != NULL) - arg1 = (void *)(curvnet-vnet_data_base + (uintptr_t)arg1); - return (sysctl_handle_int(oidp, arg1, arg2, req)); -} - -/* * Support for special SYSINIT handlers registered via VNET_SYSINIT() * and VNET_SYSUNINIT(). */ Modified: head/sys/net/vnet.h == --- head/sys/net/vnet.h Fri Feb 7 13:40:22 2014(r261589) +++ head/sys/net/vnet.h Fri Feb 7 13:47:33 2014(r261590) @@ -290,15 +290,10 @@ void vnet_data_free(void *start_arg, in * arguments themselves, if required. */ #ifdef SYSCTL_OID -intvnet_sysctl_handle_int(SYSCTL_HANDLER_ARGS); -intvnet_sysctl_handle_opaque(SYSCTL_HANDLER_ARGS); -intvnet_sysctl_handle_string(SYSCTL_HANDLER_ARGS); -intvnet_sysctl_handle_uint(SYSCTL_HANDLER_ARGS); - #defineSYSCTL_VNET_INT(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_INT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ - ptr, val, vnet_sysctl_handle_int, I, descr) + ptr, val, sysctl_handle_int, I, descr) #defineSYSCTL_VNET_PROC(parent, nbr, name, access, ptr, arg, handler, \ fmt, descr) \ CTASSERT(((access) CTLTYPE) != 0);\ @@ -312,16 +307,16 @@ int vnet_sysctl_handle_uint(SYSCTL_HANDL #defineSYSCTL_VNET_STRING(parent, nbr, name, access, arg, len, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_STRING|CTLFLAG_VNET|(access), \ - arg, len, vnet_sysctl_handle_string, A, descr) + arg, len, sysctl_handle_string, A, descr) #defineSYSCTL_VNET_STRUCT(parent, nbr, name, access, ptr, type, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_OPAQUE|CTLFLAG_VNET|(access), ptr, \ - sizeof(struct type), vnet_sysctl_handle_opaque, S, #type, \ + sizeof(struct type), sysctl_handle_opaque, S, #type, \ descr) #defineSYSCTL_VNET_UINT(parent, nbr, name, access, ptr, val, descr) \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_UINT|CTLFLAG_MPSAFE|CTLFLAG_VNET|(access), \ - ptr, val, vnet_sysctl_handle_uint, IU, descr) + ptr, val, sysctl_handle_int, IU, descr) #define
Re: svn commit: r261585 - head/sys/dev/vt/hw/vga
Hi Aleksandr, On 7 February 2014 13:39, Aleksandr Rybalko r...@freebsd.org wrote: +static void +vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color) +{ +} + +static void +vga_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, +term_color_t color) +{ +} + static inline void vga_bitblt_draw(struct vt_device *vd, const uint8_t *src, u_long ldst, uint8_t shift, unsigned int width, unsigned int height, My question is, why do the setpixel and drawrect functions take signed coordinates, whereas bitblt does not? Wouldn' it be better to use unsigned coordinates all over the place? Furthermore, I think it's a bit weird that vga_bitbltchr() contains explicit bounds checking. What happened there? I remember at one point in time, we had the nice invariant that vt(9) never attempted to draw outside of the display resolution. What caused us to give up on that? -- Ed Schouten e...@80386.nl ___ 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: r261591 - head/lib/libstand/powerpc
Author: nwhitehorn Date: Fri Feb 7 14:24:36 2014 New Revision: 261591 URL: http://svnweb.freebsd.org/changeset/base/261591 Log: Make libstand setjmp work for both 64- and 32-bit ABIs. Modified: head/lib/libstand/powerpc/_setjmp.S Modified: head/lib/libstand/powerpc/_setjmp.S == --- head/lib/libstand/powerpc/_setjmp.S Fri Feb 7 13:47:33 2014 (r261590) +++ head/lib/libstand/powerpc/_setjmp.S Fri Feb 7 14:24:36 2014 (r261591) @@ -1,36 +1,115 @@ -/* $NetBSD: _setjmp.S,v 1.1 1997/03/29 20:55:53 thorpej Exp $ */ +/* $FreeBSD$ */ +/* from: NetBSD: setjmp.S,v 1.1 1998/01/27 15:13:12 sakamoto Exp $ */ +/* from: OpenBSD: setjmp.S,v 1.2 1996/12/28 06:22:18 rahnds Exp */ +/* kernel version of this file, does not have signal goop */ +/* int setjmp(jmp_buf env) */ #include machine/asm.h -#if (defined(LIBC_SCCS) || defined(LIBC_RCS)) !defined(lint) - .text - .asciz $FreeBSD$ +#ifdef __powerpc64__ +#define LD_REG ld +#defineST_REG std +#defineREGWIDTH 8 +#else +#defineLD_REG lwz +#defineST_REG stw +#defineREGWIDTH 4 #endif -/* - * C library -- _setjmp, _longjmp - * - * _longjmp(a,v) - * will generate a return(v?v:1) from the last call to - * _setjmp(a) - * by restoring registers from the stack. - * The previous signal state is NOT restored. - */ - -ENTRY(_setjmp) - mflr11 - mfcr12 - mr 10,1 - mr 9,2 - stmw9,8(3) - li 3,0 +#define JMP_r1 1*REGWIDTH +#define JMP_r2 2*REGWIDTH +#define JMP_r143*REGWIDTH +#define JMP_r15 4*REGWIDTH +#define JMP_r16 5*REGWIDTH +#define JMP_r17 6*REGWIDTH +#define JMP_r18 7*REGWIDTH +#define JMP_r19 8*REGWIDTH +#define JMP_r20 9*REGWIDTH +#define JMP_r21 10*REGWIDTH +#define JMP_r22 11*REGWIDTH +#define JMP_r23 12*REGWIDTH +#define JMP_r24 13*REGWIDTH +#define JMP_r25 14*REGWIDTH +#define JMP_r26 15*REGWIDTH +#define JMP_r27 16*REGWIDTH +#define JMP_r28 17*REGWIDTH +#define JMP_r29 18*REGWIDTH +#define JMP_r30 19*REGWIDTH +#define JMP_r31 20*REGWIDTH +#define JMP_lr 21*REGWIDTH +#define JMP_cr 22*REGWIDTH +#define JMP_ctr23*REGWIDTH +#define JMP_xer24*REGWIDTH +#define JMP_sig25*REGWIDTH + +ASENTRY_NOPROF(setjmp) + ST_REG 31, JMP_r31(3) + /* r1, r2, r14-r30 */ + ST_REG 1, JMP_r1 (3) + ST_REG 2, JMP_r2 (3) + ST_REG 14, JMP_r14(3) + ST_REG 15, JMP_r15(3) + ST_REG 16, JMP_r16(3) + ST_REG 17, JMP_r17(3) + ST_REG 18, JMP_r18(3) + ST_REG 19, JMP_r19(3) + ST_REG 20, JMP_r20(3) + ST_REG 21, JMP_r21(3) + ST_REG 22, JMP_r22(3) + ST_REG 23, JMP_r23(3) + ST_REG 24, JMP_r24(3) + ST_REG 25, JMP_r25(3) + ST_REG 26, JMP_r26(3) + ST_REG 27, JMP_r27(3) + ST_REG 28, JMP_r28(3) + ST_REG 29, JMP_r29(3) + ST_REG 30, JMP_r30(3) + /* cr, lr, ctr, xer */ + mfcr 0 + ST_REG 0, JMP_cr(3) + mflr 0 + ST_REG 0, JMP_lr(3) + mfctr 0 + ST_REG 0, JMP_ctr(3) + mfxer 0 + ST_REG 0, JMP_xer(3) + /* f14-f31, fpscr */ + li 3, 0 blr -ENTRY(_longjmp) - lmw 9,8(3) - mtlr11 - mtcr12 - mr 2,9 - mr 1,10 - mr 3,4 + +.extern sigsetmask +ASENTRY_NOPROF(longjmp) + LD_REG 31, JMP_r31(3) + /* r1, r2, r14-r30 */ + LD_REG 1, JMP_r1 (3) + LD_REG 2, JMP_r2 (3) + LD_REG 14, JMP_r14(3) + LD_REG 15, JMP_r15(3) + LD_REG 16, JMP_r16(3) + LD_REG 17, JMP_r17(3) + LD_REG 18, JMP_r18(3) + LD_REG 19, JMP_r19(3) + LD_REG 20, JMP_r20(3) + LD_REG 21, JMP_r21(3) + LD_REG 22, JMP_r22(3) + LD_REG 23, JMP_r23(3) + LD_REG 24, JMP_r24(3) + LD_REG 25, JMP_r25(3) + LD_REG 26, JMP_r26(3) + LD_REG 27, JMP_r27(3) + LD_REG 28, JMP_r28(3) + LD_REG 29, JMP_r29(3) + LD_REG 30, JMP_r30(3) + /* cr, lr, ctr, xer */ + LD_REG 0, JMP_cr(3) + mtcr 0 + LD_REG 0, JMP_lr(3) + mtlr 0 + LD_REG 0, JMP_ctr(3) + mtctr 0 + LD_REG 0, JMP_xer(3) + mtxer 0 + /* f14-f31, fpscr */ + mr 3, 4 blr ___ 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: r261592 - head/sys/netinet
Author: glebius Date: Fri Feb 7 14:26:33 2014 New Revision: 261592 URL: http://svnweb.freebsd.org/changeset/base/261592 Log: Catch up on r261590. Modified: head/sys/netinet/in_pcb.c Modified: head/sys/netinet/in_pcb.c == --- head/sys/netinet/in_pcb.c Fri Feb 7 14:24:36 2014(r261591) +++ head/sys/netinet/in_pcb.c Fri Feb 7 14:26:33 2014(r261592) @@ -145,11 +145,7 @@ sysctl_net_ipport_check(SYSCTL_HANDLER_A { int error; -#ifdef VIMAGE - error = vnet_sysctl_handle_int(oidp, arg1, arg2, req); -#else error = sysctl_handle_int(oidp, arg1, arg2, req); -#endif if (error == 0) { RANGECHK(V_ipport_lowfirstauto, 1, IPPORT_RESERVED - 1); RANGECHK(V_ipport_lowlastauto, 1, IPPORT_RESERVED - 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: r261593 - in head: share/man/man9 sys/sys sys/vm
Author: glebius Date: Fri Feb 7 14:29:03 2014 New Revision: 261593 URL: http://svnweb.freebsd.org/changeset/base/261593 Log: Provide macros that allow easily export uma(9) zone limits and current usage via sysctl(9): SYSCTL_UMA_MAX() SYSCTL_ADD_UMA_MAX() SYSCTL_UMA_CUR() SYSCTL_ADD_UMA_CUR() Sponsored by: Nginx, Inc. Modified: head/share/man/man9/zone.9 head/sys/sys/sysctl.h head/sys/vm/uma_core.c Modified: head/share/man/man9/zone.9 == --- head/share/man/man9/zone.9 Fri Feb 7 14:26:33 2014(r261592) +++ head/share/man/man9/zone.9 Fri Feb 7 14:29:03 2014(r261593) @@ -25,7 +25,7 @@ .\ .\ $FreeBSD$ .\ -.Dd March 21, 2013 +.Dd February 7, 2014 .Dt ZONE 9 .Os .Sh NAME @@ -71,6 +71,11 @@ .Fn uma_zone_get_cur uma_zone_t zone .Ft void .Fn uma_zone_set_warning uma_zone_t zone const char *warning +.In sys/sysctl.h +.Fn SYSCTL_UMA_MAX parent nbr name access zone descr +.Fn SYSCTL_ADD_UMA_MAX ctx parent nbr name access zone descr +.Fn SYSCTL_UMA_CUR parent nbr name access zone descr +.Fn SYSCTL_ADD_UMA_CUR ctx parent nbr name access zone descr .Sh DESCRIPTION The zone allocator provides an efficient interface for managing dynamically-sized collections of items of similar size. @@ -307,6 +312,38 @@ Warnings can be turned off globally by s .Va vm.zone_warnings sysctl tunable to .Va 0 . +.Pp +The +.Fn SYSCTL_UMA_MAX parent nbr name access zone descr +macro declares a static +.Xr sysctl +oid that exports the effective upper limit number of items for a zone. +The +.Fa zone +argument should be a pointer to +.Vt uma_zone_t . +A read of the oid returns value obtained through +.Fn uma_zone_get_max . +A write to the oid sets new value via +.Fn uma_zone_set_max . +The +.Fn SYSCTL_ADD_UMA_MAX ctx parent nbr name access zone descr +macro is provided to create this type of oid dynamically. +.Pp +The +.Fn SYSCTL_UMA_CUR parent nbr name access zone descr +macro declares a static read only +.Xr sysctl +oid that exports the approximate current occupancy of the zone. +The +.Fa zone +argument should be a pointer to +.Vt uma_zone_t . +A read of the oid returns value obtained through +.Fn uma_zone_get_cur . +The +.Fn SYSCTL_ADD_UMA_CUR ctx parent nbr name zone descr +macro is provided to create this type of oid dynamically. .Sh RETURN VALUES The .Fn uma_zalloc Modified: head/sys/sys/sysctl.h == --- head/sys/sys/sysctl.h Fri Feb 7 14:26:33 2014(r261592) +++ head/sys/sys/sysctl.h Fri Feb 7 14:29:03 2014(r261593) @@ -186,6 +186,9 @@ int sysctl_handle_string(SYSCTL_HANDLER_ int sysctl_handle_opaque(SYSCTL_HANDLER_ARGS); int sysctl_handle_counter_u64(SYSCTL_HANDLER_ARGS); +int sysctl_handle_uma_zone_max(SYSCTL_HANDLER_ARGS); +int sysctl_handle_uma_zone_cur(SYSCTL_HANDLER_ARGS); + int sysctl_dpcpu_int(SYSCTL_HANDLER_ARGS); int sysctl_dpcpu_long(SYSCTL_HANDLER_ARGS); int sysctl_dpcpu_quad(SYSCTL_HANDLER_ARGS); @@ -431,6 +434,30 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a sysctl_add_oid(ctx, parent, nbr, name, (access), \ ptr, arg, handler, fmt, __DESCR(descr)) +/* Oid to handle limits on uma(9) zone specified by pointer. */ +#defineSYSCTL_UMA_MAX(parent, nbr, name, access, ptr, descr) \ + SYSCTL_ASSERT_TYPE(INT, ptr, parent, name); \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_MPSAFE | (access),\ + ptr, 0, sysctl_handle_uma_zone_max, I, descr) +#defineSYSCTL_ADD_UMA_MAX(ctx, parent, nbr, name, access, ptr, descr)\ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_MPSAFE | (access),\ + SYSCTL_ADD_ASSERT_TYPE(INT, ptr), 0,\ + sysctl_handle_uma_zone_max, I, __DESCR(descr)) + +/* Oid to obtain current use of uma(9) zone specified by pointer. */ +#defineSYSCTL_UMA_CUR(parent, nbr, name, access, ptr, descr) \ + SYSCTL_ASSERT_TYPE(INT, ptr, parent, name); \ + SYSCTL_OID(parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ + ptr, 0, sysctl_handle_uma_zone_cur, I, descr) +#defineSYSCTL_ADD_UMA_CUR(ctx, parent, nbr, name, access, ptr, descr) \ + sysctl_add_oid(ctx, parent, nbr, name, \ + CTLTYPE_INT | CTLFLAG_MPSAFE | CTLFLAG_RD | (access), \ + SYSCTL_ADD_ASSERT_TYPE(INT, ptr), 0,\ + sysctl_handle_uma_zone_cur, I, __DESCR(descr)) + /* * A macro to generate a read-only sysctl to indicate the presense of optional * kernel features. Modified:
svn commit: r261594 - head/sys/netinet
Author: glebius Date: Fri Feb 7 14:31:51 2014 New Revision: 261594 URL: http://svnweb.freebsd.org/changeset/base/261594 Log: Utilize SYSCTL_UMA_CUR() to export usage of syncache and tcp reassembly zones. Sponsored by: Nginx, Inc. Modified: head/sys/netinet/tcp_reass.c head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_reass.c == --- head/sys/netinet/tcp_reass.cFri Feb 7 14:29:03 2014 (r261593) +++ head/sys/netinet/tcp_reass.cFri Feb 7 14:31:51 2014 (r261594) @@ -75,8 +75,6 @@ __FBSDID($FreeBSD$); #include netinet/tcp_debug.h #endif /* TCPDEBUG */ -static int tcp_reass_sysctl_qsize(SYSCTL_HANDLER_ARGS); - static SYSCTL_NODE(_net_inet_tcp, OID_AUTO, reass, CTLFLAG_RW, 0, TCP Segment Reassembly Queue); @@ -86,10 +84,6 @@ SYSCTL_VNET_INT(_net_inet_tcp_reass, OID VNET_NAME(tcp_reass_maxseg), 0, Global maximum number of TCP Segments in Reassembly Queue); -SYSCTL_VNET_PROC(_net_inet_tcp_reass, OID_AUTO, cursegments, -(CTLTYPE_INT | CTLFLAG_RD), NULL, 0, tcp_reass_sysctl_qsize, I, -Global number of TCP Segments currently in Reassembly Queue); - static VNET_DEFINE(int, tcp_reass_overflows) = 0; #defineV_tcp_reass_overflows VNET(tcp_reass_overflows) SYSCTL_VNET_INT(_net_inet_tcp_reass, OID_AUTO, overflows, @@ -99,6 +93,9 @@ SYSCTL_VNET_INT(_net_inet_tcp_reass, OID static VNET_DEFINE(uma_zone_t, tcp_reass_zone); #defineV_tcp_reass_zoneVNET(tcp_reass_zone) +SYSCTL_UMA_CUR(_net_inet_tcp_reass, OID_AUTO, cursegments, CTLFLAG_VNET, +VNET_NAME(tcp_reass_zone), +Global number of TCP Segments currently in Reassembly Queue); /* Initialize TCP reassembly queue */ static void @@ -155,15 +152,6 @@ tcp_reass_flush(struct tcpcb *tp) tp, tp-t_segqlen)); } -static int -tcp_reass_sysctl_qsize(SYSCTL_HANDLER_ARGS) -{ - int qsize; - - qsize = uma_zone_get_cur(V_tcp_reass_zone); - return (sysctl_handle_int(oidp, qsize, 0, req)); -} - int tcp_reass(struct tcpcb *tp, struct tcphdr *th, int *tlenp, struct mbuf *m) { Modified: head/sys/netinet/tcp_syncache.c == --- head/sys/netinet/tcp_syncache.c Fri Feb 7 14:29:03 2014 (r261593) +++ head/sys/netinet/tcp_syncache.c Fri Feb 7 14:31:51 2014 (r261594) @@ -126,7 +126,6 @@ struct syncache *syncache_lookup(struct static int syncache_respond(struct syncache *); static struct socket *syncache_socket(struct syncache *, struct socket *, struct mbuf *m); -static int syncache_sysctl_count(SYSCTL_HANDLER_ARGS); static void syncache_timeout(struct syncache *sc, struct syncache_head *sch, int docallout); static void syncache_timer(void *); @@ -170,9 +169,8 @@ SYSCTL_VNET_UINT(_net_inet_tcp_syncache, VNET_NAME(tcp_syncache.cache_limit), 0, Overall entry limit for syncache); -SYSCTL_VNET_PROC(_net_inet_tcp_syncache, OID_AUTO, count, (CTLTYPE_UINT|CTLFLAG_RD), -NULL, 0, syncache_sysctl_count, IU, -Current number of entries in syncache); +SYSCTL_UMA_CUR(_net_inet_tcp_syncache, OID_AUTO, count, CTLFLAG_VNET, +VNET_NAME(tcp_syncache.zone), Current number of entries in syncache); SYSCTL_VNET_UINT(_net_inet_tcp_syncache, OID_AUTO, hashsize, CTLFLAG_RDTUN, VNET_NAME(tcp_syncache.hashsize), 0, @@ -328,15 +326,6 @@ syncache_destroy(void) } #endif -static int -syncache_sysctl_count(SYSCTL_HANDLER_ARGS) -{ - int count; - - count = uma_zone_get_cur(V_tcp_syncache.zone); - return (sysctl_handle_int(oidp, count, 0, req)); -} - /* * Inserts a syncache entry into the specified bucket row. * Locks and unlocks the syncache_head autonomously. ___ 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: r261595 - in head: share/man/man9 sys/sys
Author: glebius Date: Fri Feb 7 14:34:31 2014 New Revision: 261595 URL: http://svnweb.freebsd.org/changeset/base/261595 Log: sysctl_handle_counter_u64() doesn't use arg2 argument, thus simplify the SYSCTL_COUNTER_U64() macro. Sponsored by: Nginx, Inc. Modified: head/share/man/man9/counter.9 head/sys/sys/sysctl.h Modified: head/share/man/man9/counter.9 == --- head/share/man/man9/counter.9 Fri Feb 7 14:31:51 2014 (r261594) +++ head/share/man/man9/counter.9 Fri Feb 7 14:34:31 2014 (r261595) @@ -25,7 +25,7 @@ .\ .\ $FreeBSD$ .\ -.Dd April 3, 2013 +.Dd February 7, 2014 .Dt COUNTER 9 .Os .Sh NAME @@ -52,7 +52,7 @@ .Ft void .Fn counter_u64_zero counter_u64_t c .In sys/sysctl.h -.Fn SYSCTL_COUNTER_U64 parent nbr name access ptr val descr +.Fn SYSCTL_COUNTER_U64 parent nbr name access ptr descr .Fn SYSCTL_ADD_COUNTER_U64 ctx parent nbr name access ptr descr .Sh DESCRIPTION .Nm @@ -126,7 +126,7 @@ value for any moment. Clear the counter .Fa c and set it to zero. -.It Fn SYSCTL_COUNTER_U64 parent nbr name access ptr val descr +.It Fn SYSCTL_COUNTER_U64 parent nbr name access ptr descr Declare a static .Xr sysctl oid that would represent a Modified: head/sys/sys/sysctl.h == --- head/sys/sys/sysctl.h Fri Feb 7 14:31:51 2014(r261594) +++ head/sys/sys/sysctl.h Fri Feb 7 14:34:31 2014(r261595) @@ -393,11 +393,11 @@ SYSCTL_ALLOWED_TYPES(UINT64, uint64_t *a sysctl_handle_64, QU, __DESCR(descr)) /* Oid for a 64-bit unsigned counter(9). The pointer must be non NULL. */ -#defineSYSCTL_COUNTER_U64(parent, nbr, name, access, ptr, val, descr) \ +#defineSYSCTL_COUNTER_U64(parent, nbr, name, access, ptr, descr) \ SYSCTL_ASSERT_TYPE(UINT64, ptr, parent, name); \ SYSCTL_OID(parent, nbr, name, \ CTLTYPE_U64 | CTLFLAG_MPSAFE | (access),\ - ptr, val, sysctl_handle_counter_u64, QU, descr) + ptr, 0, sysctl_handle_counter_u64, QU, descr) #defineSYSCTL_ADD_COUNTER_U64(ctx, parent, nbr, name, access, ptr, descr)\ sysctl_add_oid(ctx, parent, nbr, name, \ ___ 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: r261599 - head/share/man/man4
Author: hselasky Date: Fri Feb 7 15:00:08 2014 New Revision: 261599 URL: http://svnweb.freebsd.org/changeset/base/261599 Log: The atp USB driver is generic and its manual page should be available for all platforms. Add wsp manual page to build. MFC after:1 week Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileFri Feb 7 14:58:40 2014 (r261598) +++ head/share/man/man4/MakefileFri Feb 7 15:00:08 2014 (r261599) @@ -60,7 +60,7 @@ MAN= aac.4 \ ath_pci.4 \ atkbd.4 \ atkbdc.4 \ - ${_atp.4} \ + atp.4 \ ${_atf_test_case.4} \ ${_atrtc.4} \ ${_attimer.4} \ @@ -568,6 +568,7 @@ MAN=aac.4 \ wlan_wep.4 \ wlan_xauth.4 \ ${_wpi.4} \ + wsp.4 \ xe.4 \ ${_xen.4} \ xhci.4 \ @@ -757,7 +758,6 @@ _amdsbwd.4= amdsbwd.4 _amdsmb.4= amdsmb.4 _amdtemp.4=amdtemp.4 _asmc.4= asmc.4 -_atp.4=atp.4 _bxe.4=bxe.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 @@ -830,9 +830,6 @@ MLINKS+=qlxgbe.4 if_qlxgbe.4 MLINKS+=sfxge.4 if_sfxge.4 .endif -.if ${MACHINE_CPUARCH} == powerpc -_atp.4=atp.4 -.endif .if ${MACHINE_CPUARCH} == mips _nvram2env.4= nvram2env.4 .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: r261601 - in head: sys/net sys/netinet sys/netinet6 usr.bin/netstat
Author: glebius Date: Fri Feb 7 15:18:23 2014 New Revision: 261601 URL: http://svnweb.freebsd.org/changeset/base/261601 Log: o Revamp API between flowtable and netinet, netinet6. - ip_output() and ip_output6() simply call flowtable_lookup(), passing mbuf and address family. That's the only code under #ifdef FLOWTABLE in the protocols code now. o Revamp statistics gathering and export. - Remove hand made pcpu stats, and utilize counter(9). - Snapshot of statistics is available via 'netstat -rs'. - All sysctls are moved into net.flowtable namespace, since spreading them over net.inet isn't correct. o Properly separate at compile time INET and INET6 parts. o General cleanup. - Remove chain of multiple flowtables. We simply have one for IPv4 and one for IPv6. - Flowtables are allocated in flowtable.c, symbols are static. - With proper argument to SYSINIT() we no longer need flowtable_ready. - Hash salt doesn't need to be per-VNET. - Removed rudimentary debugging, which use quite useless in dtrace era. The runtime behavior of flowtable shouldn't be changed by this commit. Sponsored by: Netflix Sponsored by: Nginx, Inc. Added: head/usr.bin/netstat/flowtable.c (contents, props changed) Modified: head/sys/net/flowtable.c head/sys/net/flowtable.h head/sys/net/route.c head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netinet6/in6_proto.c head/sys/netinet6/ip6_input.c head/sys/netinet6/ip6_output.c head/usr.bin/netstat/Makefile head/usr.bin/netstat/main.c head/usr.bin/netstat/netstat.h Modified: head/sys/net/flowtable.c == --- head/sys/net/flowtable.cFri Feb 7 15:10:24 2014(r261600) +++ head/sys/net/flowtable.cFri Feb 7 15:18:23 2014(r261601) @@ -146,23 +146,13 @@ union flentryp { struct flentry **pcpu[MAXCPU]; }; -struct flowtable_stats { - uint64_tft_collisions; - uint64_tft_allocated; - uint64_tft_misses; - uint64_tft_max_depth; - uint64_tft_free_checks; - uint64_tft_frees; - uint64_tft_hits; - uint64_tft_lookups; -} __aligned(CACHE_LINE_SIZE); - struct flowtable { - struct flowtable_stats ft_stats[MAXCPU]; + counter_u64_t *ft_stat; + uma_zone_t ft_zone; int ft_size; int ft_lock_count; uint32_tft_flags; - char*ft_name; + uint32_tft_max_depth; fl_lock_t *ft_lock; fl_lock_t *ft_unlock; fl_rtalloc_t*ft_rtalloc; @@ -173,9 +163,7 @@ struct flowtable { union flentryp ft_table; bitstr_t*ft_masks[MAXCPU]; bitstr_t*ft_tmpmask; - struct flowtable *ft_next; - uint32_tft_count __aligned(CACHE_LINE_SIZE); uint32_tft_udp_idle __aligned(CACHE_LINE_SIZE); uint32_tft_fin_wait_idle; uint32_tft_syn_idle; @@ -183,17 +171,12 @@ struct flowtable { boolean_t ft_full; } __aligned(CACHE_LINE_SIZE); -static struct proc *flowcleanerproc; -static VNET_DEFINE(struct flowtable *, flow_list_head); -static VNET_DEFINE(uint32_t, flow_hashjitter); -static VNET_DEFINE(uma_zone_t, flow_ipv4_zone); -static VNET_DEFINE(uma_zone_t, flow_ipv6_zone); - -#defineV_flow_list_headVNET(flow_list_head) -#defineV_flow_hashjitter VNET(flow_hashjitter) -#defineV_flow_ipv4_zoneVNET(flow_ipv4_zone) -#defineV_flow_ipv6_zoneVNET(flow_ipv6_zone) +#defineFLOWSTAT_ADD(ft, name, v) \ + counter_u64_add((ft)-ft_stat[offsetof(struct flowtable_stat, name) / sizeof(uint64_t)], (v)) +#defineFLOWSTAT_INC(ft, name) FLOWSTAT_ADD(ft, name, 1) +static struct proc *flowcleanerproc; +static uint32_t flow_hashjitter; static struct cv flowclean_f_cv; static struct cv flowclean_c_cv; @@ -201,24 +184,8 @@ static struct mtx flowclean_lock; static uint32_tflowclean_cycles; static uint32_tflowclean_freq; -#ifdef FLOWTABLE_DEBUG -#define FLDPRINTF(ft, flags, fmt, ...) \ -do { \ - if ((ft)-ft_flags (flags)) \ - printf((fmt), __VA_ARGS__); \ -} while (0); \ - -#else -#define FLDPRINTF(ft, flags, fmt, ...) - -#endif - - /* * TODO: - * - Make flowtable stats per-cpu, aggregated at sysctl call time, - * to avoid extra cache evictions caused by incrementing a shared - * counter * - add sysctls to resize flush flow tables * - Add per flowtable sysctls for statistics and configuring timeouts * - add saturation counter to rtentry to support per-packet load-balancing @@ -230,148 +197,51
svn commit: r261602 - head/lib/libc/inet
Author: kevlo Date: Fri Feb 7 15:26:19 2014 New Revision: 261602 URL: http://svnweb.freebsd.org/changeset/base/261602 Log: Set errno on inet_ntop(3) failure. Reviewed by: glebius Modified: head/lib/libc/inet/inet_ntop.c Modified: head/lib/libc/inet/inet_ntop.c == --- head/lib/libc/inet/inet_ntop.c Fri Feb 7 15:18:23 2014 (r261601) +++ head/lib/libc/inet/inet_ntop.c Fri Feb 7 15:26:19 2014 (r261602) @@ -45,7 +45,7 @@ __FBSDID($FreeBSD$); static const char *inet_ntop4(const u_char *src, char *dst, socklen_t size); static const char *inet_ntop6(const u_char *src, char *dst, socklen_t size); -/* char * +/* const char * * inet_ntop(af, src, dst, size) * convert a network format address to presentation format. * return: @@ -169,8 +169,10 @@ inet_ntop6(const u_char *src, char *dst, if (i == 6 best.base == 0 (best.len == 6 || (best.len == 7 words[7] != 0x0001) || (best.len == 5 words[5] == 0x))) { - if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp))) + if (!inet_ntop4(src+12, tp, sizeof tmp - (tp - tmp))) { + errno = ENOSPC; return (NULL); + } tp += strlen(tp); break; } ___ 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: r261603 - head/sys/boot/efi
Author: emaste Date: Fri Feb 7 16:28:40 2014 New Revision: 261603 URL: http://svnweb.freebsd.org/changeset/base/261603 Log: Don't force efi to a 32-bit build on amd64 Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/efi/Makefile.inc Modified: head/sys/boot/efi/Makefile.inc == --- head/sys/boot/efi/Makefile.inc Fri Feb 7 15:26:19 2014 (r261602) +++ head/sys/boot/efi/Makefile.inc Fri Feb 7 16:28:40 2014 (r261603) @@ -2,17 +2,10 @@ BINDIR?= /boot -.if ${MACHINE_CPUARCH} == i386 || ${MACHINE_CPUARCH} == amd64 +.if ${MACHINE_CPUARCH} == i386 CFLAGS+=-march=i386 .endif -.if ${MACHINE_CPUARCH} == amd64 -CFLAGS+=-m32 -ACFLAGS+= -m32 -LDFLAGS+= -m elf_i386_fbsd -AFLAGS+=--32 -.endif - # Options used when building app-specific efi components CFLAGS+= -ffreestanding -fshort-wchar -Wformat LDFLAGS+= -nostdlib ___ 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: r261597 - head/share/man/man4
Author: hselasky Date: Fri Feb 7 14:56:34 2014 New Revision: 261597 URL: http://svnweb.freebsd.org/changeset/base/261597 Log: Add manual page for wsp driver. MFC after:1 week Added: head/share/man/man4/wsp.4 (contents, props changed) Added: head/share/man/man4/wsp.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/wsp.4 Fri Feb 7 14:56:34 2014(r261597) @@ -0,0 +1,96 @@ +.\ Copyright (c) 2014 Hans Petter Selasky hselasky at freebsd dot org. +.\ All rights reserved. +.\ +.\ Redistribution and use in source and binary forms, with or without +.\ modification, are permitted provided that the following conditions +.\ are met: +.\ 1. Redistributions of source code must retain the above copyright +.\notice, this list of conditions and the following disclaimer. +.\ 2. Redistributions in binary form must reproduce the above copyright +.\notice, this list of conditions and the following disclaimer in the +.\documentation and/or other materials provided with the distribution. +.\ 3. Neither the name of the author nor the names of any co-contributors +.\may be used to endorse or promote products derived from this software +.\ without specific prior written permission. +.\ +.\ 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$ +.\ +.Dd February 7, 2014 +.Dt WSP 4 +.Os +.Sh NAME +.Nm wsp +.Nd Wellspring touchpad driver +.Sh SYNOPSIS +To compile this driver into the kernel, place the following lines into +your kernel configuration file: +.Bd -ragged -offset indent +.Cd device wsp +.Cd device usb +.Ed +.Pp +Alternativly, to load the driver as a module at boot time, +place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +wsp_load=YES +.Ed +.Sh DESCRIPTION +The +.Nm +driver provides support for the Apple Internal Trackpad +device found in many Apple laptops. +.Pp +The driver simulates a three\-button mouse using multi\-finger tap +detection. +. +A single\-finger press generates a left button click. +A two\-finger tap maps to the right button; whereas a three\-finger tap +gets treated as a middle button click. +. +.Pp +.Nm +supports dynamic reconfiguration using +.Xr sysctl 8 ; +through nodes under +.Nm hw.usb.wsp . +Pointer sensitivity can be controlled using the sysctl tunable +.Nm hw.usb.wsp.scale_factor . +. +.Sh FILES +.Nm +creates a blocking pseudo\-device file, +.Pa /dev/wsp0 , +which presents the mouse as a +.Ar sysmouse +or +.Ar mousesystems +type device\-\-see +.Xr moused 8 +for an explanation of these mouse +types. +.Sh SEE ALSO +.Xr sysmouse 4 , +.Xr usb 4 , +.Xr loader.conf 5 , +.Xr xorg.conf 5 Pq Pa ports/x11/xorg , +.Xr moused 8 , +.Xr sysctl 8 +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Huang Wen Hui Aq huang...@gmail.com ___ 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: r261601 - in head: sys/net sys/netinet sys/netinet6 usr.bin/netstat
On Fri, Feb 07, 2014 at 03:34:27PM +, Bjoern A. Zeeb wrote: B * XXX This does not end up updating timeouts at runtime B * and only reflects the value for the last table added :-/ B */ B -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, syn_expire, CTLFLAG_RW, B +SYSCTL_VNET_INT(_net_flowtable, OID_AUTO, syn_expire, CTLFLAG_RW, B VNET_NAME(flowtable_syn_expire), 0, B seconds after which to remove syn allocated flow.); B -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, udp_expire, CTLFLAG_RW, B +SYSCTL_VNET_INT(_net_flowtable, OID_AUTO, udp_expire, CTLFLAG_RW, B VNET_NAME(flowtable_udp_expire), 0, B seconds after which to remove flow allocated to UDP.); B -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, fin_wait_expire, CTLFLAG_RW, B +SYSCTL_VNET_INT(_net_flowtable, OID_AUTO, fin_wait_expire, CTLFLAG_RW, B VNET_NAME(flowtable_fin_wait_expire), 0, B seconds after which to remove a flow in FIN_WAIT.); B -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, tcp_expire, CTLFLAG_RW, B +SYSCTL_VNET_INT(_net_flowtable, OID_AUTO, tcp_expire, CTLFLAG_RW, B VNET_NAME(flowtable_tcp_expire), 0, B seconds after which to remove flow allocated to a TCP connection.); B … B B B This is not what we are doing for a lot of other things in the tree which simply treat “inet” as “IP” without version number. Now I know that the floatable sits even between L3 and L2 given it caches pairs, I am still not sure I want to make net.* the “dumping ground” for these. And that's not nice that we are using inet as dumping ground for all kind of IP. B Pending a better solution I don’t care apart from that sysctl.confs entries for the people using floatable after all break with this. Taking into account absence of FLOWTABLE in GENERIC and all the problems that were (are?) there, I'm pretty sure these people are empty set :) -- 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: r261604 - head/contrib/libc++/include
Author: eadler Date: Fri Feb 7 18:10:34 2014 New Revision: 261604 URL: http://svnweb.freebsd.org/changeset/base/261604 Log: HEAD is not buildable for the past day. Commit a 'quick fix' in order to permit buildworld to complete. Reviewed by: theraven Modified: head/contrib/libc++/include/locale Modified: head/contrib/libc++/include/locale == --- head/contrib/libc++/include/locale Fri Feb 7 16:28:40 2014 (r261603) +++ head/contrib/libc++/include/locale Fri Feb 7 18:10:34 2014 (r261604) @@ -1012,7 +1012,7 @@ num_get_CharT, _InputIterator::__do_ge unsigned __dc = 0; for (; __b != __e; ++__b) { -if (__a_end - __a == __buf.size()) +if (__a_end - __a == (long)__buf.size()) { size_t __tmp = __buf.size(); __buf.resize(2*__buf.size()); @@ -1062,7 +1062,7 @@ num_get_CharT, _InputIterator::__do_ge unsigned __dc = 0; for (; __b != __e; ++__b) { -if (__a_end - __a == __buf.size()) +if (__a_end - __a == (long)__buf.size()) { size_t __tmp = __buf.size(); __buf.resize(2*__buf.size()); @@ -1116,7 +1116,7 @@ num_get_CharT, _InputIterator::__do_ge char __exp = 'E'; for (; __b != __e; ++__b) { -if (__a_end - __a == __buf.size()) +if (__a_end - __a == (long)__buf.size()) { size_t __tmp = __buf.size(); __buf.resize(2*__buf.size()); @@ -1166,7 +1166,7 @@ num_get_CharT, _InputIterator::do_get( unsigned __dc = 0; for (; __b != __e; ++__b) { -if (__a_end - __a == __buf.size()) +if (__a_end - __a == (long)__buf.size()) { size_t __tmp = __buf.size(); __buf.resize(2*__buf.size()); ___ 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: r261596 - head/sys/arm/arm
Author: ian Date: Fri Feb 7 14:38:51 2014 New Revision: 261596 URL: http://svnweb.freebsd.org/changeset/base/261596 Log: Remove references to PHYSADDR where it's used only in debugging output, and where the code that references it can safely be elided if it's not defined (meaning the code is used for legacy arm platforms that still define the compile-time PHYSADDR but not on newer systems that calculate the value at runtime). Modified: head/sys/arm/arm/elf_trampoline.c head/sys/arm/arm/pmap-v6.c head/sys/arm/arm/pmap.c head/sys/arm/arm/support.S Modified: head/sys/arm/arm/elf_trampoline.c == --- head/sys/arm/arm/elf_trampoline.c Fri Feb 7 14:34:31 2014 (r261595) +++ head/sys/arm/arm/elf_trampoline.c Fri Feb 7 14:38:51 2014 (r261596) @@ -189,7 +189,7 @@ _startC(void) int physaddr = KERNPHYSADDR; int tmp1; unsigned int sp = ((unsigned int)_end ~3) + 4; -#if defined(FLASHADDR) defined(LOADERRAMADDR) +#if defined(FLASHADDR) defined(PHYSADDR) defined(LOADERRAMADDR) unsigned int pc; __asm __volatile(mov %0, pc\n Modified: head/sys/arm/arm/pmap-v6.c == --- head/sys/arm/arm/pmap-v6.c Fri Feb 7 14:34:31 2014(r261595) +++ head/sys/arm/arm/pmap-v6.c Fri Feb 7 14:38:51 2014(r261596) @@ -1312,8 +1312,6 @@ pmap_init(void) vm_size_t s; int i, pv_npg; - PDEBUG(1, printf(pmap_init: phys_start = %08x\n, PHYSADDR)); - l2zone = uma_zcreate(L2 Table, L2_TABLE_SIZE_REAL, pmap_l2ptp_ctor, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); l2table_zone = uma_zcreate(L2 Table, sizeof(struct l2_dtable), NULL, Modified: head/sys/arm/arm/pmap.c == --- head/sys/arm/arm/pmap.c Fri Feb 7 14:34:31 2014(r261595) +++ head/sys/arm/arm/pmap.c Fri Feb 7 14:38:51 2014(r261596) @@ -1826,8 +1826,6 @@ pmap_init(void) { int shpgperproc = PMAP_SHPGPERPROC; - PDEBUG(1, printf(pmap_init: phys_start = %08x\n, PHYSADDR)); - l2zone = uma_zcreate(L2 Table, L2_TABLE_SIZE_REAL, pmap_l2ptp_ctor, NULL, NULL, NULL, UMA_ALIGN_PTR, UMA_ZONE_VM | UMA_ZONE_NOFREE); l2table_zone = uma_zcreate(L2 Table, sizeof(struct l2_dtable), NULL, Modified: head/sys/arm/arm/support.S == --- head/sys/arm/arm/support.S Fri Feb 7 14:34:31 2014(r261595) +++ head/sys/arm/arm/support.S Fri Feb 7 14:38:51 2014(r261596) @@ -939,7 +939,7 @@ END(memmove) ENTRY(memcpy) /* save leaf functions having to store this away */ /* Do not check arm_memcpy if we're running from flash */ -#ifdef FLASHADDR +#if defined(FLASHADDR) defined(PHYSADDR) #if FLASHADDR PHYSADDR ldr r3, =FLASHADDR cmp r3, pc ___ 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: r261598 - head/share/man/man4
Author: hselasky Date: Fri Feb 7 14:58:40 2014 New Revision: 261598 URL: http://svnweb.freebsd.org/changeset/base/261598 Log: Update atp driver manual page. Moused is now started automatically by devd. MFC after:1 week Modified: head/share/man/man4/atp.4 Modified: head/share/man/man4/atp.4 == --- head/share/man/man4/atp.4 Fri Feb 7 14:56:34 2014(r261597) +++ head/share/man/man4/atp.4 Fri Feb 7 14:58:40 2014(r261598) @@ -27,7 +27,7 @@ .\ .\ $FreeBSD$ .\ -.Dd November 12, 2009 +.Dd February 7, 2014 .Dt ATP 4 .Os .Sh NAME @@ -114,57 +114,6 @@ type device\-\-see .Xr moused 8 for an explanation of these mouse types. -.Xr moused 8 -can be configured to read touchpad data from -.Pa /dev/atp0 -and pass it along to the -.Xr sysmouse 4 -driver so that any process wanting to utilize mouse operation (such as -an X server) may fetch it from -.Pa /dev/sysmouse ; -alternatively, -.Pa /dev/atp0 -may be manipulated via -.Xr read 2 -and -.Xr ioctl 2 -calls to get mouse data directly. -.Sh EXAMPLES -To use a compatible Apple Trackpad as your console mouse: -.Pp -.Dl moused -p /dev/atp0 -t auto -.Pp -To launch -.Xr moused 8 -automatically upon boot, add the following to -.Pa /etc/rc.conf : -.Pp -.Dl moused_enable=YES -.Dl moused_type=auto -.Dl moused_port=/dev/atp0 -.Pp -If you want -.Xr moused 8 -to also probe for external USB mice or other devices, then add the -following to -.Pa /etc/rc.conf : -.Pp -.Dl moused_nondefault_enable=YES -.Dl moused_ums0_enable=YES -.Dl moused_ums1_enable=YES -.Pp -To be able to use the trackpad under X, change the Pointer section in -.Nm xorg.conf -to the following: -.Pp -.Dl Device /dev/atp0 -.Dl Protocol Auto -.Pp -Better still, if you want to be able to use the mouse in both virtual -consoles as well as in X change it to: -.Pp -.Dl Device /dev/sysmouse -.Dl Protocol Auto .Sh SEE ALSO .Xr sysmouse 4 , .Xr usb 4 , ___ 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: r261601 - in head: sys/net sys/netinet sys/netinet6 usr.bin/netstat
On 07 Feb 2014, at 15:18 , Gleb Smirnoff gleb...@freebsd.org wrote: ... /* * XXX This does not end up updating timeouts at runtime * and only reflects the value for the last table added :-/ */ -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, syn_expire, CTLFLAG_RW, +SYSCTL_VNET_INT(_net_flowtable, OID_AUTO, syn_expire, CTLFLAG_RW, VNET_NAME(flowtable_syn_expire), 0, seconds after which to remove syn allocated flow.); -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, udp_expire, CTLFLAG_RW, +SYSCTL_VNET_INT(_net_flowtable, OID_AUTO, udp_expire, CTLFLAG_RW, VNET_NAME(flowtable_udp_expire), 0, seconds after which to remove flow allocated to UDP.); -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, fin_wait_expire, CTLFLAG_RW, +SYSCTL_VNET_INT(_net_flowtable, OID_AUTO, fin_wait_expire, CTLFLAG_RW, VNET_NAME(flowtable_fin_wait_expire), 0, seconds after which to remove a flow in FIN_WAIT.); -SYSCTL_VNET_INT(_net_inet_flowtable, OID_AUTO, tcp_expire, CTLFLAG_RW, +SYSCTL_VNET_INT(_net_flowtable, OID_AUTO, tcp_expire, CTLFLAG_RW, VNET_NAME(flowtable_tcp_expire), 0, seconds after which to remove flow allocated to a TCP connection.); … This is not what we are doing for a lot of other things in the tree which simply treat “inet” as “IP” without version number. Now I know that the floatable sits even between L3 and L2 given it caches pairs, I am still not sure I want to make net.* the “dumping ground” for these. Pending a better solution I don’t care apart from that sysctl.confs entries for the people using floatable after all break with this. — Bjoern A. Zeeb ? ??? ??? ??: '??? ??? ?? ??? ?? ?? ??? ??? ??? ? ? ?? ?? ? ', ? ?, ??? ? ?? ?, ?.??? ___ 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: r261600 - head/sys/dev/bvm
Author: jhb Date: Fri Feb 7 15:10:24 2014 New Revision: 261600 URL: http://svnweb.freebsd.org/changeset/base/261600 Log: - Use a callout instead of the deprecated timeout_handle. - Set the console name always so that the bvm console device can be used via conscontrol even if it isn't chosen as the default console. Modified: head/sys/dev/bvm/bvm_console.c Modified: head/sys/dev/bvm/bvm_console.c == --- head/sys/dev/bvm/bvm_console.c Fri Feb 7 15:00:08 2014 (r261599) +++ head/sys/dev/bvm/bvm_console.c Fri Feb 7 15:10:24 2014 (r261600) @@ -58,8 +58,7 @@ static struct ttydevsw bvm_ttydevsw = { }; static int polltime; -static struct callout_handle bvm_timeouthandle -= CALLOUT_HANDLE_INITIALIZER(bvm_timeouthandle); +static struct callout bvm_timer; #if defined(KDB) static int alt_break_state; @@ -107,9 +106,9 @@ cn_drvinit(void *unused) { struct tty *tp; - if (bvm_consdev.cn_pri != CN_DEAD - bvm_consdev.cn_name[0] != '\0') { + if (bvm_consdev.cn_pri != CN_DEAD) { tp = tty_alloc(bvm_ttydevsw, NULL); + callout_init_mtx(bvm_timer, tty_getlock(tp), 0); tty_makedev(tp, NULL, bvmcons); } } @@ -120,7 +119,7 @@ bvm_tty_open(struct tty *tp) polltime = hz / BVMCONS_POLL_HZ; if (polltime 1) polltime = 1; - bvm_timeouthandle = timeout(bvm_timeout, tp, polltime); + callout_reset(bvm_timer, polltime, bvm_timeout, tp); return (0); } @@ -129,8 +128,9 @@ static void bvm_tty_close(struct tty *tp) { - /* XXX Should be replaced with callout_stop(9) */ - untimeout(bvm_timeout, tp, bvm_timeouthandle); + tty_lock(tp); + callout_stop(bvm_timer); + tty_unlock(tp); } static void @@ -158,13 +158,12 @@ bvm_timeout(void *v) tp = (struct tty *)v; - tty_lock(tp); + tty_lock_assert(tp, MA_OWNED); while ((c = bvm_cngetc(NULL)) != -1) ttydisc_rint(tp, c, 0); ttydisc_rint_done(tp); - tty_unlock(tp); - bvm_timeouthandle = timeout(bvm_timeout, tp, polltime); + callout_reset(bvm_timer, polltime, bvm_timeout, tp); } static void @@ -174,6 +173,7 @@ bvm_cnprobe(struct consdev *cp) disabled = 0; cp-cn_pri = CN_DEAD; + strcpy(cp-cn_name, bvmcons); resource_int_value(bvmconsole, 0, disabled, disabled); if (!disabled) { @@ -195,8 +195,6 @@ bvm_cninit(struct consdev *cp) for (i = 0; i strlen(bootmsg); i++) bvm_cnputc(cp, bootmsg[i]); } - - strcpy(cp-cn_name, bvmcons); } static 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
Re: svn commit: r261585 - head/sys/dev/vt/hw/vga
On Fri, 7 Feb 2014 15:04:47 +0100 Ed Schouten e...@80386.nl wrote: Hi Aleksandr, On 7 February 2014 13:39, Aleksandr Rybalko r...@freebsd.org wrote: +static void +vga_setpixel(struct vt_device *vd, int x, int y, term_color_t color) +{ +} + +static void +vga_drawrect(struct vt_device *vd, int x1, int y1, int x2, int y2, int fill, +term_color_t color) +{ +} + static inline void vga_bitblt_draw(struct vt_device *vd, const uint8_t *src, u_long ldst, uint8_t shift, unsigned int width, unsigned int height, My question is, why do the setpixel and drawrect functions take signed coordinates, whereas bitblt does not? Wouldn' it be better to use unsigned coordinates all over the place? Theoretically unsigned a bit better, practically does not matter (+/-2G or 4G). Using signed int we also can ask to draw object which is partially out of screen. (and strlen(int) strlen(unsigned int) :)) If you have objections, let discuss it. Also people asking me about advanced features of vt(9), like use multiple displays. I'm not sure, but signed coordinates may help with some things on that way (or makes more problems :) ). Furthermore, I think it's a bit weird that vga_bitbltchr() contains explicit bounds checking. What happened there? I remember at one point in time, we had the nice invariant that vt(9) never attempted to draw outside of the display resolution. What caused us to give up on that? Mouse cursor allowed to partially go out of screen, so we have to check (or use special function for mouse cursor). -- Ed Schouten e...@80386.nl -- Aleksandr Rybalko r...@freebsd.org ___ 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: r261605 - head/sys/conf
Author: jhb Date: Fri Feb 7 18:46:27 2014 New Revision: 261605 URL: http://svnweb.freebsd.org/changeset/base/261605 Log: Now that FreeBSD/i386 works as a bhyve guest, allow i386 kernels to include bvmconsole and bvmdebug. Modified: head/sys/conf/files.i386 Modified: head/sys/conf/files.i386 == --- head/sys/conf/files.i386Fri Feb 7 18:10:34 2014(r261604) +++ head/sys/conf/files.i386Fri Feb 7 18:46:27 2014(r261605) @@ -554,6 +554,11 @@ i386/xbox/pic16l.s optional xbox # compat/x86bios/x86bios.c optional x86bios | atkbd | dpms | vesa # +# bvm console +# +dev/bvm/bvm_console.c optionalbvmconsole +dev/bvm/bvm_dbg.c optionalbvmdebug +# # x86 shared code between IA32, AMD64 and PC98 architectures # x86/acpica/OsdEnvironment.coptional acpi ___ 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: r261607 - head/usr.sbin/bhyve
Author: jhb Date: Fri Feb 7 20:53:41 2014 New Revision: 261607 URL: http://svnweb.freebsd.org/changeset/base/261607 Log: Mark the I/O ports used by the bhyve console and debug devices as system resources. MFC after:1 week Modified: head/usr.sbin/bhyve/consport.c head/usr.sbin/bhyve/dbgport.c Modified: head/usr.sbin/bhyve/consport.c == --- head/usr.sbin/bhyve/consport.c Fri Feb 7 19:15:25 2014 (r261606) +++ head/usr.sbin/bhyve/consport.c Fri Feb 7 20:53:41 2014 (r261607) @@ -39,6 +39,7 @@ __FBSDID($FreeBSD$); #include stdbool.h #include inout.h +#include pci_lpc.h #defineBVM_CONSOLE_PORT0x220 #defineBVM_CONS_SIG('b' 8 | 'v') @@ -125,6 +126,8 @@ console_handler(struct vmctx *ctx, int v return (0); } +SYSRES_IO(BVM_CONSOLE_PORT, 4); + static struct inout_port consport = { bvmcons, BVM_CONSOLE_PORT, Modified: head/usr.sbin/bhyve/dbgport.c == --- head/usr.sbin/bhyve/dbgport.c Fri Feb 7 19:15:25 2014 (r261606) +++ head/usr.sbin/bhyve/dbgport.c Fri Feb 7 20:53:41 2014 (r261607) @@ -42,6 +42,7 @@ __FBSDID($FreeBSD$); #include inout.h #include dbgport.h +#include pci_lpc.h #defineBVM_DBG_PORT0x224 #defineBVM_DBG_SIG ('B' 8 | 'V') @@ -110,6 +111,8 @@ static struct inout_port dbgport = { dbg_handler }; +SYSRES_IO(BVM_DBG_PORT, 4); + void init_dbgport(int sport) { ___ 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: r261608 - head/contrib/libc++/include
Author: dim Date: Fri Feb 7 21:17:20 2014 New Revision: 261608 URL: http://svnweb.freebsd.org/changeset/base/261608 Log: Apply a cleaner solution for the sign warnings that can occur when compiling libc++'s locale header with -Wsystem-headers on. This has also been submitted upstream. Reported by: asomers Modified: head/contrib/libc++/include/locale Modified: head/contrib/libc++/include/locale == --- head/contrib/libc++/include/locale Fri Feb 7 20:53:41 2014 (r261607) +++ head/contrib/libc++/include/locale Fri Feb 7 21:17:20 2014 (r261608) @@ -1012,7 +1012,7 @@ num_get_CharT, _InputIterator::__do_ge unsigned __dc = 0; for (; __b != __e; ++__b) { -if (__a_end - __a == (long)__buf.size()) +if (__a_end == __a + __buf.size()) { size_t __tmp = __buf.size(); __buf.resize(2*__buf.size()); @@ -1062,7 +1062,7 @@ num_get_CharT, _InputIterator::__do_ge unsigned __dc = 0; for (; __b != __e; ++__b) { -if (__a_end - __a == (long)__buf.size()) +if (__a_end == __a + __buf.size()) { size_t __tmp = __buf.size(); __buf.resize(2*__buf.size()); @@ -1116,7 +1116,7 @@ num_get_CharT, _InputIterator::__do_ge char __exp = 'E'; for (; __b != __e; ++__b) { -if (__a_end - __a == (long)__buf.size()) +if (__a_end == __a + __buf.size()) { size_t __tmp = __buf.size(); __buf.resize(2*__buf.size()); @@ -1166,7 +1166,7 @@ num_get_CharT, _InputIterator::do_get( unsigned __dc = 0; for (; __b != __e; ++__b) { -if (__a_end - __a == (long)__buf.size()) +if (__a_end == __a + __buf.size()) { size_t __tmp = __buf.size(); __buf.resize(2*__buf.size()); ___ 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: r261585 - head/sys/dev/vt/hw/vga
Hi Aleksandr, On 7 February 2014 16:10, Aleksandr Rybalko r...@freebsd.org wrote: On Fri, 7 Feb 2014 15:04:47 +0100 Ed Schouten e...@80386.nl wrote: On 7 February 2014 13:39, Aleksandr Rybalko r...@freebsd.org wrote: Also people asking me about advanced features of vt(9), like use multiple displays. I'm not sure, but signed coordinates may help with some things on that way (or makes more problems :) ). But if you were to have multiple displays, you should have separate coordinate systems per display. It should not be seen as a single pane. Furthermore, I think it's a bit weird that vga_bitbltchr() contains explicit bounds checking. What happened there? I remember at one point in time, we had the nice invariant that vt(9) never attempted to draw outside of the display resolution. What caused us to give up on that? Mouse cursor allowed to partially go out of screen, so we have to check (or use special function for mouse cursor). Well, that's a compelling argument. Still, it's a bit weird then that the bitblt function itself does not take signed coordinates. Would it make sense to bring that in sync then? -- Ed Schouten e...@80386.nl ___ 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: r261610 - head/sys/net
Author: glebius Date: Fri Feb 7 21:56:16 2014 New Revision: 261610 URL: http://svnweb.freebsd.org/changeset/base/261610 Log: Remove unused defines. Modified: head/sys/net/flowtable.c Modified: head/sys/net/flowtable.c == --- head/sys/net/flowtable.cFri Feb 7 21:34:09 2014(r261609) +++ head/sys/net/flowtable.cFri Feb 7 21:56:16 2014(r261610) @@ -122,13 +122,6 @@ struct flentry_v6 { union ipv6_flow fl_flow; }; -#definefl_fhashfl_entry.fl_fhash -#definefl_flagsfl_entry.fl_flags -#definefl_protofl_entry.fl_proto -#definefl_uptime fl_entry.fl_uptime -#definefl_rt fl_entry.fl_rt -#definefl_lle fl_entry.fl_lle - #defineSECS_PER_HOUR 3600 #defineSECS_PER_DAY(24*SECS_PER_HOUR) ___ 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: r261585 - head/sys/dev/vt/hw/vga
On 7 лютого 2014 р. 23:27:58 GMT+02:00, Ed Schouten e...@80386.nl wrote: Hi Aleksandr, On 7 February 2014 16:10, Aleksandr Rybalko r...@freebsd.org wrote: On Fri, 7 Feb 2014 15:04:47 +0100 Ed Schouten e...@80386.nl wrote: On 7 February 2014 13:39, Aleksandr Rybalko r...@freebsd.org wrote: Also people asking me about advanced features of vt(9), like use multiple displays. I'm not sure, but signed coordinates may help with some things on that way (or makes more problems :) ). But if you were to have multiple displays, you should have separate coordinate systems per display. It should not be seen as a single pane. I don't really know yet how that will be implemented. :-) Furthermore, I think it's a bit weird that vga_bitbltchr() contains explicit bounds checking. What happened there? I remember at one point in time, we had the nice invariant that vt(9) never attempted to draw outside of the display resolution. What caused us to give up on that? Mouse cursor allowed to partially go out of screen, so we have to check (or use special function for mouse cursor). Well, that's a compelling argument. Still, it's a bit weird then that the bitblt function itself does not take signed coordinates. Would it make sense to bring that in sync then? Yup, this is good idea to sync them. Will do that a bit later. Thanks a lot Ed! Let me know if you will have something more. WBW -- Aleksandr Rybalko r...@ddteam.net ___ 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: r261612 - head/share/man/man4
Author: pjd Date: Fri Feb 7 22:15:48 2014 New Revision: 261612 URL: http://svnweb.freebsd.org/changeset/base/261612 Log: Add cross-references to casperd(8) and libcapsicum(3). Suggested by: rwatson Modified: head/share/man/man4/capsicum.4 Modified: head/share/man/man4/capsicum.4 == --- head/share/man/man4/capsicum.4 Fri Feb 7 22:04:56 2014 (r261611) +++ head/share/man/man4/capsicum.4 Fri Feb 7 22:15:48 2014 (r261612) @@ -104,7 +104,9 @@ associated with file descriptors; descri .Xr shm_open 2 , .Xr write 2 , .Xr cap_rights_get 3 , -.Xr procdesc 4 +.Xr libcapsicum 3 , +.Xr procdesc 4 , +.Xr casperd 8 .Sh HISTORY .Nm first appeared in ___ 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: r261613 - head/sys/net
Author: glebius Date: Fri Feb 7 22:30:42 2014 New Revision: 261613 URL: http://svnweb.freebsd.org/changeset/base/261613 Log: Fix comment. Modified: head/sys/net/flowtable.h Modified: head/sys/net/flowtable.h == --- head/sys/net/flowtable.hFri Feb 7 22:15:48 2014(r261612) +++ head/sys/net/flowtable.hFri Feb 7 22:30:42 2014(r261613) @@ -75,4 +75,4 @@ void flow_to_route_in6(struct flentry *f #endif #endif /* _KERNEL */ -#endif /* _NET_FLOWTABLE_H_ */ +#endif /* !_NET_FLOWTABLE_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: r261614 - in head/sys/boot: . powerpc/ofw powerpc/ps3 powerpc/uboot
Author: emaste Date: Fri Feb 7 22:49:42 2014 New Revision: 261614 URL: http://svnweb.freebsd.org/changeset/base/261614 Log: Build a 32-bit libstand under sys/boot/ for ppc64 This change is equivalent to r261567 for i386/amd64. Sponsored by: The FreeBSD Foundation Modified: head/sys/boot/Makefile.powerpc head/sys/boot/powerpc/ofw/Makefile head/sys/boot/powerpc/ps3/Makefile head/sys/boot/powerpc/uboot/Makefile Modified: head/sys/boot/Makefile.powerpc == --- head/sys/boot/Makefile.powerpc Fri Feb 7 22:30:42 2014 (r261613) +++ head/sys/boot/Makefile.powerpc Fri Feb 7 22:49:42 2014 (r261614) @@ -4,5 +4,6 @@ SUBDIR+= fdt .endif +SUBDIR+= libstand32 SUBDIR+= ofw SUBDIR+= uboot Modified: head/sys/boot/powerpc/ofw/Makefile == --- head/sys/boot/powerpc/ofw/Makefile Fri Feb 7 22:30:42 2014 (r261613) +++ head/sys/boot/powerpc/ofw/Makefile Fri Feb 7 22:49:42 2014 (r261614) @@ -89,10 +89,11 @@ LIBOFW= ${.OBJDIR}/../../ofw/libofw/lib CFLAGS+= -I${.CURDIR}/../../ofw/libofw # where to get libstand from +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBOFW} -lstand +LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} vers.c:${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} Modified: head/sys/boot/powerpc/ps3/Makefile == --- head/sys/boot/powerpc/ps3/Makefile Fri Feb 7 22:30:42 2014 (r261613) +++ head/sys/boot/powerpc/ps3/Makefile Fri Feb 7 22:49:42 2014 (r261614) @@ -95,10 +95,11 @@ CFLAGS+= -Wa,-mppc64bridge #.include ${.CURDIR}/../../ofw/common/Makefile.inc # where to get libstand from +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ DPADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBOFW} -lstand +LDADD= ${LIBFICL} ${LIBOFW} ${LIBSTAND} SC_DFLT_FONT=cp437 Modified: head/sys/boot/powerpc/uboot/Makefile == --- head/sys/boot/powerpc/uboot/MakefileFri Feb 7 22:30:42 2014 (r261613) +++ head/sys/boot/powerpc/uboot/MakefileFri Feb 7 22:49:42 2014 (r261614) @@ -95,10 +95,11 @@ CFLAGS+=-I${.CURDIR}/../../uboot/lib CFLAGS+= -I${.OBJDIR}/../../uboot/lib # where to get libstand from +LIBSTAND= ${.OBJDIR}/../../libstand32/libstand.a CFLAGS+= -I${.CURDIR}/../../../../lib/libstand/ DPADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} -LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} -lstand +LDADD= ${LIBFICL} ${LIBUBOOT} ${LIBFDT} ${LIBSTAND} vers.c:${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version sh ${.CURDIR}/../../common/newvers.sh ${.CURDIR}/version ${NEWVERSWHAT} ___ 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: r261615 - head/tests/sys
Author: asomers Date: Sat Feb 8 00:20:21 2014 New Revision: 261615 URL: http://svnweb.freebsd.org/changeset/base/261615 Log: tests/sys/Makefile use TESTS_SUBDIRS for kern instead of SUBDIRS. I don't think it makes a difference in this case, but TESTS_SUBDIRS is generally correct for subdirectories that contain tests. Sponsored by: Spectra Logic MFC after:5 days X-MFC-With: r261133 Modified: head/tests/sys/Makefile Modified: head/tests/sys/Makefile == --- head/tests/sys/Makefile Fri Feb 7 22:49:42 2014(r261614) +++ head/tests/sys/Makefile Sat Feb 8 00:20:21 2014(r261615) @@ -2,13 +2,11 @@ .include bsd.own.mk -SUBDIR= kern +.PATH: ${.CURDIR}/.. + +TESTS_SUBDIRS+=kern TESTSDIR= ${TESTSBASE}/sys KYUAFILE= yes -CLEANFILES+= Kyuafile -Kyuafile: ${.CURDIR}/../Kyuafile - cp -f ${.CURDIR}/../Kyuafile . - .include bsd.test.mk ___ 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: r261616 - head/sys/dev/usb/controller
Author: imp Date: Sat Feb 8 04:29:36 2014 New Revision: 261616 URL: http://svnweb.freebsd.org/changeset/base/261616 Log: Remove FreeBSD 6 support Modified: head/sys/dev/usb/controller/at91dci_atmelarm.c head/sys/dev/usb/controller/ohci_atmelarm.c Modified: head/sys/dev/usb/controller/at91dci_atmelarm.c == --- head/sys/dev/usb/controller/at91dci_atmelarm.c Sat Feb 8 00:20:21 2014(r261615) +++ head/sys/dev/usb/controller/at91dci_atmelarm.c Sat Feb 8 04:29:36 2014(r261616) @@ -212,13 +212,8 @@ at91_udp_attach(device_t dev) } device_set_ivars(sc-sc_dci.sc_bus.bdev, sc-sc_dci.sc_bus); -#if (__FreeBSD_version = 700031) err = bus_setup_intr(dev, sc-sc_dci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, (driver_intr_t *)at91dci_interrupt, sc, sc-sc_dci.sc_intr_hdl); -#else - err = bus_setup_intr(dev, sc-sc_dci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (driver_intr_t *)at91dci_interrupt, sc, sc-sc_dci.sc_intr_hdl); -#endif if (err) { sc-sc_dci.sc_intr_hdl = NULL; goto error; Modified: head/sys/dev/usb/controller/ohci_atmelarm.c == --- head/sys/dev/usb/controller/ohci_atmelarm.c Sat Feb 8 00:20:21 2014 (r261615) +++ head/sys/dev/usb/controller/ohci_atmelarm.c Sat Feb 8 04:29:36 2014 (r261616) @@ -131,13 +131,8 @@ ohci_atmelarm_attach(device_t dev) strlcpy(sc-sc_ohci.sc_vendor, Atmel, sizeof(sc-sc_ohci.sc_vendor)); -#if (__FreeBSD_version = 700031) err = bus_setup_intr(dev, sc-sc_ohci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, NULL, (driver_intr_t *)ohci_interrupt, sc, sc-sc_ohci.sc_intr_hdl); -#else - err = bus_setup_intr(dev, sc-sc_ohci.sc_irq_res, INTR_TYPE_BIO | INTR_MPSAFE, - (driver_intr_t *)ohci_interrupt, sc, sc-sc_ohci.sc_intr_hdl); -#endif if (err) { sc-sc_ohci.sc_intr_hdl = NULL; goto error; ___ 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: r261617 - head/sys/amd64/vmm/intel
Author: neel Date: Sat Feb 8 05:04:34 2014 New Revision: 261617 URL: http://svnweb.freebsd.org/changeset/base/261617 Log: Fix a bug in the handling of VM-exits caused by non-maskable interrupts (NMI). If a VM-exit is caused by an NMI then blocking by NMI is in effect on the CPU when the VM-exit is completed. No more NMIs will be recognized until the execution of an iret. Prior to this change the NMI handler was dispatched via a software interrupt with interrupts enabled. This meant that an interrupt could be recognized by the processor before the NMI handler completed its execution. The iret issued by the interrupt handler would then cause the blocking by NMI to be cleared prematurely. This is now fixed by handling the NMI with interrupts disabled in addition to blocking by NMI already established by the VM-exit. Modified: head/sys/amd64/vmm/intel/vmx.c Modified: head/sys/amd64/vmm/intel/vmx.c == --- head/sys/amd64/vmm/intel/vmx.c Sat Feb 8 04:29:36 2014 (r261616) +++ head/sys/amd64/vmm/intel/vmx.c Sat Feb 8 05:04:34 2014 (r261617) @@ -1719,19 +1719,10 @@ vmx_exit_process(struct vmx *vmx, int vc vmx_restore_nmi_blocking(vmx, vcpu); /* -* If the NMI-exiting VM execution control is set to '1' -* then an NMI in non-root operation causes a VM-exit. -* NMI blocking is in effect for this logical processor so -* it is sufficient to simply vector to the NMI handler via -* a software interrupt. +* The NMI has already been handled in vmx_exit_handle_nmi(). */ - if ((intr_info VMCS_INTR_T_MASK) == VMCS_INTR_T_NMI) { - KASSERT((intr_info 0xff) == IDT_NMI, (VM exit due - to NMI has invalid vector: %#x, intr_info)); - VCPU_CTR0(vmx-vm, vcpu, Vectoring to NMI handler); - __asm __volatile(int $2); + if ((intr_info VMCS_INTR_T_MASK) == VMCS_INTR_T_NMI) return (1); - } break; case EXIT_REASON_EPT_FAULT: vmm_stat_incr(vmx-vm, vcpu, VMEXIT_EPT_FAULT, 1); @@ -1874,6 +1865,36 @@ vmx_exit_inst_error(struct vmxctx *vmxct return (UNHANDLED); } +/* + * If the NMI-exiting VM execution control is set to '1' then an NMI in + * non-root operation causes a VM-exit. NMI blocking is in effect so it is + * sufficient to simply vector to the NMI handler via a software interrupt. + * However, this must be done before maskable interrupts are enabled + * otherwise the iret issued by an interrupt handler will incorrectly + * clear NMI blocking. + */ +static __inline void +vmx_exit_handle_nmi(struct vmx *vmx, int vcpuid, struct vm_exit *vmexit) +{ + uint32_t intr_info; + + KASSERT((read_rflags() PSL_I) == 0, (interrupts enabled)); + + if (vmexit-u.vmx.exit_reason != EXIT_REASON_EXCEPTION) + return; + + intr_info = vmcs_read(VMCS_EXIT_INTR_INFO); + KASSERT((intr_info VMCS_INTR_VALID) != 0, + (VM exit interruption info invalid: %#x, intr_info)); + + if ((intr_info VMCS_INTR_T_MASK) == VMCS_INTR_T_NMI) { + KASSERT((intr_info 0xff) == IDT_NMI, (VM exit due + to NMI has invalid vector: %#x, intr_info)); + VCPU_CTR0(vmx-vm, vcpuid, Vectoring to NMI handler); + __asm __volatile(int $2); + } +} + static int vmx_run(void *arg, int vcpu, register_t startrip, pmap_t pmap, void *rendezvous_cookie) @@ -1949,8 +1970,6 @@ vmx_run(void *arg, int vcpu, register_t vmx_run_trace(vmx, vcpu); rc = vmx_enter_guest(vmxctx, vmx, launched); - enable_intr(); - /* Collect some information for VM exit processing */ vmexit-rip = rip = vmcs_guest_rip(); vmexit-inst_length = vmexit_instruction_length(); @@ -1958,12 +1977,14 @@ vmx_run(void *arg, int vcpu, register_t vmexit-u.vmx.exit_qualification = vmcs_exit_qualification(); if (rc == VMX_GUEST_VMEXIT) { - launched = 1; + vmx_exit_handle_nmi(vmx, vcpu, vmexit); + enable_intr(); handled = vmx_exit_process(vmx, vcpu, vmexit); } else { + enable_intr(); handled = vmx_exit_inst_error(vmxctx, rc, vmexit); } - + launched = 1; vmx_exit_trace(vmx, vcpu, rip, exit_reason, handled); } while (handled); ___ svn-src-head@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any
svn commit: r261618 - head/sys/geom/eli
Author: delphij Date: Sat Feb 8 05:17:49 2014 New Revision: 261618 URL: http://svnweb.freebsd.org/changeset/base/261618 Log: In g_eli_crypto_hmac_init(), zero out after using the ipad buffer, k_ipad. Note that the two consumers in geli(4) are not affected by this issue because the way the code is constructed and as such, we believe there is no security impact with or without this change with geli(4)'s usage. Reported by: Serge van den Boom serge vdboom.org Reviewed by: pjd MFC after:2 weeks Modified: head/sys/geom/eli/g_eli_crypto.c Modified: head/sys/geom/eli/g_eli_crypto.c == --- head/sys/geom/eli/g_eli_crypto.cSat Feb 8 05:04:34 2014 (r261617) +++ head/sys/geom/eli/g_eli_crypto.cSat Feb 8 05:17:49 2014 (r261618) @@ -265,6 +265,7 @@ g_eli_crypto_hmac_init(struct hmac_ctx * /* Perform inner SHA512. */ SHA512_Init(ctx-shactx); SHA512_Update(ctx-shactx, k_ipad, sizeof(k_ipad)); + bzero(k_ipad, sizeof(k_ipad)); } 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: r261620 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Author: delphij Date: Sat Feb 8 05:35:36 2014 New Revision: 261620 URL: http://svnweb.freebsd.org/changeset/base/261620 Log: MFV r261619: 4574 get_clones_stat does not call zap_count in non-debug kernel zap_count(...) is never called in non-DEBUG kernel. As result count variable is always 0, and goto fail is always reached. This means get_clones_stat function never makes up list of clones for clones properties. MFC after:2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c == --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Sat Feb 8 05:30:33 2014(r261619) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Sat Feb 8 05:35:36 2014(r261620) @@ -20,9 +20,10 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Portions Copyright (c) 2011 Martin Matuska m...@freebsd.org * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. - * Portions Copyright (c) 2011 Martin Matuska m...@freebsd.org + * Copyright (c) 2014 RackTop Systems. */ #include sys/dmu_objset.h @@ -1424,7 +1425,7 @@ get_clones_stat(dsl_dataset_t *ds, nvlis * Only trust it if it has the right number of entries. */ if (ds-ds_phys-ds_next_clones_obj != 0) { - ASSERT0(zap_count(mos, ds-ds_phys-ds_next_clones_obj, + VERIFY0(zap_count(mos, ds-ds_phys-ds_next_clones_obj, count)); } if (count != ds-ds_phys-ds_num_children - 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: r261621 - in head/sys/amd64/vmm: . intel
Author: neel Date: Sat Feb 8 06:22:09 2014 New Revision: 261621 URL: http://svnweb.freebsd.org/changeset/base/261621 Log: Add a counter to differentiate between VM-exits due to nested paging faults and instruction emulation faults. Modified: head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm_stat.c head/sys/amd64/vmm/vmm_stat.h Modified: head/sys/amd64/vmm/intel/vmx.c == --- head/sys/amd64/vmm/intel/vmx.c Sat Feb 8 05:35:36 2014 (r261620) +++ head/sys/amd64/vmm/intel/vmx.c Sat Feb 8 06:22:09 2014 (r261621) @@ -1725,7 +1725,6 @@ vmx_exit_process(struct vmx *vmx, int vc return (1); break; case EXIT_REASON_EPT_FAULT: - vmm_stat_incr(vmx-vm, vcpu, VMEXIT_EPT_FAULT, 1); /* * If 'gpa' lies within the address space allocated to * memory then this must be a nested page fault otherwise @@ -1736,6 +1735,7 @@ vmx_exit_process(struct vmx *vmx, int vc vmexit-exitcode = VM_EXITCODE_PAGING; vmexit-u.paging.gpa = gpa; vmexit-u.paging.fault_type = ept_fault_type(qual); + vmm_stat_incr(vmx-vm, vcpu, VMEXIT_NESTED_FAULT, 1); } else if (ept_emulation_fault(qual)) { vmexit-exitcode = VM_EXITCODE_INST_EMUL; vmexit-u.inst_emul.gpa = gpa; @@ -1743,6 +1743,7 @@ vmx_exit_process(struct vmx *vmx, int vc vmexit-u.inst_emul.cr3 = vmcs_guest_cr3(); vmexit-u.inst_emul.cpu_mode = vmx_cpu_mode(); vmexit-u.inst_emul.paging_mode = vmx_paging_mode(); + vmm_stat_incr(vmx-vm, vcpu, VMEXIT_INST_EMUL, 1); } /* * If Virtual NMIs control is 1 and the VM-exit is due to an Modified: head/sys/amd64/vmm/vmm_stat.c == --- head/sys/amd64/vmm/vmm_stat.c Sat Feb 8 05:35:36 2014 (r261620) +++ head/sys/amd64/vmm/vmm_stat.c Sat Feb 8 06:22:09 2014 (r261621) @@ -146,7 +146,8 @@ VMM_STAT(VMEXIT_INTR_WINDOW, vm exits d VMM_STAT(VMEXIT_NMI_WINDOW, vm exits due to nmi window opening); VMM_STAT(VMEXIT_INOUT, number of times in/out was intercepted); VMM_STAT(VMEXIT_CPUID, number of times cpuid was intercepted); -VMM_STAT(VMEXIT_EPT_FAULT, vm exits due to nested page fault); +VMM_STAT(VMEXIT_NESTED_FAULT, vm exits due to nested page fault); +VMM_STAT(VMEXIT_INST_EMUL, vm exits for instruction emulation); VMM_STAT(VMEXIT_UNKNOWN, number of vm exits for unknown reason); VMM_STAT(VMEXIT_ASTPENDING, number of times astpending at exit); VMM_STAT(VMEXIT_USERSPACE, number of vm exits handled in userspace); Modified: head/sys/amd64/vmm/vmm_stat.h == --- head/sys/amd64/vmm/vmm_stat.h Sat Feb 8 05:35:36 2014 (r261620) +++ head/sys/amd64/vmm/vmm_stat.h Sat Feb 8 06:22:09 2014 (r261621) @@ -116,7 +116,8 @@ VMM_STAT_DECLARE(VMEXIT_INTR_WINDOW); VMM_STAT_DECLARE(VMEXIT_NMI_WINDOW); VMM_STAT_DECLARE(VMEXIT_INOUT); VMM_STAT_DECLARE(VMEXIT_CPUID); -VMM_STAT_DECLARE(VMEXIT_EPT_FAULT); +VMM_STAT_DECLARE(VMEXIT_NESTED_FAULT); +VMM_STAT_DECLARE(VMEXIT_INST_EMUL); VMM_STAT_DECLARE(VMEXIT_UNKNOWN); VMM_STAT_DECLARE(VMEXIT_ASTPENDING); VMM_STAT_DECLARE(VMEXIT_USERSPACE); ___ 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