svn commit: r281690 - head/usr.sbin/bluetooth/hccontrol
Author: takawata Date: Sat Apr 18 16:04:32 2015 New Revision: 281690 URL: https://svnweb.freebsd.org/changeset/base/281690 Log: Change printf formatting to unbroke i386 arch. Submitted by:da...@catwhisker.org Modified: head/usr.sbin/bluetooth/hccontrol/le.c Modified: head/usr.sbin/bluetooth/hccontrol/le.c == --- head/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 18 09:49:09 2015 (r281689) +++ head/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 18 16:04:32 2015 (r281690) @@ -232,7 +232,7 @@ le_read_local_supported_features(int s, NG_HCI_OCF_LE_READ_LOCAL_SUPPORTED_FEATURES), (void *)rp, n); - printf(LOCAL SUPPORTED: %d %d %lu\n, e, rp.status, + printf(LOCAL SUPPORTED: %d %d %jx\n, e, rp.status, rp.le_features); return 0; @@ -250,7 +250,7 @@ le_read_supported_status(int s, int argc NG_HCI_OCF_LE_READ_SUPPORTED_STATUS), (void *)rp, n); - printf(LE_STATUS: %d %d %lx\n, e, rp.status, rp.le_status); + printf(LE_STATUS: %d %d %jx\n, e, rp.status, rp.le_status); return 0; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281695 - head/sys/netipsec
Author: ae Date: Sat Apr 18 16:58:33 2015 New Revision: 281695 URL: https://svnweb.freebsd.org/changeset/base/281695 Log: Change ipsec_address() and ipsec_logsastr() functions to take two additional arguments - buffer and size of this buffer. ipsec_address() is used to convert sockaddr structure to presentation format. The IPv6 part of this function returns pointer to the on-stack buffer and at the moment when it will be used by caller, it becames invalid. IPv4 version uses 4 static buffers and returns pointer to new buffer each time when it called. But anyway it is still possible to get corrupted data when several threads will use this function. ipsec_logsastr() is used to format string about SA entry. It also uses static buffer and has the same problem with concurrent threads. To fix these problems add the buffer pointer and size of this buffer to arguments. Now each caller will pass buffer and its size to these functions. Also convert all places where these functions are used (except disabled code). And now ipsec_address() uses inet_ntop() function from libkern. PR: 185996 Differential Revision:https://reviews.freebsd.org/D2321 Reviewed by: gnn Sponsored by: Yandex LLC Modified: head/sys/netipsec/ipsec.c head/sys/netipsec/ipsec.h head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_output.c head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c head/sys/netipsec/xform_ipcomp.c Modified: head/sys/netipsec/ipsec.c == --- head/sys/netipsec/ipsec.c Sat Apr 18 16:51:24 2015(r281694) +++ head/sys/netipsec/ipsec.c Sat Apr 18 16:58:33 2015(r281695) @@ -1488,6 +1488,7 @@ ipsec_chkreplay(u_int32_t seq, struct se int ipsec_updatereplay(u_int32_t seq, struct secasvar *sav) { + char buf[128]; struct secreplay *replay; u_int32_t diff; int fr; @@ -1567,7 +1568,8 @@ ok: return (1); ipseclog((LOG_WARNING, %s: replay counter made %d cycle. %s\n, - __func__, replay-overflow, ipsec_logsastr(sav))); + __func__, replay-overflow, + ipsec_logsastr(sav, buf, sizeof(buf; } replay-count++; @@ -1598,67 +1600,37 @@ vshiftl(unsigned char *bitmap, int nbit, } } -#ifdef INET -/* Return a printable string for the IPv4 address. */ -static char * -inet_ntoa4(struct in_addr ina) -{ - static char buf[4][4 * sizeof 123 + 4]; - unsigned char *ucp = (unsigned char *) ina; - static int i = 3; - - /* XXX-BZ Returns static buffer. */ - i = (i + 1) % 4; - sprintf(buf[i], %d.%d.%d.%d, ucp[0] 0xff, ucp[1] 0xff, - ucp[2] 0xff, ucp[3] 0xff); - return (buf[i]); -} -#endif - /* Return a printable string for the address. */ -char * -ipsec_address(union sockaddr_union* sa) +char* +ipsec_address(union sockaddr_union* sa, char *buf, socklen_t size) { -#ifdef INET6 - char ip6buf[INET6_ADDRSTRLEN]; -#endif switch (sa-sa.sa_family) { #ifdef INET case AF_INET: - return (inet_ntoa4(sa-sin.sin_addr)); + return (inet_ntop(AF_INET, sa-sin.sin_addr, buf, size)); #endif /* INET */ #ifdef INET6 case AF_INET6: - return (ip6_sprintf(ip6buf, sa-sin6.sin6_addr)); + return (inet_ntop(AF_INET6, sa-sin6.sin6_addr, buf, size)); #endif /* INET6 */ default: return ((unknown address family)); } } -const char * -ipsec_logsastr(struct secasvar *sav) +char * +ipsec_logsastr(struct secasvar *sav, char *buf, size_t size) { - static char buf[256]; - char *p; - struct secasindex *saidx = sav-sah-saidx; - - IPSEC_ASSERT(saidx-src.sa.sa_family == saidx-dst.sa.sa_family, - (address family mismatch)); - - p = buf; - snprintf(buf, sizeof(buf), SA(SPI=%u , (u_int32_t)ntohl(sav-spi)); - while (p *p) - p++; - /* NB: only use ipsec_address on one address at a time. */ - snprintf(p, sizeof (buf) - (p - buf), src=%s , - ipsec_address(saidx-src)); - while (p *p) - p++; - snprintf(p, sizeof (buf) - (p - buf), dst=%s), - ipsec_address(saidx-dst)); + char sbuf[INET6_ADDRSTRLEN], dbuf[INET6_ADDRSTRLEN]; + + IPSEC_ASSERT(sav-sah-saidx.src.sa.sa_family == + sav-sah-saidx.dst.sa.sa_family, (address family mismatch)); + snprintf(buf, size, SA(SPI=%08lx src=%s dst=%s), + (u_long)ntohl(sav-spi), + ipsec_address(sav-sah-saidx.src, sbuf, sizeof(sbuf)), + ipsec_address(sav-sah-saidx.dst, dbuf, sizeof(dbuf))); return (buf); } Modified: head/sys/netipsec/ipsec.h == --- head/sys/netipsec/ipsec.h Sat
svn commit: r281692 - in head/sys: conf netipsec
Author: ae Date: Sat Apr 18 16:38:45 2015 New Revision: 281692 URL: https://svnweb.freebsd.org/changeset/base/281692 Log: Remove xform_ipip.c and code related to XF_IP4. The only thing is used from this code is ipip_output() function, that does IPIP encapsulation. Other parts of XF_IP4 code were removed in r275133. Also it isn't possible to configure the use of XF_IP4, nor from userland via setkey(8), nor from the kernel. Simplify the ipip_output() function and rename it to ipsec_encap(). * move IP_DF handling from ipsec4_process_packet() into ipsec_encap(); * since ipsec_encap() called from ipsec[64]_process_packet(), it is safe to assume that mbuf is contiguous at least to IP header for used IP version. Remove all unneeded m_pullup(), m_copydata and related checks. * use V_ip_defttl and V_ip6_defhlim for outer headers; * use V_ip4_ipsec_ecn and V_ip6_ipsec_ecn for outer headers; * move all diagnostic messages to the ipsec_encap() callers; * simplify handling of ipsec_encap() results: if it returns non zero value, print diagnostic message and free mbuf. * some style(9) fixes. Differential Revision:https://reviews.freebsd.org/D2303 Reviewed by: glebius Sponsored by: Yandex LLC Deleted: head/sys/netipsec/xform_ipip.c Modified: head/sys/conf/files head/sys/netipsec/ipsec_output.c head/sys/netipsec/xform.h Modified: head/sys/conf/files == --- head/sys/conf/files Sat Apr 18 16:08:06 2015(r281691) +++ head/sys/conf/files Sat Apr 18 16:38:45 2015(r281692) @@ -3565,7 +3565,6 @@ netipsec/keysock.coptional ipsec inet netipsec/xform_ah.coptional ipsec inet | ipsec inet6 netipsec/xform_esp.c optional ipsec inet | ipsec inet6 netipsec/xform_ipcomp.coptional ipsec inet | ipsec inet6 -netipsec/xform_ipip.c optional ipsec inet | ipsec inet6 netipsec/xform_tcp.c optional ipsec inet tcp_signature | \ ipsec inet6 tcp_signature netnatm/natm.c optional natm Modified: head/sys/netipsec/ipsec_output.c == --- head/sys/netipsec/ipsec_output.cSat Apr 18 16:08:06 2015 (r281691) +++ head/sys/netipsec/ipsec_output.cSat Apr 18 16:38:45 2015 (r281692) @@ -61,6 +61,7 @@ #include netinet/ip6.h #ifdef INET6 #include netinet6/ip6_var.h +#include netinet6/scope6_var.h #endif #include netinet/in_pcb.h #ifdef INET6 @@ -419,6 +420,101 @@ bad: #undef IPSEC_OSTAT } +static int +ipsec_encap(struct mbuf **mp, struct secasindex *saidx) +{ +#ifdef INET6 + struct ip6_hdr *ip6; +#endif + struct ip *ip; + int setdf; + uint8_t itos, proto; + + ip = mtod(*mp, struct ip *); + switch (ip-ip_v) { +#ifdef INET + case IPVERSION: + proto = IPPROTO_IPIP; + /* +* Collect IP_DF state from the inner header +* and honor system-wide control of how to handle it. +*/ + switch (V_ip4_ipsec_dfbit) { + case 0: /* clear in outer header */ + case 1: /* set in outer header */ + setdf = V_ip4_ipsec_dfbit; + break; + default:/* propagate to outer header */ + setdf = (ip-ip_off ntohs(IP_DF)) != 0; + } + itos = ip-ip_tos; + break; +#endif +#ifdef INET6 + case (IPV6_VERSION 4): + proto = IPPROTO_IPV6; + ip6 = mtod(*mp, struct ip6_hdr *); + itos = (ntohl(ip6-ip6_flow) 20) 0xff; + setdf = V_ip4_ipsec_dfbit ? 1: 0; + /* scoped address handling */ + in6_clearscope(ip6-ip6_src); + in6_clearscope(ip6-ip6_dst); + break; +#endif + default: + return (EAFNOSUPPORT); + } + switch (saidx-dst.sa.sa_family) { +#ifdef INET + case AF_INET: + if (saidx-src.sa.sa_family != AF_INET || + saidx-src.sin.sin_addr.s_addr == INADDR_ANY || + saidx-dst.sin.sin_addr.s_addr == INADDR_ANY) + return (EINVAL); + M_PREPEND(*mp, sizeof(struct ip), M_NOWAIT); + if (*mp == NULL) + return (ENOBUFS); + ip = mtod(*mp, struct ip *); + ip-ip_v = IPVERSION; + ip-ip_hl = sizeof(struct ip) 2; + ip-ip_p = proto; + ip-ip_len = htons((*mp)-m_pkthdr.len); + ip-ip_ttl = V_ip_defttl; + ip-ip_sum = 0; + ip-ip_off = setdf ? htons(IP_DF): 0; + ip-ip_src = saidx-src.sin.sin_addr; + ip-ip_dst = saidx-dst.sin.sin_addr; +
svn commit: r281693 - head/sys/netipsec
Author: ae Date: Sat Apr 18 16:46:31 2015 New Revision: 281693 URL: https://svnweb.freebsd.org/changeset/base/281693 Log: Fix handling of scoped IPv6 addresses in IPSec code. * in ipsec_encap() embed scope zone ids into link-local addresses in the new IPv6 header, this helps ip6_output() disambiguate the scope; * teach key_ismyaddr6() use in6_localip(). in6_localip() is less strict than key_sockaddrcmp(). It doesn't compare all fileds of struct sockaddr_in6, but it is faster and it should be safe, because all SA's data was checked for correctness. Also, since IPv6 link-local addresses in the V_in6_ifaddrhead are stored in kernel-internal form, we need to embed scope zone id from SA into the address before calling in6_localip. * in ipsec_common_input() take scope zone id embedded in the address and use it to initialize sin6_scope_id, then use this sockaddr structure to lookup SA, because we keep addresses in the SADB without embedded scope zone id. Differential Revision:https://reviews.freebsd.org/D2304 Reviewed by: gnn Sponsored by: Yandex LLC Modified: head/sys/netipsec/ipsec_input.c head/sys/netipsec/ipsec_output.c head/sys/netipsec/key.c Modified: head/sys/netipsec/ipsec_input.c == --- head/sys/netipsec/ipsec_input.c Sat Apr 18 16:38:45 2015 (r281692) +++ head/sys/netipsec/ipsec_input.c Sat Apr 18 16:46:31 2015 (r281693) @@ -195,6 +195,13 @@ ipsec_common_input(struct mbuf *m, int s m_copydata(m, offsetof(struct ip6_hdr, ip6_dst), sizeof(struct in6_addr), (caddr_t) dst_address.sin6.sin6_addr); + /* We keep addresses in SADB without embedded scope id */ + if (IN6_IS_SCOPE_LINKLOCAL(dst_address.sin6.sin6_addr)) { + /* XXX: sa6_recoverscope() */ + dst_address.sin6.sin6_scope_id = + ntohs(dst_address.sin6.sin6_addr.s6_addr16[1]); + dst_address.sin6.sin6_addr.s6_addr16[1] = 0; + } break; #endif /* INET6 */ default: Modified: head/sys/netipsec/ipsec_output.c == --- head/sys/netipsec/ipsec_output.cSat Apr 18 16:38:45 2015 (r281692) +++ head/sys/netipsec/ipsec_output.cSat Apr 18 16:46:31 2015 (r281693) @@ -503,7 +503,14 @@ ipsec_encap(struct mbuf **mp, struct sec ip6-ip6_hlim = V_ip6_defhlim; ip6-ip6_nxt = proto; ip6-ip6_dst = saidx-dst.sin6.sin6_addr; + /* For link-local address embed scope zone id */ + if (IN6_IS_SCOPE_LINKLOCAL(ip6-ip6_dst)) + ip6-ip6_dst.s6_addr16[1] = + htons(saidx-dst.sin6.sin6_scope_id 0x); ip6-ip6_src = saidx-src.sin6.sin6_addr; + if (IN6_IS_SCOPE_LINKLOCAL(ip6-ip6_src)) + ip6-ip6_src.s6_addr16[1] = + htons(saidx-src.sin6.sin6_scope_id 0x); ip6-ip6_plen = htons((*mp)-m_pkthdr.len - sizeof(*ip6)); ip_ecn_ingress(V_ip6_ipsec_ecn, proto, itos); ip6-ip6_flow |= htonl((uint32_t)proto 20); Modified: head/sys/netipsec/key.c == --- head/sys/netipsec/key.c Sat Apr 18 16:38:45 2015(r281692) +++ head/sys/netipsec/key.c Sat Apr 18 16:46:31 2015(r281693) @@ -3856,48 +3856,19 @@ key_ismyaddr(struct sockaddr *sa) * compare my own address for IPv6. * 1: ours * 0: other - * NOTE: derived ip6_input() in KAME. This is necessary to modify more. */ -#include netinet6/in6_var.h - static int key_ismyaddr6(struct sockaddr_in6 *sin6) { - struct in6_ifaddr *ia; -#if 0 - struct in6_multi *in6m; -#endif - - IN6_IFADDR_RLOCK(); - TAILQ_FOREACH(ia, V_in6_ifaddrhead, ia_link) { - if (key_sockaddrcmp((struct sockaddr *)sin6, - (struct sockaddr *)ia-ia_addr, 0) == 0) { - IN6_IFADDR_RUNLOCK(); - return 1; - } - -#if 0 - /* -* XXX Multicast -* XXX why do we care about multlicast here while we don't care -* about IPv4 multicast?? -* XXX scope -*/ - in6m = NULL; - IN6_LOOKUP_MULTI(sin6-sin6_addr, ia-ia_ifp, in6m); - if (in6m) { - IN6_IFADDR_RUNLOCK(); - return 1; - } -#endif - } - IN6_IFADDR_RUNLOCK(); + struct in6_addr in6; - /* loopback, just for safety */ - if (IN6_IS_ADDR_LOOPBACK(sin6-sin6_addr)) - return 1; +
svn commit: r281696 - head/sys/kern
Author: kib Date: Sat Apr 18 17:21:12 2015 New Revision: 281696 URL: https://svnweb.freebsd.org/changeset/base/281696 Log: Initialize td_sel in the thread_init(). Struct thread is not zeroed on the initial allocation, but seltdinit() assumes that td_sel is NULL or a valid pointer. Note that thread_fini()/seltdfini() also relies on this, but correctly resets td_sel to NULL. Submitted by: luke...@gmail.com PR: 199518 MFC after:1 week Modified: head/sys/kern/kern_thread.c Modified: head/sys/kern/kern_thread.c == --- head/sys/kern/kern_thread.c Sat Apr 18 16:58:33 2015(r281695) +++ head/sys/kern/kern_thread.c Sat Apr 18 17:21:12 2015(r281696) @@ -209,6 +209,7 @@ thread_init(void *mem, int size, int fla td-td_sched = (struct td_sched *)td[1]; umtx_thread_init(td); td-td_kstack = 0; + td-td_sel = NULL; return (0); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281698 - head/sys/dev/virtio/block
Author: mav Date: Sat Apr 18 19:37:37 2015 New Revision: 281698 URL: https://svnweb.freebsd.org/changeset/base/281698 Log: Do not report stripe size if it is equal to sector size. MFC after:1 week Modified: head/sys/dev/virtio/block/virtio_blk.c Modified: head/sys/dev/virtio/block/virtio_blk.c == --- head/sys/dev/virtio/block/virtio_blk.c Sat Apr 18 17:41:09 2015 (r281697) +++ head/sys/dev/virtio/block/virtio_blk.c Sat Apr 18 19:37:37 2015 (r281698) @@ -710,7 +710,8 @@ vtblk_alloc_disk(struct vtblk_softc *sc, dp-d_fwheads = blkcfg-geometry.heads; } - if (virtio_with_feature(dev, VIRTIO_BLK_F_TOPOLOGY)) { + if (virtio_with_feature(dev, VIRTIO_BLK_F_TOPOLOGY) + blkcfg-topology.physical_block_exp 0) { dp-d_stripesize = dp-d_sectorsize * (1 blkcfg-topology.physical_block_exp); dp-d_stripeoffset = (dp-d_stripesize - ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281691 - in head: . etc/defaults etc/rc.d sbin/mount sbin/mount_nfs share/man/man5 sys/nfsclient usr.bin/nfsstat usr.sbin/nfsd
Author: trasz Date: Sat Apr 18 16:08:06 2015 New Revision: 281691 URL: https://svnweb.freebsd.org/changeset/base/281691 Log: Remove some oldnfs remnants. Differential Revision:https://reviews.freebsd.org/D2287 Reviewed by: rmacklem@ Sponsored by: The FreeBSD Foundation Modified: head/ObsoleteFiles.inc head/etc/defaults/rc.conf head/etc/rc.d/mountd head/etc/rc.d/nfsd head/sbin/mount/mount.8 head/sbin/mount/mount.c head/sbin/mount_nfs/Makefile head/sbin/mount_nfs/mount_nfs.8 head/share/man/man5/rc.conf.5 head/sys/nfsclient/nfs.h head/usr.bin/nfsstat/nfsstat.c head/usr.sbin/nfsd/nfsd.8 Modified: head/ObsoleteFiles.inc == --- head/ObsoleteFiles.inc Sat Apr 18 16:04:32 2015(r281690) +++ head/ObsoleteFiles.inc Sat Apr 18 16:08:06 2015(r281691) @@ -38,6 +38,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20150418 +OLD_FILES+=sbin/mount_oldnfs +OLD_FILES+=usr/share/man/man8/mount_oldnfs.8.gz # 20150416: ALTQ moved to net/altq OLD_FILES+=usr/include/altq/altq_rmclass_debug.h OLD_FILES+=usr/include/altq/altq.h Modified: head/etc/defaults/rc.conf == --- head/etc/defaults/rc.conf Sat Apr 18 16:04:32 2015(r281690) +++ head/etc/defaults/rc.conf Sat Apr 18 16:08:06 2015(r281691) @@ -88,7 +88,7 @@ fsck_y_enable=NO# Set to YES to do fs fsck_y_flags=# Additional flags for fsck -y background_fsck=YES # Attempt to run fsck in the background where possible. background_fsck_delay=60 # Time to wait (seconds) before starting the fsck. -netfs_types=nfs:NFS oldnfs:OLDNFS smbfs:SMB # Net filesystems. +netfs_types=nfs:NFS smbfs:SMB # Net filesystems. extra_netfs_types=NO # List of network extra filesystem types for delayed # mount at startup (or NO). @@ -324,7 +324,6 @@ autounmountd_flags= # Flags to autoun nfs_client_enable=NO # This host is an NFS client (or NO). nfs_access_cache=60 # Client cache timeout in seconds nfs_server_enable=NO # This host is an NFS server (or NO). -oldnfs_server_enable=NO # Run the old NFS server (YES/NO). nfs_server_flags=-u -t # Flags to nfsd (if enabled). mountd_enable=NO # Run mountd (or NO). mountd_flags=-r # Flags to mountd (if NFS server enabled). Modified: head/etc/rc.d/mountd == --- head/etc/rc.d/mountdSat Apr 18 16:04:32 2015(r281690) +++ head/etc/rc.d/mountdSat Apr 18 16:08:06 2015(r281691) @@ -33,12 +33,6 @@ mountd_precmd() fi fi - # If oldnfs_server_enable is yes, force use of the old NFS server - # - if checkyesno oldnfs_server_enable; then - rc_flags=-o ${rc_flags} - fi - if checkyesno zfs_enable; then rc_flags=${rc_flags} /etc/exports /etc/zfs/exports fi Modified: head/etc/rc.d/nfsd == --- head/etc/rc.d/nfsd Sat Apr 18 16:04:32 2015(r281690) +++ head/etc/rc.d/nfsd Sat Apr 18 16:08:06 2015(r281691) @@ -19,40 +19,25 @@ sig_stop=USR1 nfsd_precmd() { - if checkyesno oldnfs_server_enable; then - rc_flags=-o ${nfs_server_flags} + rc_flags=${nfs_server_flags} - # Load the module now, so that the vfs.nfsrv sysctl - # oids are available. - load_kld nfsserver - - if checkyesno nfs_reserved_port_only; then - echo 'NFS on reserved port only=YES' - sysctl vfs.nfsrv.nfs_privport=1 /dev/null - else - sysctl vfs.nfsrv.nfs_privport=0 /dev/null - fi + # Load the modules now, so that the vfs.nfsd sysctl + # oids are available. + load_kld nfsd + + if checkyesno nfs_reserved_port_only; then + echo 'NFS on reserved port only=YES' + sysctl vfs.nfsd.nfs_privport=1 /dev/null else - rc_flags=${nfs_server_flags} + sysctl vfs.nfsd.nfs_privport=0 /dev/null + fi - # Load the modules now, so that the vfs.nfsd sysctl - # oids are available. - load_kld nfsd - - if checkyesno nfs_reserved_port_only; then - echo 'NFS on reserved port only=YES' - sysctl vfs.nfsd.nfs_privport=1 /dev/null - else - sysctl vfs.nfsd.nfs_privport=0 /dev/null - fi - - if checkyesno nfsv4_server_enable; then - sysctl vfs.nfsd.server_max_nfsvers=4 /dev/null - force_depend nfsuserd || err 1
svn commit: r281694 - head/sys/netipsec
Author: ae Date: Sat Apr 18 16:51:24 2015 New Revision: 281694 URL: https://svnweb.freebsd.org/changeset/base/281694 Log: Requeue mbuf via netisr when we use IPSec tunnel mode and IPv6. ipsec6_common_input_cb() uses partial copy of ip6_input() to parse headers. But this isn't correct, when we use tunnel mode IPSec. When we stripped outer IPv6 header from the decrypted packet, it can become IPv4 packet and should be handled by ip_input. Also when we use tunnel mode IPSec with IPv6 traffic, we should pass decrypted packet with inner IPv6 header to ip6_input, it will correctly handle it and also can decide to forward it. The skip variable points to offset where payload starts. In tunnel mode we reset it to zero after stripping the outer header. So, when it is zero, we should requeue mbuf via netisr. Differential Revision:https://reviews.freebsd.org/D2306 Reviewed by: adrian, gnn Sponsored by: Yandex LLC Modified: head/sys/netipsec/ipsec_input.c Modified: head/sys/netipsec/ipsec_input.c == --- head/sys/netipsec/ipsec_input.c Sat Apr 18 16:46:31 2015 (r281693) +++ head/sys/netipsec/ipsec_input.c Sat Apr 18 16:51:24 2015 (r281694) @@ -627,7 +627,7 @@ ipsec6_common_input_cb(struct mbuf *m, s struct m_tag *mtag; struct tdb_ident *tdbi; struct secasindex *saidx; - int nxt; + int nxt, isr_prot; u_int8_t nxt8; int error, nest; #ifdef notyet @@ -803,6 +803,35 @@ ipsec6_common_input_cb(struct mbuf *m, s if ((error = ipsec_filter(m, PFIL_IN, ENC_IN|ENC_AFTER)) != 0) return (error); #endif /* DEV_ENC */ + if (skip == 0) { + /* +* We stripped outer IPv6 header. +* Now we should requeue decrypted packet via netisr. +*/ + switch (prot) { +#ifdef INET + case IPPROTO_IPIP: + isr_prot = NETISR_IP; + break; +#endif + case IPPROTO_IPV6: + isr_prot = NETISR_IPV6; + break; + default: + DPRINTF((%s: cannot handle inner ip proto %d\n, + __func__, prot)); + IPSEC_ISTAT(sproto, nopf); + error = EPFNOSUPPORT; + goto bad; + } + error = netisr_queue_src(isr_prot, (uintptr_t)sav-spi, m); + if (error) { + IPSEC_ISTAT(sproto, qfull); + DPRINTF((%s: queue full; proto %u packet dropped\n, + __func__, sproto)); + } + return (error); + } /* * See the end of ip6_input for this logic. * IPPROTO_IPV[46] case will be processed just like other ones ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281697 - head/usr.sbin/bluetooth/hccontrol
Author: takawata Date: Sat Apr 18 17:41:09 2015 New Revision: 281697 URL: https://svnweb.freebsd.org/changeset/base/281697 Log: To ensure j formatting string valid, cast uint64_t values to uintmax_t. Modified: head/usr.sbin/bluetooth/hccontrol/le.c Modified: head/usr.sbin/bluetooth/hccontrol/le.c == --- head/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 18 17:21:12 2015 (r281696) +++ head/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 18 17:41:09 2015 (r281697) @@ -43,6 +43,7 @@ #include stdlib.h #include string.h #include unistd.h +#include stdint.h #define L2CAP_SOCKET_CHECKED #include bluetooth.h #include hccontrol.h @@ -233,7 +234,7 @@ le_read_local_supported_features(int s, (void *)rp, n); printf(LOCAL SUPPORTED: %d %d %jx\n, e, rp.status, - rp.le_features); + (uintmax_t) rp.le_features); return 0; } @@ -250,7 +251,7 @@ le_read_supported_status(int s, int argc NG_HCI_OCF_LE_READ_SUPPORTED_STATUS), (void *)rp, n); - printf(LE_STATUS: %d %d %jx\n, e, rp.status, rp.le_status); + printf(LE_STATUS: %d %d %jx\n, e, rp.status, (uintmax_t)rp.le_status); return 0; } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281701 - head/share/man/man9
Author: markj Date: Sat Apr 18 20:31:59 2015 New Revision: 281701 URL: https://svnweb.freebsd.org/changeset/base/281701 Log: SDT(9): add a section on SDT providers, mentioning the sdt provider. Add examples demonstrating how one can list available providers and the DTrace probes provided by a provider. Differential Revision:https://reviews.freebsd.org/D2166 Reviewed by: rpaulo MFC after:2 weeks Modified: head/share/man/man9/SDT.9 Modified: head/share/man/man9/SDT.9 == --- head/share/man/man9/SDT.9 Sat Apr 18 20:10:19 2015(r281700) +++ head/share/man/man9/SDT.9 Sat Apr 18 20:31:59 2015(r281701) @@ -24,7 +24,7 @@ .\ .\ $FreeBSD$ .\ -.Dd March 8, 2015 +.Dd April 18, 2015 .Dt SDT 9 .Os .Sh NAME @@ -194,7 +194,37 @@ macros are used to create trace points. They are meant to be added to executable code and can be used to instrument the code in which they are called. +.Sh PROVIDERS +A number of kernel DTrace providers are available. +In general, these providers define stable interfaces and should be treated as +such: existing D scripts may be broken if a probe is renamed or its arguments +are modified. +However, it is often useful to define ad-hoc +.Nm +probes for debugging a subsystem or driver. +Similarly, a developer may wish to provide a group of +.Nm +probes without committing to their future stability. +Such probes should be added to the +.Ql sdt +provider instead of defining a new provider. .Sh EXAMPLES +The DTrace providers available on the current system can be listed with +.Bd -literal -offset indent +dtrace -l | sed 1d | awk '{print $2}' | sort -u +.Ed +.Pp +A detailed list of the probes offered by a given provider can be obtained by +specifying the provider using the +.Fl P +flag. +For example, to view the probes and argument types for the +.Ql sched +provider, run +.Bd -literal -offset indent +dtrace -lv -P sched +.Ed +.Pp The following probe definition will create a DTrace probe called .Ql icmp:::receive-unreachable , which would hypothetically be triggered when the kernel receives an ICMP packet ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281702 - head/sys/kern
Author: markj Date: Sat Apr 18 20:36:58 2015 New Revision: 281702 URL: https://svnweb.freebsd.org/changeset/base/281702 Log: Remove unimplemented sched provider probes. They were added for compatibility with the sched provider in Solaris and illumos, but our sched provider is already incompatible since it uses native types, so there isn't much point in keeping them around. Differential Revision:https://reviews.freebsd.org/D2167 Reviewed by: rpaulo Modified: head/sys/kern/kern_synch.c Modified: head/sys/kern/kern_synch.c == --- head/sys/kern/kern_synch.c Sat Apr 18 20:31:59 2015(r281701) +++ head/sys/kern/kern_synch.c Sat Apr 18 20:36:58 2015(r281702) @@ -108,17 +108,6 @@ static voidloadav(void *arg); SDT_PROVIDER_DECLARE(sched); SDT_PROBE_DEFINE(sched, , , preempt); -/* - * These probes reference Solaris features that are not implemented in FreeBSD. - * Create the probes anyway for compatibility with existing D scripts; they'll - * just never fire. - */ -SDT_PROBE_DEFINE(sched, , , cpucaps__sleep); -SDT_PROBE_DEFINE(sched, , , cpucaps__wakeup); -SDT_PROBE_DEFINE(sched, , , schedctl__nopreempt); -SDT_PROBE_DEFINE(sched, , , schedctl__preempt); -SDT_PROBE_DEFINE(sched, , , schedctl__yield); - static void sleepinit(void *unused) { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281703 - head/sys/conf
Author: kib Date: Sat Apr 18 20:55:33 2015 New Revision: 281703 URL: https://svnweb.freebsd.org/changeset/base/281703 Log: Complete r281670, unlist removed files. Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Sat Apr 18 20:36:58 2015(r281702) +++ head/sys/conf/files Sat Apr 18 20:55:33 2015(r281703) @@ -2933,8 +2933,6 @@ fs/ext2fs/ext2_bmap.c optional ext2fs fs/ext2fs/ext2_extents.c optional ext2fs fs/ext2fs/ext2_inode.c optional ext2fs fs/ext2fs/ext2_inode_cnv.c optional ext2fs -fs/ext2fs/ext2_hash.c optional ext2fs -fs/ext2fs/ext2_htree.c optional ext2fs fs/ext2fs/ext2_lookup.coptional ext2fs fs/ext2fs/ext2_subr.c optional ext2fs fs/ext2fs/ext2_vfsops.coptional ext2fs ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281704 - head/sys/dev/atkbdc
Author: rpaulo Date: Sat Apr 18 20:55:55 2015 New Revision: 281704 URL: https://svnweb.freebsd.org/changeset/base/281704 Log: Synaptics: don't report the middle button when clickPad is used. On trackpads that had support for both, we were sending two button events when the trackpad was pressed. Tested by:Jakob Alvermark jakob at alvermark.net MFC after:1 week Modified: head/sys/dev/atkbdc/psm.c Modified: head/sys/dev/atkbdc/psm.c == --- head/sys/dev/atkbdc/psm.c Sat Apr 18 20:55:33 2015(r281703) +++ head/sys/dev/atkbdc/psm.c Sat Apr 18 20:55:55 2015(r281704) @@ -2756,7 +2756,8 @@ proc_synaptics(struct psm_softc *sc, pac touchpad_buttons |= MOUSE_BUTTON4DOWN; if ((pb-ipacket[3] ^ pb-ipacket[0]) 0x02) touchpad_buttons |= MOUSE_BUTTON5DOWN; - } else if (sc-synhw.capExtended sc-synhw.capMiddle) { + } else if (sc-synhw.capExtended sc-synhw.capMiddle + !sc-synhw.capClickPad) { /* Middle Button */ if ((pb-ipacket[0] ^ pb-ipacket[3]) 0x01) touchpad_buttons |= MOUSE_BUTTON2DOWN; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r281703 - head/sys/conf
Oops .. thanks! Pedro. On 04/18/15 15:55, Konstantin Belousov wrote: Author: kib Date: Sat Apr 18 20:55:33 2015 New Revision: 281703 URL: https://svnweb.freebsd.org/changeset/base/281703 Log: Complete r281670, unlist removed files. Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files Modified: head/sys/conf/files == --- head/sys/conf/files Sat Apr 18 20:36:58 2015(r281702) +++ head/sys/conf/files Sat Apr 18 20:55:33 2015(r281703) @@ -2933,8 +2933,6 @@ fs/ext2fs/ext2_bmap.c optional ext2fs fs/ext2fs/ext2_extents.c optional ext2fs fs/ext2fs/ext2_inode.coptional ext2fs fs/ext2fs/ext2_inode_cnv.coptional ext2fs -fs/ext2fs/ext2_hash.c optional ext2fs -fs/ext2fs/ext2_htree.c optional ext2fs fs/ext2fs/ext2_lookup.c optional ext2fs fs/ext2fs/ext2_subr.c optional ext2fs fs/ext2fs/ext2_vfsops.c optional ext2fs ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281707 - in head/sys: amd64/amd64 i386/i386 i386/include i386/xen x86/include x86/xen
Author: kib Date: Sat Apr 18 21:23:16 2015 New Revision: 281707 URL: https://svnweb.freebsd.org/changeset/base/281707 Log: Remove lazy pmap switch code from i386. Naive benchmark with md(4) shows no difference with the code removed. On both amd64 and i386, assert that a released pmap is not active. Proposed and reviewed by: alc Discussed with: Svatopluk Kraus onw...@gmail.com, peter Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/apic_vector.s head/sys/i386/i386/db_trace.c head/sys/i386/i386/mp_machdep.c head/sys/i386/i386/pmap.c head/sys/i386/i386/swtch.s head/sys/i386/include/smp.h head/sys/i386/xen/mp_machdep.c head/sys/i386/xen/pmap.c head/sys/x86/include/acpica_machdep.h head/sys/x86/xen/xen_apic.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Sat Apr 18 21:22:26 2015(r281706) +++ head/sys/amd64/amd64/pmap.c Sat Apr 18 21:23:16 2015(r281707) @@ -2532,6 +2532,8 @@ pmap_release(pmap_t pmap) pmap-pm_stats.resident_count)); KASSERT(vm_radix_is_empty(pmap-pm_root), (pmap_release: pmap has reserved page table page(s))); + KASSERT(CPU_EMPTY(pmap-pm_active), + (releasing active pmap %p, pmap)); if (pmap_pcid_enabled) { /* Modified: head/sys/i386/i386/apic_vector.s == --- head/sys/i386/i386/apic_vector.sSat Apr 18 21:22:26 2015 (r281706) +++ head/sys/i386/i386/apic_vector.sSat Apr 18 21:23:16 2015 (r281707) @@ -320,19 +320,4 @@ IDTVEC(rendezvous) POP_FRAME iret -/* - * Clean up when we lose out on the lazy context switch optimization. - * ie: when we are about to release a PTD but a cpu is still borrowing it. - */ - SUPERALIGN_TEXT -IDTVEC(lazypmap) - PUSH_FRAME - SET_KERNEL_SREGS - cld - - callpmap_lazyfix_action - - callas_lapic_eoi - POP_FRAME - iret #endif /* SMP */ Modified: head/sys/i386/i386/db_trace.c == --- head/sys/i386/i386/db_trace.c Sat Apr 18 21:22:26 2015 (r281706) +++ head/sys/i386/i386/db_trace.c Sat Apr 18 21:23:16 2015 (r281707) @@ -316,8 +316,7 @@ db_nextframe(struct i386_frame **fp, db_ frame_type = TRAP_TIMERINT; else if (strcmp(name, Xcpustop) == 0 || strcmp(name, Xrendezvous) == 0 || - strcmp(name, Xipi_intr_bitmap_handler) == 0 || - strcmp(name, Xlazypmap) == 0) + strcmp(name, Xipi_intr_bitmap_handler) == 0) frame_type = TRAP_INTERRUPT; } Modified: head/sys/i386/i386/mp_machdep.c == --- head/sys/i386/i386/mp_machdep.c Sat Apr 18 21:22:26 2015 (r281706) +++ head/sys/i386/i386/mp_machdep.c Sat Apr 18 21:23:16 2015 (r281707) @@ -163,7 +163,6 @@ u_long *ipi_invlrng_counts[MAXCPU]; u_long *ipi_invlpg_counts[MAXCPU]; u_long *ipi_invlcache_counts[MAXCPU]; u_long *ipi_rendezvous_counts[MAXCPU]; -u_long *ipi_lazypmap_counts[MAXCPU]; static u_long *ipi_hardclock_counts[MAXCPU]; #endif @@ -576,10 +575,6 @@ cpu_mp_start(void) setidt(IPI_INVLCACHE, IDTVEC(invlcache), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - /* Install an inter-CPU IPI for lazy pmap release */ - setidt(IPI_LAZYPMAP, IDTVEC(lazypmap), - SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - /* Install an inter-CPU IPI for all-CPU rendezvous */ setidt(IPI_RENDEZVOUS, IDTVEC(rendezvous), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); @@ -1672,8 +1667,6 @@ mp_ipi_intrcnt(void *dummy) intrcnt_add(buf, ipi_ast_counts[i]); snprintf(buf, sizeof(buf), cpu%d:rendezvous, i); intrcnt_add(buf, ipi_rendezvous_counts[i]); - snprintf(buf, sizeof(buf), cpu%d:lazypmap, i); - intrcnt_add(buf, ipi_lazypmap_counts[i]); snprintf(buf, sizeof(buf), cpu%d:hardclock, i); intrcnt_add(buf, ipi_hardclock_counts[i]); } Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Sat Apr 18 21:22:26 2015(r281706) +++ head/sys/i386/i386/pmap.c Sat Apr 18 21:23:16 2015(r281707) @@ -1248,18 +1248,14 @@ pmap_invalidate_cache_pages(vm_page_t *p } /* - * Are we current address space or kernel? N.B. We return FALSE when - * a pmap's page table is in use because a kernel thread is borrowing - *
svn commit: r281706 - stable/10/sys/dev/netmap
Author: rpaulo Date: Sat Apr 18 21:22:26 2015 New Revision: 281706 URL: https://svnweb.freebsd.org/changeset/base/281706 Log: MFC r281406: netmap: improve the netmap attach message on FreeBSD. Modified: stable/10/sys/dev/netmap/netmap.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/netmap/netmap.c == --- stable/10/sys/dev/netmap/netmap.c Sat Apr 18 21:00:36 2015 (r281705) +++ stable/10/sys/dev/netmap/netmap.c Sat Apr 18 21:22:26 2015 (r281706) @@ -2710,11 +2710,17 @@ netmap_attach(struct netmap_adapter *arg } #endif /* linux */ +#ifdef __FreeBSD__ + if_printf(ifp, netmap queues/slots: TX %d/%d, RX %d/%d\n, + hwna-up.num_tx_rings, hwna-up.num_tx_desc, + hwna-up.num_rx_rings, hwna-up.num_rx_desc); +#else D(success for %s tx %d/%d rx %d/%d queues/slots, hwna-up.name, hwna-up.num_tx_rings, hwna-up.num_tx_desc, hwna-up.num_rx_rings, hwna-up.num_rx_desc ); +#endif return 0; fail: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281709 - stable/10/sys/dev/atkbdc
Author: rpaulo Date: Sat Apr 18 21:26:47 2015 New Revision: 281709 URL: https://svnweb.freebsd.org/changeset/base/281709 Log: MFC r281441: Add support for controlling the trackpoint when Synaptics is enabled. Modified: stable/10/sys/dev/atkbdc/psm.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/atkbdc/psm.c == --- stable/10/sys/dev/atkbdc/psm.c Sat Apr 18 21:24:46 2015 (r281708) +++ stable/10/sys/dev/atkbdc/psm.c Sat Apr 18 21:26:47 2015 (r281709) @@ -191,7 +191,8 @@ enum { SYNAPTICS_SYSCTL_VSCROLL_VER_AREA, SYNAPTICS_SYSCTL_VSCROLL_MIN_DELTA, SYNAPTICS_SYSCTL_VSCROLL_DIV_MIN, - SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX + SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX, + SYNAPTICS_SYSCTL_TOUCHPAD_OFF }; typedef struct synapticsinfo { @@ -229,6 +230,7 @@ typedef struct synapticsinfo { int vscroll_min_delta; int vscroll_div_min; int vscroll_div_max; + int touchpad_off; } synapticsinfo_t; typedef struct synapticspacket { @@ -474,6 +476,10 @@ static probefunc_t enable_synaptics; static probefunc_t enable_trackpoint; static probefunc_t enable_versapad; +static void set_trackpoint_parameters(struct psm_softc *sc); +static void synaptics_passthrough_on(struct psm_softc *sc); +static void synaptics_passthrough_off(struct psm_softc *sc); + static struct { int model; u_char syncmask; @@ -881,6 +887,13 @@ doinitialize(struct psm_softc *sc, mouse set_mouse_resolution(kbdc, mode-resolution); set_mouse_scaling(kbdc, 1); set_mouse_mode(kbdc); + + /* +* Trackpoint settings are lost on resume. +* Restore them here. +*/ + if (sc-tphw 0) + set_trackpoint_parameters(sc); } /* Record sync on the next data packet we see. */ @@ -2715,6 +2728,12 @@ proc_synaptics(struct psm_softc *sc, pac goto SYNAPTICS_END; } + if (sc-syninfo.touchpad_off) { + *x = *y = *z = 0; + ms-button = ms-obutton; + goto SYNAPTICS_END; + } + /* Button presses */ touchpad_buttons = 0; if (pb-ipacket[0] 0x01) @@ -4121,6 +4140,10 @@ synaptics_sysctl(SYSCTL_HANDLER_ARGS) if (arg -6143 || arg 6143) return (EINVAL); break; +case SYNAPTICS_SYSCTL_TOUCHPAD_OFF: + if (arg 0 || arg 1) + return (EINVAL); + break; default: return (EINVAL); } @@ -4448,6 +4471,15 @@ synaptics_sysctl_create_tree(struct psm_ sc-syninfo.vscroll_div_max, SYNAPTICS_SYSCTL_VSCROLL_DIV_MAX, synaptics_sysctl, I, Divisor for slow scrolling); + + /* hw.psm.synaptics.touchpad_off. */ + sc-syninfo.touchpad_off = 0; + SYSCTL_ADD_PROC(sc-syninfo.sysctl_ctx, + SYSCTL_CHILDREN(sc-syninfo.sysctl_tree), OID_AUTO, + touchpad_off, CTLTYPE_INT|CTLFLAG_RW|CTLFLAG_ANYBODY, + sc-syninfo.touchpad_off, SYNAPTICS_SYSCTL_TOUCHPAD_OFF, + synaptics_sysctl, I, + Turn off touchpad); } static int @@ -4671,25 +4703,75 @@ enable_synaptics(KBDC kbdc, struct psm_s VLOG(3, (LOG_DEBUG, synaptics: END init (%d buttons)\n, buttons)); if (sc != NULL) { + if (trackpoint_support synhw.capPassthrough) { + synaptics_passthrough_on(sc); + enable_trackpoint(kbdc, sc); + synaptics_passthrough_off(sc); + } /* Create sysctl tree. */ synaptics_sysctl_create_tree(sc); - sc-hw.buttons = buttons; } return (TRUE); } +static void +synaptics_passthrough_on(struct psm_softc *sc) +{ + int mode_byte; + + mode_byte = 0xc1 | (1 5); + VLOG(2, (LOG_NOTICE, psm: setting pass-through mode. %d\n, + mode_byte)); + mouse_ext_command(sc-kbdc, mode_byte); + + /* Commit the Set Mode Byte command sent above. */ + set_mouse_sampling_rate(sc-kbdc, 20); +} + +static void +synaptics_passthrough_off(struct psm_softc *sc) +{ + int mode_byte; + + mode_byte = 0xc1; + VLOG(2, (LOG_NOTICE, psm: turning pass-through mode off.\n)); + set_mouse_scaling(sc-kbdc, 2); + set_mouse_scaling(sc-kbdc, 1); + mouse_ext_command(sc-kbdc, mode_byte); + + /* Commit the Set Mode Byte command sent above. */ + set_mouse_sampling_rate(sc-kbdc, 20); +} + /* IBM/Lenovo TrackPoint */ static int -trackpoint_command(KBDC kbdc, int cmd, int loc, int val)
svn commit: r281710 - head/sys/x86/include
Author: kib Date: Sat Apr 18 21:27:28 2015 New Revision: 281710 URL: https://svnweb.freebsd.org/changeset/base/281710 Log: Revert unrelated chunk from the r281707. MFC after:2 weeks Modified: head/sys/x86/include/acpica_machdep.h Modified: head/sys/x86/include/acpica_machdep.h == --- head/sys/x86/include/acpica_machdep.h Sat Apr 18 21:26:47 2015 (r281709) +++ head/sys/x86/include/acpica_machdep.h Sat Apr 18 21:27:28 2015 (r281710) @@ -74,7 +74,6 @@ enum intr_polarity; void acpi_SetDefaultIntrModel(int model); void acpi_cpu_c1(void); -void acpi_cpu_idle_mwait(uint32_t mwait_hint); void *acpi_map_table(vm_paddr_t pa, const char *sig); void acpi_unmap_table(void *table); vm_paddr_t acpi_find_table(const char *sig); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281711 - stable/10/lib/libc/gen
Author: jilles Date: Sat Apr 18 21:31:36 2015 New Revision: 281711 URL: https://svnweb.freebsd.org/changeset/base/281711 Log: MFC r260571: fts: Stat things relative to the directory fd, if possible. As a result, the kernel needs to process shorter pathnames if fts is not changing directories (if fts follows symlinks (-L option to utilities), fts cannot open . or FTS_NOCHDIR was specified). Side effect: If pathnames exceed PATH_MAX, [ENAMETOOLONG] is not hit at the stat stage but later (opendir or application fts_accpath) or not at all. Modified: stable/10/lib/libc/gen/fts.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/gen/fts.c == --- stable/10/lib/libc/gen/fts.cSat Apr 18 21:27:28 2015 (r281710) +++ stable/10/lib/libc/gen/fts.cSat Apr 18 21:31:36 2015 (r281711) @@ -62,7 +62,7 @@ static size_t fts_maxarglen(char * cons static void fts_padjust(FTS *, FTSENT *); static int fts_palloc(FTS *, size_t); static FTSENT *fts_sort(FTS *, FTSENT *, size_t); -static int fts_stat(FTS *, FTSENT *, int); +static int fts_stat(FTS *, FTSENT *, int, int); static int fts_safe_changedir(FTS *, FTSENT *, int, char *); static int fts_ufslinks(FTS *, const FTSENT *); @@ -167,7 +167,7 @@ fts_open(argv, options, compar) p-fts_level = FTS_ROOTLEVEL; p-fts_parent = parent; p-fts_accpath = p-fts_name; - p-fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW)); + p-fts_info = fts_stat(sp, p, ISSET(FTS_COMFOLLOW), -1); /* Command-line . and .. are real directories. */ if (p-fts_info == FTS_DOT) @@ -322,7 +322,7 @@ fts_read(FTS *sp) /* Any type of file may be re-visited; re-stat and re-turn. */ if (instr == FTS_AGAIN) { - p-fts_info = fts_stat(sp, p, 0); + p-fts_info = fts_stat(sp, p, 0, -1); return (p); } @@ -334,7 +334,7 @@ fts_read(FTS *sp) */ if (instr == FTS_FOLLOW (p-fts_info == FTS_SL || p-fts_info == FTS_SLNONE)) { - p-fts_info = fts_stat(sp, p, 1); + p-fts_info = fts_stat(sp, p, 1, -1); if (p-fts_info == FTS_D !ISSET(FTS_NOCHDIR)) { if ((p-fts_symfd = _open(., O_RDONLY | O_CLOEXEC, 0)) 0) { @@ -426,7 +426,7 @@ next: tmp = p; goto next; } if (p-fts_instr == FTS_FOLLOW) { - p-fts_info = fts_stat(sp, p, 1); + p-fts_info = fts_stat(sp, p, 1, -1); if (p-fts_info == FTS_D !ISSET(FTS_NOCHDIR)) { if ((p-fts_symfd = _open(., O_RDONLY | O_CLOEXEC, 0)) 0) { @@ -800,10 +800,11 @@ mem1: saved_errno = errno; if (ISSET(FTS_NOCHDIR)) { p-fts_accpath = p-fts_path; memmove(cp, p-fts_name, p-fts_namelen + 1); - } else + p-fts_info = fts_stat(sp, p, 0, _dirfd(dirp)); + } else { p-fts_accpath = p-fts_name; - /* Stat it. */ - p-fts_info = fts_stat(sp, p, 0); + p-fts_info = fts_stat(sp, p, 0, -1); + } /* Decrement link count if applicable. */ if (nlinks 0 (p-fts_info == FTS_D || @@ -868,13 +869,19 @@ mem1: saved_errno = errno; } static int -fts_stat(FTS *sp, FTSENT *p, int follow) +fts_stat(FTS *sp, FTSENT *p, int follow, int dfd) { FTSENT *t; dev_t dev; ino_t ino; struct stat *sbp, sb; int saved_errno; + const char *path; + + if (dfd == -1) + path = p-fts_accpath, dfd = AT_FDCWD; + else + path = p-fts_name; /* If user needs stat info, stat buffer already allocated. */ sbp = ISSET(FTS_NOSTAT) ? sb : p-fts_statp; @@ -896,16 +903,16 @@ fts_stat(FTS *sp, FTSENT *p, int follow) * fail, set the errno from the stat call. */ if (ISSET(FTS_LOGICAL) || follow) { - if (stat(p-fts_accpath, sbp)) { + if (fstatat(dfd, path, sbp, 0)) { saved_errno = errno; - if (!lstat(p-fts_accpath, sbp)) { + if (!fstatat(dfd, path, sbp, AT_SYMLINK_NOFOLLOW)) { errno = 0; return (FTS_SLNONE); } p-fts_errno = saved_errno; goto err;
svn commit: r281713 - in head: lib/libpmc sys/conf sys/dev/hwpmc sys/modules/hwpmc sys/powerpc/booke sys/powerpc/include
Author: jhibbits Date: Sat Apr 18 21:39:17 2015 New Revision: 281713 URL: https://svnweb.freebsd.org/changeset/base/281713 Log: Implement hwpmc(4) for Freescale e500 core. This supports e500v1, e500v2, and e500mc. Tested only on e500v2, but the performance counters are identical across all, with e500mc having some additional events. Relnotes: Yes Added: head/sys/dev/hwpmc/hwpmc_e500.c (contents, props changed) Modified: head/lib/libpmc/libpmc.c head/sys/conf/files.powerpc head/sys/dev/hwpmc/hwpmc_mpc7xxx.c head/sys/dev/hwpmc/hwpmc_powerpc.c head/sys/dev/hwpmc/hwpmc_powerpc.h head/sys/dev/hwpmc/hwpmc_ppc970.c head/sys/dev/hwpmc/pmc_events.h head/sys/modules/hwpmc/Makefile head/sys/powerpc/booke/interrupt.c head/sys/powerpc/booke/locore.S head/sys/powerpc/booke/machdep.c head/sys/powerpc/booke/trap_subr.S head/sys/powerpc/include/pmc_mdep.h Modified: head/lib/libpmc/libpmc.c == --- head/lib/libpmc/libpmc.cSat Apr 18 21:35:41 2015(r281712) +++ head/lib/libpmc/libpmc.cSat Apr 18 21:39:17 2015(r281713) @@ -164,6 +164,7 @@ PMC_CLASSDEP_TABLE(octeon, OCTEON); PMC_CLASSDEP_TABLE(ucf, UCF); PMC_CLASSDEP_TABLE(ppc7450, PPC7450); PMC_CLASSDEP_TABLE(ppc970, PPC970); +PMC_CLASSDEP_TABLE(e500, E500); static struct pmc_event_descr soft_event_table[PMC_EV_DYN_COUNT]; @@ -296,8 +297,9 @@ PMC_MDEP_TABLE(armv7, ARMV7, PMC_CLASS_S PMC_MDEP_TABLE(mips24k, MIPS24K, PMC_CLASS_SOFT, PMC_CLASS_MIPS24K); PMC_MDEP_TABLE(mips74k, MIPS74K, PMC_CLASS_SOFT, PMC_CLASS_MIPS74K); PMC_MDEP_TABLE(octeon, OCTEON, PMC_CLASS_SOFT, PMC_CLASS_OCTEON); -PMC_MDEP_TABLE(ppc7450, PPC7450, PMC_CLASS_SOFT, PMC_CLASS_PPC7450); -PMC_MDEP_TABLE(ppc970, PPC970, PMC_CLASS_SOFT, PMC_CLASS_PPC970); +PMC_MDEP_TABLE(ppc7450, PPC7450, PMC_CLASS_SOFT, PMC_CLASS_PPC7450, PMC_CLASS_TSC); +PMC_MDEP_TABLE(ppc970, PPC970, PMC_CLASS_SOFT, PMC_CLASS_PPC970, PMC_CLASS_TSC); +PMC_MDEP_TABLE(e500, E500, PMC_CLASS_SOFT, PMC_CLASS_E500, PMC_CLASS_TSC); PMC_MDEP_TABLE(generic, SOFT, PMC_CLASS_SOFT); static const struct pmc_event_descr tsc_event_table[] = @@ -368,6 +370,7 @@ PMC_CLASS_TABLE_DESC(octeon, OCTEON, oct #if defined(__powerpc__) PMC_CLASS_TABLE_DESC(ppc7450, PPC7450, ppc7450, powerpc); PMC_CLASS_TABLE_DESC(ppc970, PPC970, ppc970, powerpc); +PMC_CLASS_TABLE_DESC(e500, E500, e500, powerpc); #endif static struct pmc_class_descr soft_class_table_descr = @@ -2494,6 +2497,12 @@ static struct pmc_event_alias ppc970_ali EV_ALIAS(NULL, NULL) }; +static struct pmc_event_alias e500_aliases[] = { + EV_ALIAS(instructions, INSTR_COMPLETED), + EV_ALIAS(cycles, CYCLES), + EV_ALIAS(NULL, NULL) +}; + #definePOWERPC_KW_OS os #definePOWERPC_KW_USR usr #definePOWERPC_KW_ANYTHREADanythread @@ -2949,6 +2958,10 @@ pmc_event_names_of_class(enum pmc_class ev = ppc970_event_table; count = PMC_EVENT_TABLE_SIZE(ppc970); break; + case PMC_CLASS_E500: + ev = e500_event_table; + count = PMC_EVENT_TABLE_SIZE(e500); + break; case PMC_CLASS_SOFT: ev = soft_event_table; count = soft_event_info.pm_nevent; @@ -3245,6 +3258,10 @@ pmc_init(void) PMC_MDEP_INIT(ppc970); pmc_class_table[n] = ppc970_class_table_descr; break; + case PMC_CPU_PPC_E500: + PMC_MDEP_INIT(e500); + pmc_class_table[n] = e500_class_table_descr; + break; #endif default: /* @@ -3444,6 +3461,9 @@ _pmc_name_of_event(enum pmc_event pe, en } else if (pe = PMC_EV_PPC970_FIRST pe = PMC_EV_PPC970_LAST) { ev = ppc970_event_table; evfence = ppc970_event_table + PMC_EVENT_TABLE_SIZE(ppc970); + } else if (pe = PMC_EV_E500_FIRST pe = PMC_EV_E500_LAST) { + ev = e500_event_table; + evfence = e500_event_table + PMC_EVENT_TABLE_SIZE(e500); } else if (pe == PMC_EV_TSC_TSC) { ev = tsc_event_table; evfence = tsc_event_table + PMC_EVENT_TABLE_SIZE(tsc); Modified: head/sys/conf/files.powerpc == --- head/sys/conf/files.powerpc Sat Apr 18 21:35:41 2015(r281712) +++ head/sys/conf/files.powerpc Sat Apr 18 21:39:17 2015(r281713) @@ -31,8 +31,9 @@ dev/fb/fb.c optionalsc dev/fdt/fdt_powerpc.c optionalfdt # ofwbus depends on simplebus. dev/fdt/simplebus.coptionalaim | fdt -dev/hwpmc/hwpmc_powerpc.c optionalhwpmc +dev/hwpmc/hwpmc_e500.c optionalhwpmc dev/hwpmc/hwpmc_mpc7xxx.c optionalhwpmc +dev/hwpmc/hwpmc_powerpc.c optionalhwpmc
svn commit: r281715 - in head/sys: kern sys
Author: kib Date: Sat Apr 18 21:50:53 2015 New Revision: 281715 URL: https://svnweb.freebsd.org/changeset/base/281715 Log: Regen. Modified: head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/kern/init_sysent.c == --- head/sys/kern/init_sysent.c Sat Apr 18 21:50:13 2015(r281714) +++ head/sys/kern/init_sysent.c Sat Apr 18 21:50:53 2015(r281715) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 277610 2015-01-23 21:07:08Z jilles + * created from FreeBSD: head/sys/kern/syscalls.master 281714 2015-04-18 21:50:13Z kib */ #include opt_compat.h @@ -26,6 +26,12 @@ #define compat4(n, name) 0, (sy_call_t *)nosys #endif +#ifdef COMPAT_FREEBSD6 +#define compat6(n, name) n, (sy_call_t *)__CONCAT(freebsd6_,name) +#else +#define compat6(n, name) 0, (sy_call_t *)nosys +#endif + #ifdef COMPAT_FREEBSD7 #define compat7(n, name) n, (sy_call_t *)__CONCAT(freebsd7_,name) #else @@ -207,8 +213,8 @@ struct sysent sysent[] = { { AS(msgsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },/* 170 = msgsys */ { AS(shmsys_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT },/* 171 = shmsys */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 172 = nosys */ - { AS(freebsd6_pread_args), (sy_call_t *)freebsd6_pread, AUE_PREAD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 173 = freebsd6_pread */ - { AS(freebsd6_pwrite_args), (sy_call_t *)freebsd6_pwrite, AUE_PWRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 174 = freebsd6_pwrite */ + { compat6(AS(freebsd6_pread_args),pread), AUE_PREAD, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 173 = freebsd6 pread */ + { compat6(AS(freebsd6_pwrite_args),pwrite), AUE_PWRITE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 174 = freebsd6 pwrite */ { AS(setfib_args), (sy_call_t *)sys_setfib, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 175 = setfib */ { AS(ntp_adjtime_args), (sy_call_t *)sys_ntp_adjtime, AUE_NTP_ADJTIME, NULL, 0, 0, 0, SY_THR_STATIC }, /* 176 = ntp_adjtime */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 177 = sfork */ @@ -231,11 +237,11 @@ struct sysent sysent[] = { { AS(__getrlimit_args), (sy_call_t *)sys_getrlimit, AUE_GETRLIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 194 = getrlimit */ { AS(__setrlimit_args), (sy_call_t *)sys_setrlimit, AUE_SETRLIMIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 195 = setrlimit */ { AS(getdirentries_args), (sy_call_t *)sys_getdirentries, AUE_GETDIRENTRIES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 196 = getdirentries */ - { AS(freebsd6_mmap_args), (sy_call_t *)freebsd6_mmap, AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },/* 197 = freebsd6_mmap */ + { compat6(AS(freebsd6_mmap_args),mmap), AUE_MMAP, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 197 = freebsd6 mmap */ { 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 198 = __syscall */ - { AS(freebsd6_lseek_args), (sy_call_t *)freebsd6_lseek, AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 199 = freebsd6_lseek */ - { AS(freebsd6_truncate_args), (sy_call_t *)freebsd6_truncate, AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 200 = freebsd6_truncate */ - { AS(freebsd6_ftruncate_args), (sy_call_t *)freebsd6_ftruncate, AUE_FTRUNCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 201 = freebsd6_ftruncate */ + { compat6(AS(freebsd6_lseek_args),lseek), AUE_LSEEK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 199 = freebsd6 lseek */ + { compat6(AS(freebsd6_truncate_args),truncate), AUE_TRUNCATE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 200 = freebsd6 truncate */ + { compat6(AS(freebsd6_ftruncate_args),ftruncate), AUE_FTRUNCATE, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 201 = freebsd6 ftruncate */ { AS(sysctl_args), (sy_call_t *)sys___sysctl, AUE_SYSCTL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 202 = __sysctl */ { AS(mlock_args), (sy_call_t *)sys_mlock, AUE_MLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 203 = mlock */ { AS(munlock_args), (sy_call_t *)sys_munlock, AUE_MUNLOCK, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 204 = munlock */ Modified: head/sys/kern/syscalls.c == --- head/sys/kern/syscalls.cSat Apr 18 21:50:13 2015(r281714) +++ head/sys/kern/syscalls.cSat Apr 18 21:50:53 2015
svn commit: r281716 - head/share/man/man5
Author: kib Date: Sat Apr 18 21:54:00 2015 New Revision: 281716 URL: https://svnweb.freebsd.org/changeset/base/281716 Log: Regen. Modified: head/share/man/man5/src.conf.5 Modified: head/share/man/man5/src.conf.5 == --- head/share/man/man5/src.conf.5 Sat Apr 18 21:50:53 2015 (r281715) +++ head/share/man/man5/src.conf.5 Sat Apr 18 21:54:00 2015 (r281716) @@ -1,7 +1,7 @@ .\ DO NOT EDIT-- this file is automatically generated. .\ from FreeBSD: head/tools/build/options/makeman 255964 2013-10-01 07:22:04Z des .\ $FreeBSD$ -.Dd April 3, 2015 +.Dd April 19, 2015 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1100,9 +1100,6 @@ and related programs. .It Va WITHOUT_SYMVER .\ from FreeBSD: head/tools/build/options/WITHOUT_SYMVER 169649 2007-05-17 05:03:24Z deischen Set to disable symbol versioning when building shared libraries. -.It Va WITHOUT_SYSCALL_COMPAT -.\ from FreeBSD: head/tools/build/options/WITHOUT_SYSCALL_COMPAT 265826 2014-05-10 16:37:28Z imp -Do not include some compatible syscall wrappers in libc. .It Va WITHOUT_SYSCONS .\ from FreeBSD: head/tools/build/options/WITHOUT_SYSCONS 156932 2006-03-21 07:50:50Z ru Set to not build ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281700 - head/usr.sbin/bhyve
Author: mav Date: Sat Apr 18 20:10:19 2015 New Revision: 281700 URL: https://svnweb.freebsd.org/changeset/base/281700 Log: Workaround bhyve virtual disks operation on top of GEOM providers. GEOM does not support scatter/gather lists in its I/Os. Such requests are cut in pieces by physio(), that may be problematic, if those pieces are not multiple of provider's sector size. If such case is detected, move the data through temporary sequential buffer. MFC after:2 weeks Modified: head/usr.sbin/bhyve/block_if.c head/usr.sbin/bhyve/block_if.h head/usr.sbin/bhyve/pci_ahci.c head/usr.sbin/bhyve/pci_virtio_block.c Modified: head/usr.sbin/bhyve/block_if.c == --- head/usr.sbin/bhyve/block_if.c Sat Apr 18 19:52:39 2015 (r281699) +++ head/usr.sbin/bhyve/block_if.c Sat Apr 18 20:10:19 2015 (r281700) @@ -85,6 +85,7 @@ struct blockif_ctxt { int bc_magic; int bc_fd; int bc_ischr; + int bc_isgeom; int bc_candelete; int bc_rdonly; off_t bc_size; @@ -198,27 +199,93 @@ blockif_complete(struct blockif_ctxt *bc } static void -blockif_proc(struct blockif_ctxt *bc, struct blockif_elem *be) +blockif_proc(struct blockif_ctxt *bc, struct blockif_elem *be, uint8_t *buf) { struct blockif_req *br; off_t arg[2]; - int err; + ssize_t clen, len, off, boff, voff; + int i, err; br = be-be_req; + if (br-br_iovcnt = 1) + buf = NULL; err = 0; - switch (be-be_op) { case BOP_READ: - if (preadv(bc-bc_fd, br-br_iov, br-br_iovcnt, - br-br_offset) 0) - err = errno; + if (buf == NULL) { + if ((len = preadv(bc-bc_fd, br-br_iov, br-br_iovcnt, + br-br_offset)) 0) + err = errno; + else + br-br_resid -= len; + break; + } + i = 0; + off = voff = 0; + while (br-br_resid 0) { + len = MIN(br-br_resid, MAXPHYS); + if (pread(bc-bc_fd, buf, len, br-br_offset + + off) 0) { + err = errno; + break; + } + boff = 0; + do { + clen = MIN(len - boff, br-br_iov[i].iov_len - + voff); + memcpy(br-br_iov[i].iov_base + voff, + buf + boff, clen); + if (clen br-br_iov[i].iov_len - voff) + voff += clen; + else { + i++; + voff = 0; + } + boff += clen; + } while (boff len); + off += len; + br-br_resid -= len; + } break; case BOP_WRITE: - if (bc-bc_rdonly) + if (bc-bc_rdonly) { err = EROFS; - else if (pwritev(bc-bc_fd, br-br_iov, br-br_iovcnt, -br-br_offset) 0) - err = errno; + break; + } + if (buf == NULL) { + if ((len = pwritev(bc-bc_fd, br-br_iov, br-br_iovcnt, + br-br_offset)) 0) + err = errno; + else + br-br_resid -= len; + break; + } + i = 0; + off = voff = 0; + while (br-br_resid 0) { + len = MIN(br-br_resid, MAXPHYS); + boff = 0; + do { + clen = MIN(len - boff, br-br_iov[i].iov_len - + voff); + memcpy(buf + boff, + br-br_iov[i].iov_base + voff, clen); + if (clen br-br_iov[i].iov_len - voff) + voff += clen; + else { + i++; + voff = 0; + } + boff += clen; + } while (boff len); +
svn commit: r281705 - in head: cddl/contrib/opensolaris/cmd/dtrace share/man/man4 share/man/man9
Author: markj Date: Sat Apr 18 21:00:36 2015 New Revision: 281705 URL: https://svnweb.freebsd.org/changeset/base/281705 Log: Add manual pages for the io, ip, proc, sched, tcp and udp DTrace providers. The format of these pages is somewhat experimental, so they may be subject to further tweaking. Differential Revision:https://reviews.freebsd.org/D2170 Reviewed by: bcr, rpaulo MFC after:2 weeks Added: head/share/man/man4/dtrace-io.4 (contents, props changed) head/share/man/man4/dtrace-ip.4 (contents, props changed) head/share/man/man4/dtrace-proc.4 (contents, props changed) head/share/man/man4/dtrace-sched.4 (contents, props changed) head/share/man/man4/dtrace-tcp.4 (contents, props changed) head/share/man/man4/dtrace-udp.4 (contents, props changed) Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 head/share/man/man4/Makefile head/share/man/man9/SDT.9 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 == --- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Sat Apr 18 20:55:55 2015(r281704) +++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Sat Apr 18 21:00:36 2015(r281705) @@ -21,7 +21,7 @@ .\ .\ $FreeBSD$ .\ -.Dd October 5, 2013 +.Dd April 18, 2015 .Dt DTRACE 1 .Os .Sh NAME @@ -670,7 +670,8 @@ Invalid command line options or argument .Sh SEE ALSO .Xr cpp 1 , .Xr dtruss 1 , -.Xr elf 5 +.Xr elf 5 , +.Xr SDT 9 .Rs .%T Solaris Dynamic Tracing Guide .Re Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileSat Apr 18 20:55:55 2015 (r281704) +++ head/share/man/man4/MakefileSat Apr 18 21:00:36 2015 (r281705) @@ -121,6 +121,12 @@ MAN= aac.4 \ dpt.4 \ ds1307.4 \ ds3231.4 \ + ${_dtrace_io.4} \ + ${_dtrace_ip.4} \ + ${_dtrace_proc.4} \ + ${_dtrace_sched.4} \ + ${_dtrace_tcp.4} \ + ${_dtrace_udp.4} \ dummynet.4 \ ed.4 \ edsc.4 \ @@ -812,6 +818,15 @@ SUBDIR=man4.${MACHINE_CPUARCH} _ccd.4=ccd.4 .endif +.if ${MK_CDDL} != no +_dtrace_io.4= dtrace-io.4 +_dtrace_ip.4= dtrace-ip.4 +_dtrace_proc.4=dtrace-proc.4 +_dtrace_sched.4= dtrace-sched.4 +_dtrace_tcp.4= dtrace-tcp.4 +_dtrace_udp.4= dtrace-udp.4 +.endif + .if ${MK_ISCSI} != no MAN+= iscsi.4 MAN+= iscsi_initiator.4 Added: head/share/man/man4/dtrace-io.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/dtrace-io.4 Sat Apr 18 21:00:36 2015 (r281705) @@ -0,0 +1,123 @@ +.\ Copyright (c) 2015 Mark Johnston ma...@freebsd.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. +.\ +.\ 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 April 18, 2015 +.Dt DTRACE-IO 4 +.Os +.Sh NAME +.Nm dtrace-io +.Nd a DTrace provider for tracing events related to disk I/O +.Sh SYNOPSIS +.Fn io:::start struct bio * struct devstat * +.Fn io:::done struct bio * struct devstat * +.Sh DESCRIPTION +The +.Nm io +provider allows the tracing of disk I/O events. +The +.Fn io:::start +probe fires when a I/O request is about to be sent to the backing driver of a +.Xr disk 9 +object. +This occurs after all +.Xr GEOM 4 +transformations have been performed on the request. +The +.Fn io:::done +probe fires when a I/O request is completed. +Both probes take a +.Vt struct bio * +representing the I/O request as their first argument. +The second argument is a +.Vt struct devstat * +for the
Re: svn commit: r281705 - in head: cddl/contrib/opensolaris/cmd/dtrace share/man/man4 share/man/man9
Thank you for doing this! On 18/04/2015 22:00, Mark Johnston wrote: Author: markj Date: Sat Apr 18 21:00:36 2015 New Revision: 281705 URL: https://svnweb.freebsd.org/changeset/base/281705 Log: Add manual pages for the io, ip, proc, sched, tcp and udp DTrace providers. The format of these pages is somewhat experimental, so they may be subject to further tweaking. Differential Revision: https://reviews.freebsd.org/D2170 Reviewed by: bcr, rpaulo MFC after: 2 weeks Added: head/share/man/man4/dtrace-io.4 (contents, props changed) head/share/man/man4/dtrace-ip.4 (contents, props changed) head/share/man/man4/dtrace-proc.4 (contents, props changed) head/share/man/man4/dtrace-sched.4 (contents, props changed) head/share/man/man4/dtrace-tcp.4 (contents, props changed) head/share/man/man4/dtrace-udp.4 (contents, props changed) Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 head/share/man/man4/Makefile head/share/man/man9/SDT.9 Modified: head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 == --- head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Sat Apr 18 20:55:55 2015(r281704) +++ head/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 Sat Apr 18 21:00:36 2015(r281705) @@ -21,7 +21,7 @@ .\ .\ $FreeBSD$ .\ -.Dd October 5, 2013 +.Dd April 18, 2015 .Dt DTRACE 1 .Os .Sh NAME @@ -670,7 +670,8 @@ Invalid command line options or argument .Sh SEE ALSO .Xr cpp 1 , .Xr dtruss 1 , -.Xr elf 5 +.Xr elf 5 , +.Xr SDT 9 .Rs .%T Solaris Dynamic Tracing Guide .Re Modified: head/share/man/man4/Makefile == --- head/share/man/man4/MakefileSat Apr 18 20:55:55 2015 (r281704) +++ head/share/man/man4/MakefileSat Apr 18 21:00:36 2015 (r281705) @@ -121,6 +121,12 @@ MAN= aac.4 \ dpt.4 \ ds1307.4 \ ds3231.4 \ + ${_dtrace_io.4} \ + ${_dtrace_ip.4} \ + ${_dtrace_proc.4} \ + ${_dtrace_sched.4} \ + ${_dtrace_tcp.4} \ + ${_dtrace_udp.4} \ dummynet.4 \ ed.4 \ edsc.4 \ @@ -812,6 +818,15 @@ SUBDIR=man4.${MACHINE_CPUARCH} _ccd.4= ccd.4 .endif +.if ${MK_CDDL} != no +_dtrace_io.4= dtrace-io.4 +_dtrace_ip.4= dtrace-ip.4 +_dtrace_proc.4=dtrace-proc.4 +_dtrace_sched.4= dtrace-sched.4 +_dtrace_tcp.4= dtrace-tcp.4 +_dtrace_udp.4= dtrace-udp.4 +.endif + .if ${MK_ISCSI} != no MAN+= iscsi.4 MAN+= iscsi_initiator.4 Added: head/share/man/man4/dtrace-io.4 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/dtrace-io.4 Sat Apr 18 21:00:36 2015 (r281705) @@ -0,0 +1,123 @@ +.\ Copyright (c) 2015 Mark Johnston ma...@freebsd.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. +.\ +.\ 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 April 18, 2015 +.Dt DTRACE-IO 4 +.Os +.Sh NAME +.Nm dtrace-io +.Nd a DTrace provider for tracing events related to disk I/O +.Sh SYNOPSIS +.Fn io:::start struct bio * struct devstat * +.Fn io:::done struct bio * struct devstat * +.Sh DESCRIPTION +The +.Nm io +provider allows the tracing of disk I/O events. +The +.Fn io:::start +probe fires when a I/O request is about to be sent to the backing driver of a +.Xr disk 9 +object. +This occurs after all +.Xr GEOM 4 +transformations have been performed on the request. +The +.Fn io:::done +probe fires when a I/O request is completed. +Both probes take a +.Vt struct bio * +representing the I/O
svn commit: r281712 - in head: lib/libc/gen lib/libc/include lib/libc/sys lib/libthr/thread share/man/man3
Author: kib Date: Sat Apr 18 21:35:41 2015 New Revision: 281712 URL: https://svnweb.freebsd.org/changeset/base/281712 Log: Make wait6(2), waitid(3) and ppoll(2) cancellation points. The waitid() function is required to be cancellable by the standard. The wait6() and ppoll() follow the other syscalls in their groups. Reviewed by: jhb, jilles (previous versions) Sponsored by: The FreeBSD Foundation MFC after:1 week Added: head/lib/libc/sys/ppoll.c (contents, props changed) head/lib/libc/sys/wait6.c (contents, props changed) Modified: head/lib/libc/gen/waitid.c head/lib/libc/include/libc_private.h head/lib/libc/sys/Makefile.inc head/lib/libc/sys/interposing_table.c head/lib/libthr/thread/thr_syscalls.c head/share/man/man3/pthread_testcancel.3 Modified: head/lib/libc/gen/waitid.c == --- head/lib/libc/gen/waitid.c Sat Apr 18 21:31:36 2015(r281711) +++ head/lib/libc/gen/waitid.c Sat Apr 18 21:35:41 2015(r281712) @@ -37,6 +37,7 @@ __FBSDID($FreeBSD$); #include signal.h #include errno.h #include un-namespace.h +#include libc_private.h int __waitid(idtype_t idtype, id_t id, siginfo_t *info, int flags) @@ -44,7 +45,9 @@ __waitid(idtype_t idtype, id_t id, sigin int status; pid_t ret; - ret = _wait6(idtype, id, status, flags, NULL, info); + ret = ((pid_t (*)(idtype_t, id_t, int *, int, struct __wrusage *, + siginfo_t *))__libc_interposing[INTERPOS_wait6])(idtype, id, + status, flags, NULL, info); /* * According to SUSv4, waitid() shall not return a PID when a Modified: head/lib/libc/include/libc_private.h == --- head/lib/libc/include/libc_private.hSat Apr 18 21:31:36 2015 (r281711) +++ head/lib/libc/include/libc_private.hSat Apr 18 21:35:41 2015 (r281712) @@ -222,6 +222,8 @@ enum { INTERPOS_spinlock, INTERPOS_spinunlock, INTERPOS_kevent, + INTERPOS_wait6, + INTERPOS_ppoll, INTERPOS_MAX }; @@ -305,6 +307,8 @@ struct timeval; struct timezone; struct __siginfo; struct __ucontext; +struct __wrusage; +enum idtype; int__sys_aio_suspend(const struct aiocb * const[], int, const struct timespec *); int__sys_accept(int, struct sockaddr *, __socklen_t *); @@ -329,6 +333,8 @@ int __sys_pselect(int, struct fd_set *, struct fd_set *, const struct timespec *, const __sigset_t *); int__sys_poll(struct pollfd *, unsigned, int); +int__sys_ppoll(struct pollfd *, unsigned, const struct timespec *, + const __sigset_t *); __ssize_t __sys_pread(int, void *, __size_t, __off_t); __ssize_t __sys_pwrite(int, const void *, __size_t, __off_t); __ssize_t __sys_read(int, void *, __size_t); @@ -357,6 +363,8 @@ int __sys_thr_kill(long, int); int__sys_thr_self(long *); int__sys_truncate(const char *, __off_t); __pid_t__sys_wait4(__pid_t, int *, int, struct rusage *); +__pid_t__sys_wait6(enum idtype, __id_t, int *, int, + struct __wrusage *, struct __siginfo *); __ssize_t __sys_write(int, const void *, __size_t); __ssize_t __sys_writev(int, const struct iovec *, int); Modified: head/lib/libc/sys/Makefile.inc == --- head/lib/libc/sys/Makefile.inc Sat Apr 18 21:31:36 2015 (r281711) +++ head/lib/libc/sys/Makefile.inc Sat Apr 18 21:35:41 2015 (r281712) @@ -57,6 +57,7 @@ INTERPOSED = \ open \ openat \ poll \ + ppoll \ pselect \ read \ readv \ @@ -73,6 +74,7 @@ INTERPOSED = \ sigwaitinfo \ swapcontext \ wait4 \ + wait6 \ write \ writev Modified: head/lib/libc/sys/interposing_table.c == --- head/lib/libc/sys/interposing_table.c Sat Apr 18 21:31:36 2015 (r281711) +++ head/lib/libc/sys/interposing_table.c Sat Apr 18 21:35:41 2015 (r281712) @@ -76,6 +76,8 @@ interpos_func_t __libc_interposing[INTER SLOT(spinlock, __libc_spinlock_stub), SLOT(spinunlock, __libc_spinunlock_stub), SLOT(kevent, __sys_kevent), + SLOT(wait6, __sys_wait6), + SLOT(ppoll, __sys_ppoll), }; #undef SLOT Added: head/lib/libc/sys/ppoll.c == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/ppoll.c Sat Apr 18 21:35:41 2015(r281712) @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2015 The FreeBSD Foundation. + * All
svn commit: r281714 - in head: lib/libc lib/libc/amd64/sys lib/libc/arm/sys lib/libc/i386/sys lib/libc/include lib/libc/mips/sys lib/libc/powerpc/sys lib/libc/powerpc64/sys lib/libc/sparc64/sys lib...
Author: kib Date: Sat Apr 18 21:50:13 2015 New Revision: 281714 URL: https://svnweb.freebsd.org/changeset/base/281714 Log: The lseek(2), mmap(2), truncate(2), ftruncate(2), pread(2), and pwrite(2) syscalls are wrapped to provide compatibility with pre-7.x kernels which required padding before the off_t parameter. The fcntl(2) contains compatibility code to handle kernels before the struct flock was changed during the 8.x CURRENT development. The shims were reasonable to allow easier revert to the older kernel at that time. Now, two or three major releases later, shims do not serve any purpose. Such old kernels cannot handle current libc, so revert the compatibility code. Make padded syscalls support conditional under the COMPAT6 config option. For COMPAT32, the syscalls were under COMPAT6 already. Remove WITHOUT_SYSCALL_COMPAT build option, which only purpose was to (partially) disable the removed shims. Reviewed by: jhb, imp (previous versions) Discussed with: peter Sponsored by: The FreeBSD Foundation MFC after:1 week Deleted: head/lib/libc/sys/ftruncate.c head/lib/libc/sys/lseek.c head/lib/libc/sys/mmap.c head/lib/libc/sys/pread.c head/lib/libc/sys/pwrite.c head/lib/libc/sys/truncate.c head/tools/build/options/WITHOUT_SYSCALL_COMPAT Modified: head/lib/libc/Makefile head/lib/libc/amd64/sys/Makefile.inc head/lib/libc/arm/sys/Makefile.inc head/lib/libc/i386/sys/Makefile.inc head/lib/libc/include/compat.h head/lib/libc/include/libc_private.h head/lib/libc/mips/sys/Makefile.inc head/lib/libc/powerpc/sys/Makefile.inc head/lib/libc/powerpc64/sys/Makefile.inc head/lib/libc/sparc64/sys/Makefile.inc head/lib/libc/sys/Makefile.inc head/lib/libc/sys/fcntl.c head/lib/libc/sys/interposing_table.c head/lib/libthr/Makefile head/lib/libthr/thread/thr_syscalls.c head/share/mk/src.opts.mk head/sys/kern/sys_generic.c head/sys/kern/syscalls.master head/sys/kern/vfs_syscalls.c head/sys/vm/vm_mmap.c Modified: head/lib/libc/Makefile == --- head/lib/libc/Makefile Sat Apr 18 21:39:17 2015(r281713) +++ head/lib/libc/Makefile Sat Apr 18 21:50:13 2015(r281714) @@ -157,10 +157,6 @@ libkern.${LIBC_ARCH}:: ${KMSRCS} ${CP} ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} .endif -.if ${MK_SYSCALL_COMPAT} != no -CFLAGS+=-DSYSCALL_COMPAT -.endif - .include bsd.arch.inc.mk .include bsd.lib.mk Modified: head/lib/libc/amd64/sys/Makefile.inc == --- head/lib/libc/amd64/sys/Makefile.incSat Apr 18 21:39:17 2015 (r281713) +++ head/lib/libc/amd64/sys/Makefile.incSat Apr 18 21:50:13 2015 (r281714) @@ -11,6 +11,3 @@ MDASM=vfork.S brk.S cerror.S exect.S ge NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o PSEUDO=_getlogin.o _exit.o -.if ${MK_SYSCALL_COMPAT} != no -PSEUDO+= _pread.o _pwrite.o _lseek.o _mmap.o _ftruncate.o _truncate.o -.endif Modified: head/lib/libc/arm/sys/Makefile.inc == --- head/lib/libc/arm/sys/Makefile.inc Sat Apr 18 21:39:17 2015 (r281713) +++ head/lib/libc/arm/sys/Makefile.inc Sat Apr 18 21:50:13 2015 (r281714) @@ -8,6 +8,3 @@ MDASM= Ovfork.S brk.S cerror.S pipe.S pt NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o PSEUDO= _exit.o _getlogin.o -.if ${MK_SYSCALL_COMPAT} != no -PSEUDO+= _pread.o _pwrite.o _lseek.o _mmap.o _ftruncate.o _truncate.o -.endif Modified: head/lib/libc/i386/sys/Makefile.inc == --- head/lib/libc/i386/sys/Makefile.inc Sat Apr 18 21:39:17 2015 (r281713) +++ head/lib/libc/i386/sys/Makefile.inc Sat Apr 18 21:50:13 2015 (r281714) @@ -15,9 +15,6 @@ MDASM=Ovfork.S brk.S cerror.S exect.S g NOASM= break.o exit.o getlogin.o openbsd_poll.o sstk.o vfork.o yield.o PSEUDO=_getlogin.o _exit.o -.if ${MK_SYSCALL_COMPAT} != no -PSEUDO+= _pread.o _pwrite.o _lseek.o _mmap.o _ftruncate.o _truncate.o -.endif MAN+= i386_get_ioperm.2 i386_get_ldt.2 i386_vm86.2 MAN+= i386_set_watch.3 Modified: head/lib/libc/include/compat.h == --- head/lib/libc/include/compat.h Sat Apr 18 21:39:17 2015 (r281713) +++ head/lib/libc/include/compat.h Sat Apr 18 21:50:13 2015 (r281714) @@ -47,9 +47,7 @@ __sym_compat(shmctl, freebsd7_shmctl, FB #define__weak_reference(sym,alias) \ .weak alias;.equ alias,sym -#ifndef SYSCALL_COMPAT __weak_reference(__sys_fcntl,__fcntl_compat) -#endif #undef __weak_reference Modified: head/lib/libc/include/libc_private.h
Re: svn commit: r281707 - in head/sys: amd64/amd64 i386/i386 i386/include i386/xen x86/include x86/xen
On Sat, Apr 18, 2015 at 11:23 PM, Konstantin Belousov k...@freebsd.org wrote: Author: kib Date: Sat Apr 18 21:23:16 2015 New Revision: 281707 URL: https://svnweb.freebsd.org/changeset/base/281707 Log: Remove lazy pmap switch code from i386. Naive benchmark with md(4) shows no difference with the code removed. On both amd64 and i386, assert that a released pmap is not active. Proposed and reviewed by: alc Discussed with: Svatopluk Kraus onw...@gmail.com, peter Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/apic_vector.s head/sys/i386/i386/db_trace.c head/sys/i386/i386/mp_machdep.c head/sys/i386/i386/pmap.c head/sys/i386/i386/swtch.s head/sys/i386/include/smp.h head/sys/i386/xen/mp_machdep.c head/sys/i386/xen/pmap.c head/sys/x86/include/acpica_machdep.h head/sys/x86/xen/xen_apic.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Sat Apr 18 21:22:26 2015(r281706) +++ head/sys/amd64/amd64/pmap.c Sat Apr 18 21:23:16 2015(r281707) @@ -2532,6 +2532,8 @@ pmap_release(pmap_t pmap) pmap-pm_stats.resident_count)); KASSERT(vm_radix_is_empty(pmap-pm_root), (pmap_release: pmap has reserved page table page(s))); + KASSERT(CPU_EMPTY(pmap-pm_active), + (releasing active pmap %p, pmap)); if (pmap_pcid_enabled) { /* Modified: head/sys/i386/i386/apic_vector.s == --- head/sys/i386/i386/apic_vector.sSat Apr 18 21:22:26 2015 (r281706) +++ head/sys/i386/i386/apic_vector.sSat Apr 18 21:23:16 2015 (r281707) @@ -320,19 +320,4 @@ IDTVEC(rendezvous) POP_FRAME iret -/* - * Clean up when we lose out on the lazy context switch optimization. - * ie: when we are about to release a PTD but a cpu is still borrowing it. - */ - SUPERALIGN_TEXT -IDTVEC(lazypmap) - PUSH_FRAME - SET_KERNEL_SREGS - cld - - callpmap_lazyfix_action - - callas_lapic_eoi - POP_FRAME - iret #endif /* SMP */ Modified: head/sys/i386/i386/db_trace.c == --- head/sys/i386/i386/db_trace.c Sat Apr 18 21:22:26 2015 (r281706) +++ head/sys/i386/i386/db_trace.c Sat Apr 18 21:23:16 2015 (r281707) @@ -316,8 +316,7 @@ db_nextframe(struct i386_frame **fp, db_ frame_type = TRAP_TIMERINT; else if (strcmp(name, Xcpustop) == 0 || strcmp(name, Xrendezvous) == 0 || - strcmp(name, Xipi_intr_bitmap_handler) == 0 || - strcmp(name, Xlazypmap) == 0) + strcmp(name, Xipi_intr_bitmap_handler) == 0) frame_type = TRAP_INTERRUPT; } Modified: head/sys/i386/i386/mp_machdep.c == --- head/sys/i386/i386/mp_machdep.c Sat Apr 18 21:22:26 2015 (r281706) +++ head/sys/i386/i386/mp_machdep.c Sat Apr 18 21:23:16 2015 (r281707) @@ -163,7 +163,6 @@ u_long *ipi_invlrng_counts[MAXCPU]; u_long *ipi_invlpg_counts[MAXCPU]; u_long *ipi_invlcache_counts[MAXCPU]; u_long *ipi_rendezvous_counts[MAXCPU]; -u_long *ipi_lazypmap_counts[MAXCPU]; static u_long *ipi_hardclock_counts[MAXCPU]; #endif @@ -576,10 +575,6 @@ cpu_mp_start(void) setidt(IPI_INVLCACHE, IDTVEC(invlcache), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - /* Install an inter-CPU IPI for lazy pmap release */ - setidt(IPI_LAZYPMAP, IDTVEC(lazypmap), - SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - /* Install an inter-CPU IPI for all-CPU rendezvous */ setidt(IPI_RENDEZVOUS, IDTVEC(rendezvous), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); @@ -1672,8 +1667,6 @@ mp_ipi_intrcnt(void *dummy) intrcnt_add(buf, ipi_ast_counts[i]); snprintf(buf, sizeof(buf), cpu%d:rendezvous, i); intrcnt_add(buf, ipi_rendezvous_counts[i]); - snprintf(buf, sizeof(buf), cpu%d:lazypmap, i); - intrcnt_add(buf, ipi_lazypmap_counts[i]); snprintf(buf, sizeof(buf), cpu%d:hardclock, i); intrcnt_add(buf, ipi_hardclock_counts[i]); } Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Sat Apr 18 21:22:26 2015(r281706) +++ head/sys/i386/i386/pmap.c Sat Apr 18 21:23:16 2015(r281707) @@ -1248,18 +1248,14 @@ pmap_invalidate_cache_pages(vm_page_t
Re: svn commit: r281713 - in head: lib/libpmc sys/conf sys/dev/hwpmc sys/modules/hwpmc sys/powerpc/booke sys/powerpc/include
Sat, 18 Apr 2015 21:39:17 + (UTC) Justin Hibbits jhibb...@freebsd.org написав: PMC_CLASS_E500 ... --- all_subdir_libpcap --- /usr/local/libexec/ccache/world/cc -target x86_64-unknown-freebsd11.0 --sysroot=/media/da0s1/obj/usr/src/tmp -B/media/da0s1/obj/usr/src/tmp/usr/bin -fpic -DPIC -O2 -pipe -mmmx -msse -msse2 -msse3 -mssse3 -msse4 -msse4.1 -msse4.2 -mavx -maes -mpclmul -march=native -DHAVE_CONFIG_H -Dyylval=pcapyylval -I/usr/src/lib/libpcap -I. -D_U_=__attribute__((unused)) -DHAVE_SNPRINTF -DHAVE_VSNPRINTF -DINET6 -DHAVE_NET_PFVAR_H -I/usr/src/lib/libpcap/../../contrib/libpcap -std=gnu99 -fstack-protector -Wno-pointer-sign -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -Qunused-arguments -c /usr/src/lib/libpcap/../../contrib/libpcap/optimize.c -o optimize.So --- all_subdir_libpmc --- /usr/src/lib/libpmc/libpmc.c:302:1: error: use of undeclared identifier 'PMC_CLASS_E500'; did you mean 'PMC_CLASS_P5'? PMC_MDEP_TABLE(e500, E500, PMC_CLASS_SOFT, PMC_CLASS_E500, PMC_CLASS_TSC); ^ /usr/src/lib/libpmc/libpmc.c:273:3: note: expanded from macro 'PMC_MDEP_TABLE' PMC_CLASS_##C, __VA_ARGS__ \ ^ scratch space:64:1: note: expanded from here PMC_CLASS_E500 ^ /media/da0s1/obj/usr/src/tmp/usr/include/sys/pmc.h:144:2: note: 'PMC_CLASS_P5' declared here __PMC_CLASSES() ^ /media/da0s1/obj/usr/src/tmp/usr/include/sys/pmc.h:125:2: note: expanded from macro '__PMC_CLASSES' __PMC_CLASS(P5) /* Intel Pentium counters */\ ^ /media/da0s1/obj/usr/src/tmp/usr/include/sys/pmc.h:143:24: note: expanded from macro '__PMC_CLASS' #define __PMC_CLASS(N) PMC_CLASS_##N , ^ scratch space:46:1: note: expanded from here PMC_CLASS_P5 ^ /usr/src/lib/libpmc/libpmc.c:302:44: error: use of undeclared identifier 'PMC_CLASS_E500'; did you mean 'PMC_CLASS_P5'? PMC_MDEP_TABLE(e500, E500, PMC_CLASS_SOFT, PMC_CLASS_E500, PMC_CLASS_TSC); ^~ PMC_CLASS_P5 /usr/src/lib/libpmc/libpmc.c:273:18: note: expanded from macro 'PMC_MDEP_TABLE' PMC_CLASS_##C, __VA_ARGS__ \ ^ /media/da0s1/obj/usr/src/tmp/usr/include/sys/pmc.h:144:2: note: 'PMC_CLASS_P5' declared here __PMC_CLASSES() ^ /media/da0s1/obj/usr/src/tmp/usr/include/sys/pmc.h:125:2: note: expanded from macro '__PMC_CLASSES' __PMC_CLASS(P5) /* Intel Pentium counters */\ ^ /media/da0s1/obj/usr/src/tmp/usr/include/sys/pmc.h:143:24: note: expanded from macro '__PMC_CLASS' #define __PMC_CLASS(N) PMC_CLASS_##N , ^ scratch space:46:1: note: expanded from here PMC_CLASS_P5 ^ /usr/src/lib/libpmc/libpmc.c:2961:7: error: use of undeclared identifier 'PMC_CLASS_E500'; did you mean 'PMC_CLASS_P5'? case PMC_CLASS_E500: ^~ PMC_CLASS_P5 /media/da0s1/obj/usr/src/tmp/usr/include/sys/pmc.h:144:2: note: 'PMC_CLASS_P5' declared here __PMC_CLASSES() ^ /media/da0s1/obj/usr/src/tmp/usr/include/sys/pmc.h:125:2: note: expanded from macro '__PMC_CLASSES' __PMC_CLASS(P5) /* Intel Pentium counters */\ ^ /media/da0s1/obj/usr/src/tmp/usr/include/sys/pmc.h:143:24: note: expanded from macro '__PMC_CLASS' #define __PMC_CLASS(N) PMC_CLASS_##N , ^ scratch space:46:1: note: expanded from here PMC_CLASS_P5 ^ /usr/src/lib/libpmc/libpmc.c:2961:7: error: duplicate case value 'PMC_CLASS_P5' case PMC_CLASS_E500: ^ /usr/src/lib/libpmc/libpmc.c:2925:7: note: previous case defined here case PMC_CLASS_P5: ^ 4 errors generated. *** [libpmc.So] Error code 1 make[5]: stopped in /usr/src/lib/libpmc 1 error make[5]: stopped in /usr/src/lib/libpmc *** [all_subdir_libpmc] Error code 2 make[4]: stopped in /usr/src/lib --- all_subdir_libdwarf --- A failure has been detected in another branch of the parallel make make[5]: stopped in /usr/src/lib/libdwarf *** [all_subdir_libdwarf] Error code 2 make[4]: stopped in /usr/src/lib --- all_subdir_libpcap --- A failure has been detected in another branch of the parallel make make[5]: stopped in /usr/src/lib/libpcap *** [all_subdir_libpcap] Error code 2 make[4]: stopped in /usr/src/lib --- all_subdir_libngatm --- A failure has been detected in another branch of the parallel make make[5]: stopped in /usr/src/lib/libngatm *** [all_subdir_libngatm] Error code 2 make[4]: stopped in /usr/src/lib 4 errors make[4]: stopped in /usr/src/lib A failure has been detected in another branch of the parallel make make[3]: stopped in /usr/src
svn commit: r281699 - head/usr.sbin/mountd
Author: sjg Date: Sat Apr 18 19:52:39 2015 New Revision: 281699 URL: https://svnweb.freebsd.org/changeset/base/281699 Log: No need to delete export from filesystems which are not exported. Modified: head/usr.sbin/mountd/mountd.c Modified: head/usr.sbin/mountd/mountd.c == --- head/usr.sbin/mountd/mountd.c Sat Apr 18 19:37:37 2015 (r281698) +++ head/usr.sbin/mountd/mountd.c Sat Apr 18 19:52:39 2015 (r281699) @@ -1732,6 +1732,12 @@ get_exportlist(void) } /* +* We do not need to delete export flag from +* filesystems that do not have it set. +*/ + if (!(fsp-f_flags MNT_EXPORTED)) + continue; + /* * Do not delete export for network filesystem by * passing export arg to nmount(). * It only makes sense to do this for local filesystems. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281708 - in stable/10/sys: dev/atkbdc sys
Author: rpaulo Date: Sat Apr 18 21:24:46 2015 New Revision: 281708 URL: https://svnweb.freebsd.org/changeset/base/281708 Log: MFC r281440: Improve Synaptics support for newer touchpads. Enable two finger scrolling by default and disable the edge scrolling if the touchpad has no physical zone for it. Disable directional scrolling by default to avoid using extended buttons as scroll buttons. Add support for ClickPad. On Lenovo laptops, this is the button reported when one presses the touchpad. While there, fix a problem where the extended buttons were not reporting the button release event correctly: we need to save the state of the buttons and report it to sysmouse until we receive a packet from the touchpad indicating the button has been released. This makes it possible to use an extended button to resize a window. On Lenovo laptops, the major buttons are actually reported as extended buttons. Modified: stable/10/sys/dev/atkbdc/psm.c stable/10/sys/sys/mouse.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/atkbdc/psm.c == --- stable/10/sys/dev/atkbdc/psm.c Sat Apr 18 21:23:16 2015 (r281707) +++ stable/10/sys/dev/atkbdc/psm.c Sat Apr 18 21:24:46 2015 (r281708) @@ -198,6 +198,7 @@ typedef struct synapticsinfo { struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; int directional_scrolls; + int two_finger_scroll; int min_pressure; int max_pressure; int max_width; @@ -336,6 +337,7 @@ struct psm_softc { /* Driver status inf int lasterr; int cmdcount; struct sigio*async; /* Processes waiting for SIGIO */ + int extended_buttons; }; static devclass_t psm_devclass; @@ -2742,7 +2744,13 @@ proc_synaptics(struct psm_softc *sc, pac if (pb-ipacket[5] 0x02) touchpad_buttons |= MOUSE_BUTTON7DOWN; } else { - touchpad_buttons |= MOUSE_BUTTON2DOWN; + if (pb-ipacket[4] 0x01) + touchpad_buttons |= MOUSE_BUTTON1DOWN; + if (pb-ipacket[5] 0x01) + touchpad_buttons |= MOUSE_BUTTON3DOWN; + if (pb-ipacket[4] 0x02) + touchpad_buttons |= MOUSE_BUTTON2DOWN; + sc-extended_buttons = touchpad_buttons; } /* @@ -2764,13 +2772,26 @@ proc_synaptics(struct psm_softc *sc, pac mask = (1 maskedbits) - 1; pb-ipacket[4] = ~(mask); pb-ipacket[5] = ~(mask); + } else if (!sc-syninfo.directional_scrolls + !sc-synaction.in_vscroll) { + /* +* Keep reporting MOUSE DOWN until we get a new packet +* indicating otherwise. +*/ + touchpad_buttons |= sc-extended_buttons; } } + /* Handle ClickPad. */ + if (sc-synhw.capClickPad + ((pb-ipacket[0] ^ pb-ipacket[3]) 0x01)) + touchpad_buttons |= MOUSE_BUTTON1DOWN; ms-button = touchpad_buttons | guest_buttons; - /* Check pressure to detect a real wanted action on the -* touchpad. */ + /* +* Check pressure to detect a real wanted action on the +* touchpad. +*/ if (*z = sc-syninfo.min_pressure) { synapticsaction_t *synaction; int cursor, peer, window; @@ -2783,7 +2804,7 @@ proc_synaptics(struct psm_softc *sc, pac int weight_current, weight_previous, weight_len_squared; int div_min, div_max, div_len; int vscroll_hor_area, vscroll_ver_area; - + int two_finger_scroll; int len, weight_prev_x, weight_prev_y; int div_max_x, div_max_y, div_x, div_y; @@ -2810,6 +2831,7 @@ proc_synaptics(struct psm_softc *sc, pac div_len = sc-syninfo.div_len; vscroll_hor_area = sc-syninfo.vscroll_hor_area; vscroll_ver_area = sc-syninfo.vscroll_ver_area; + two_finger_scroll = sc-syninfo.two_finger_scroll; /* Palm detection. */ if (!( @@ -2969,33 +2991,57 @@ proc_synaptics(struct psm_softc *sc, pac if (timevalcmp(sc-lastsoftintr, sc-taptimeout, ) || dxp =
Re: svn commit: r281707 - in head/sys: amd64/amd64 i386/i386 i386/include i386/xen x86/include x86/xen
On Sun, Apr 19, 2015 at 12:39 AM, Oliver Pinter oliver.pin...@hardenedbsd.org wrote: On Sat, Apr 18, 2015 at 11:23 PM, Konstantin Belousov k...@freebsd.org wrote: Author: kib Date: Sat Apr 18 21:23:16 2015 New Revision: 281707 URL: https://svnweb.freebsd.org/changeset/base/281707 Log: Remove lazy pmap switch code from i386. Naive benchmark with md(4) shows no difference with the code removed. On both amd64 and i386, assert that a released pmap is not active. Proposed and reviewed by: alc Discussed with: Svatopluk Kraus onw...@gmail.com, peter Sponsored by: The FreeBSD Foundation MFC after:2 weeks Modified: head/sys/amd64/amd64/pmap.c head/sys/i386/i386/apic_vector.s head/sys/i386/i386/db_trace.c head/sys/i386/i386/mp_machdep.c head/sys/i386/i386/pmap.c head/sys/i386/i386/swtch.s head/sys/i386/include/smp.h head/sys/i386/xen/mp_machdep.c head/sys/i386/xen/pmap.c head/sys/x86/include/acpica_machdep.h head/sys/x86/xen/xen_apic.c Modified: head/sys/amd64/amd64/pmap.c == --- head/sys/amd64/amd64/pmap.c Sat Apr 18 21:22:26 2015(r281706) +++ head/sys/amd64/amd64/pmap.c Sat Apr 18 21:23:16 2015(r281707) @@ -2532,6 +2532,8 @@ pmap_release(pmap_t pmap) pmap-pm_stats.resident_count)); KASSERT(vm_radix_is_empty(pmap-pm_root), (pmap_release: pmap has reserved page table page(s))); + KASSERT(CPU_EMPTY(pmap-pm_active), + (releasing active pmap %p, pmap)); if (pmap_pcid_enabled) { /* Modified: head/sys/i386/i386/apic_vector.s == --- head/sys/i386/i386/apic_vector.sSat Apr 18 21:22:26 2015 (r281706) +++ head/sys/i386/i386/apic_vector.sSat Apr 18 21:23:16 2015 (r281707) @@ -320,19 +320,4 @@ IDTVEC(rendezvous) POP_FRAME iret -/* - * Clean up when we lose out on the lazy context switch optimization. - * ie: when we are about to release a PTD but a cpu is still borrowing it. - */ - SUPERALIGN_TEXT -IDTVEC(lazypmap) - PUSH_FRAME - SET_KERNEL_SREGS - cld - - callpmap_lazyfix_action - - callas_lapic_eoi - POP_FRAME - iret #endif /* SMP */ Modified: head/sys/i386/i386/db_trace.c == --- head/sys/i386/i386/db_trace.c Sat Apr 18 21:22:26 2015 (r281706) +++ head/sys/i386/i386/db_trace.c Sat Apr 18 21:23:16 2015 (r281707) @@ -316,8 +316,7 @@ db_nextframe(struct i386_frame **fp, db_ frame_type = TRAP_TIMERINT; else if (strcmp(name, Xcpustop) == 0 || strcmp(name, Xrendezvous) == 0 || - strcmp(name, Xipi_intr_bitmap_handler) == 0 || - strcmp(name, Xlazypmap) == 0) + strcmp(name, Xipi_intr_bitmap_handler) == 0) frame_type = TRAP_INTERRUPT; } Modified: head/sys/i386/i386/mp_machdep.c == --- head/sys/i386/i386/mp_machdep.c Sat Apr 18 21:22:26 2015 (r281706) +++ head/sys/i386/i386/mp_machdep.c Sat Apr 18 21:23:16 2015 (r281707) @@ -163,7 +163,6 @@ u_long *ipi_invlrng_counts[MAXCPU]; u_long *ipi_invlpg_counts[MAXCPU]; u_long *ipi_invlcache_counts[MAXCPU]; u_long *ipi_rendezvous_counts[MAXCPU]; -u_long *ipi_lazypmap_counts[MAXCPU]; static u_long *ipi_hardclock_counts[MAXCPU]; #endif @@ -576,10 +575,6 @@ cpu_mp_start(void) setidt(IPI_INVLCACHE, IDTVEC(invlcache), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - /* Install an inter-CPU IPI for lazy pmap release */ - setidt(IPI_LAZYPMAP, IDTVEC(lazypmap), - SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); - /* Install an inter-CPU IPI for all-CPU rendezvous */ setidt(IPI_RENDEZVOUS, IDTVEC(rendezvous), SDT_SYS386IGT, SEL_KPL, GSEL(GCODE_SEL, SEL_KPL)); @@ -1672,8 +1667,6 @@ mp_ipi_intrcnt(void *dummy) intrcnt_add(buf, ipi_ast_counts[i]); snprintf(buf, sizeof(buf), cpu%d:rendezvous, i); intrcnt_add(buf, ipi_rendezvous_counts[i]); - snprintf(buf, sizeof(buf), cpu%d:lazypmap, i); - intrcnt_add(buf, ipi_lazypmap_counts[i]); snprintf(buf, sizeof(buf), cpu%d:hardclock, i); intrcnt_add(buf, ipi_hardclock_counts[i]); } Modified: head/sys/i386/i386/pmap.c == --- head/sys/i386/i386/pmap.c Sat Apr 18 21:22:26 2015(r281706) +++ head/sys/i386/i386/pmap.c Sat Apr 18
svn commit: r281718 - in head/bin/sh: . tests/builtins
Author: bdrewery Date: Sat Apr 18 23:49:57 2015 New Revision: 281718 URL: https://svnweb.freebsd.org/changeset/base/281718 Log: sh: Fix the trap builtin to be POSIX-compliant for 'trap exit SIG' and 'trap n n...'. The parser considered 'trap exit INT' to reset the default for both EXIT and INT. This beahvior is not POSIX compliant. This was avoided if a value was specified for 'exit', but then disallows exiting with the signal received. A possible workaround is using ' exit'. However POSIX does allow this type of behavior if the parameters are all integers. Fix the handling for this and clarify its support in the manpage since it is specifically allowed by POSIX. Differential Revision:https://reviews.freebsd.org/D2325 Reviewed by: jilles MFC after:2 weeks Added: head/bin/sh/tests/builtins/trap15.0 (contents, props changed) head/bin/sh/tests/builtins/trap16.0 (contents, props changed) Modified: head/bin/sh/sh.1 head/bin/sh/tests/builtins/Makefile head/bin/sh/trap.c Modified: head/bin/sh/sh.1 == --- head/bin/sh/sh.1Sat Apr 18 23:08:52 2015(r281717) +++ head/bin/sh/sh.1Sat Apr 18 23:49:57 2015(r281718) @@ -32,7 +32,7 @@ .\from: @(#)sh.1 8.6 (Berkeley) 5/4/95 .\ $FreeBSD$ .\ -.Dd February 22, 2015 +.Dd April 18, 2015 .Dt SH 1 .Os .Sh NAME @@ -2574,8 +2574,7 @@ the former causes the specified signal t and the latter causes the default action to be taken. Omitting the .Ar action -is another way to request the default action, for compatibility reasons this -usage is not recommended though. +and using only signal numbers is another way to request the default action. In a subshell or utility environment, the shell resets trapped (but not ignored) signals to the default action. The Modified: head/bin/sh/tests/builtins/Makefile == --- head/bin/sh/tests/builtins/Makefile Sat Apr 18 23:08:52 2015 (r281717) +++ head/bin/sh/tests/builtins/Makefile Sat Apr 18 23:49:57 2015 (r281718) @@ -137,6 +137,8 @@ FILES+= trap11.0 FILES+=trap12.0 FILES+=trap13.0 FILES+=trap14.0 +FILES+=trap15.0 +FILES+=trap16.0 FILES+=trap2.0 FILES+=trap3.0 FILES+=trap4.0 Added: head/bin/sh/tests/builtins/trap15.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/trap15.0 Sat Apr 18 23:49:57 2015 (r281718) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +(${SH} -c 'term(){ exit 5;}; trap term TERM; kill -TERM $$') +wait /dev/null 21 $! +[ $? -eq 5 ] Added: head/bin/sh/tests/builtins/trap16.0 == --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/sh/tests/builtins/trap16.0 Sat Apr 18 23:49:57 2015 (r281718) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +traps=$(${SH} -c 'trap echo bad 0; trap - 0; trap') +[ -z $traps ] || exit 1 +traps=$(${SH} -c 'trap echo bad 0; trap 0; trap') +expected_traps=$(${SH} -c 'trap EXIT; trap') +[ $traps = $expected_traps ] || exit 2 +traps=$(${SH} -c 'trap echo bad 0; trap 0; trap') +[ -z $traps ] || exit 3 +traps=$(${SH} -c 'trap echo bad 0; trap -- 0; trap') +[ -z $traps ] || exit 4 +traps=$(${SH} -c 'trap echo bad 0 1 2; trap - 0 1 2; trap') +[ -z $traps ] || exit 5 +traps=$(${SH} -c 'trap echo bad 0 1 2; trap 0 1 2; trap') +expected_traps=$(${SH} -c 'trap EXIT HUP INT; trap') +[ $traps = $expected_traps ] || exit 6 +traps=$(${SH} -c 'trap echo bad 0 1 2; trap 0 1 2; trap') +[ -z $traps ] || exit 7 +traps=$(${SH} -c 'trap echo bad 0 1 2; trap -- 0 1 2; trap') +[ -z $traps ] || exit 8 Modified: head/bin/sh/trap.c == --- head/bin/sh/trap.c Sat Apr 18 23:08:52 2015(r281717) +++ head/bin/sh/trap.c Sat Apr 18 23:49:57 2015(r281718) @@ -183,7 +183,7 @@ trapcmd(int argc __unused, char **argv) return 0; } action = NULL; - if (*argv sigstring_to_signum(*argv) == -1) { + if (*argv !is_number(*argv)) { if (strcmp(*argv, -) == 0) argv++; else { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r281707 - in head/sys: amd64/amd64 i386/i386 i386/include i386/xen x86/include x86/xen
On Sun, Apr 19, 2015 at 12:39:47AM +0200, Oliver Pinter wrote: On Sat, Apr 18, 2015 at 11:23 PM, Konstantin Belousov k...@freebsd.org wrote: void acpi_SetDefaultIntrModel(int model); void acpi_cpu_c1(void); +void acpi_cpu_idle_mwait(uint32_t mwait_hint); This change is related of this commit or this belongs to other modificatons? Please trim your replies. -- Steve ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281719 - head/bin/ed
Author: eadler Date: Sat Apr 18 23:56:04 2015 New Revision: 281719 URL: https://svnweb.freebsd.org/changeset/base/281719 Log: bin/ed: use correct type in multiplication The result is line_t** so the multiplication should be size * sizeof(line_t*) MFC After:1 month Modified: head/bin/ed/glbl.c Modified: head/bin/ed/glbl.c == --- head/bin/ed/glbl.c Sat Apr 18 23:49:57 2015(r281718) +++ head/bin/ed/glbl.c Sat Apr 18 23:56:04 2015(r281719) @@ -153,7 +153,7 @@ set_active_node(line_t *lp) if (active_list != NULL) { #endif if ((ts = (line_t **) realloc(active_list, - (ti += MINBUFSZ) * sizeof(line_t **))) == NULL) { + (ti += MINBUFSZ) * sizeof(line_t *))) == NULL) { fprintf(stderr, %s\n, strerror(errno)); errmsg = out of memory; SPL0(); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
Re: svn commit: r281719 - head/bin/ed
Oh yes ... On 04/18/15 18:56, Eitan Adler wrote: Author: eadler Date: Sat Apr 18 23:56:04 2015 New Revision: 281719 URL: https://svnweb.freebsd.org/changeset/base/281719 Log: bin/ed: use correct type in multiplication The result is line_t** so the multiplication should be size * sizeof(line_t*) MFC After: 1 month Modified: head/bin/ed/glbl.c Modified: head/bin/ed/glbl.c == --- head/bin/ed/glbl.c Sat Apr 18 23:49:57 2015(r281718) +++ head/bin/ed/glbl.c Sat Apr 18 23:56:04 2015(r281719) @@ -153,7 +153,7 @@ set_active_node(line_t *lp) if (active_list != NULL) { #endif if ((ts = (line_t **) realloc(active_list, - (ti += MINBUFSZ) * sizeof(line_t **))) == NULL) { + (ti += MINBUFSZ) * sizeof(line_t *))) == NULL) { fprintf(stderr, %s\n, strerror(errno)); errmsg = out of memory; SPL0(); Found by:clang static checker http://scan.freebsd.org/scan-build/bin/2015-04-18-amd64/report-9ba1bb.html#EndPath ;) Thanks, Pedro. ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281720 - head/sys/vm
Author: alc Date: Sun Apr 19 00:29:02 2015 New Revision: 281720 URL: https://svnweb.freebsd.org/changeset/base/281720 Log: Eliminate an unused variable. MFC after:1 week Modified: head/sys/vm/device_pager.c Modified: head/sys/vm/device_pager.c == --- head/sys/vm/device_pager.c Sat Apr 18 23:56:04 2015(r281719) +++ head/sys/vm/device_pager.c Sun Apr 19 00:29:02 2015(r281720) @@ -294,7 +294,6 @@ static int old_dev_pager_fault(vm_object_t object, vm_ooffset_t offset, int prot, vm_page_t *mres) { - vm_pindex_t pidx; vm_paddr_t paddr; vm_page_t m_paddr, page; struct cdev *dev; @@ -304,7 +303,6 @@ old_dev_pager_fault(vm_object_t object, vm_memattr_t memattr; int ref, ret; - pidx = OFF_TO_IDX(offset); memattr = object-memattr; VM_OBJECT_WUNLOCK(object); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281721 - head/sys/sys
Author: jhibbits Date: Sun Apr 19 00:33:21 2015 New Revision: 281721 URL: https://svnweb.freebsd.org/changeset/base/281721 Log: Fix the build. Commit the last part of e500 PMC. Pointy hat to:jhibbits Modified: head/sys/sys/pmc.h Modified: head/sys/sys/pmc.h == --- head/sys/sys/pmc.h Sun Apr 19 00:29:02 2015(r281720) +++ head/sys/sys/pmc.h Sun Apr 19 00:33:21 2015(r281721) @@ -102,6 +102,8 @@ __PMC_CPU(MIPS_OCTEON, 0x201, Cavium Octeon)\ __PMC_CPU(MIPS_74K, 0x202, MIPS 74K) \ __PMC_CPU(PPC_7450, 0x300, PowerPC MPC7450) \ + __PMC_CPU(PPC_E500, 0x340, PowerPC e500 Core)\ + __PMC_CPU(PPC_MPC85XX, 0x340, Freescale PowerPC MPC85XX)\ __PMC_CPU(PPC_970, 0x380, IBM PowerPC 970) \ __PMC_CPU(GENERIC, 0x400, Generic) @@ -136,6 +138,7 @@ enum pmc_cputype { __PMC_CLASS(MIPS74K)/* MIPS 74K */ \ __PMC_CLASS(PPC7450)/* Motorola MPC7450 class */\ __PMC_CLASS(PPC970) /* IBM PowerPC 970 class */ \ + __PMC_CLASS(E500) /* Freescale e500 class */ \ __PMC_CLASS(SOFT) /* Software events */ enum pmc_class { ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281723 - head/usr.bin/calendar
Author: eadler Date: Sun Apr 19 04:27:50 2015 New Revision: 281723 URL: https://svnweb.freebsd.org/changeset/base/281723 Log: calendar: remove useless check lineline checked for 0 in the while loop condition. There is no need to check for it additionally in the body. CID: 1288959 MFC After:1 week Modified: head/usr.bin/calendar/io.c Modified: head/usr.bin/calendar/io.c == --- head/usr.bin/calendar/io.c Sun Apr 19 01:23:12 2015(r281722) +++ head/usr.bin/calendar/io.c Sun Apr 19 04:27:50 2015(r281723) @@ -257,9 +257,6 @@ cal_parse(FILE *in, FILE *out) return (1); while ((linelen = getline(line, linecap, in)) 0) { - if (linelen == 0) - continue; - if (*line == '#') { switch (token(line+1, out, skip)) { case T_ERR: ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281724 - head/usr.bin/rpcgen
Author: eadler Date: Sun Apr 19 04:53:28 2015 New Revision: 281724 URL: https://svnweb.freebsd.org/changeset/base/281724 Log: rpcgen: fix use use of strcmp strcmp only guarantee that it will return at least 1 if the string B is greater than that of string A. Modified: head/usr.bin/rpcgen/rpc_sample.c Modified: head/usr.bin/rpcgen/rpc_sample.c == --- head/usr.bin/rpcgen/rpc_sample.cSun Apr 19 04:27:50 2015 (r281723) +++ head/usr.bin/rpcgen/rpc_sample.cSun Apr 19 04:53:28 2015 (r281724) @@ -115,7 +115,7 @@ write_sample_client(const char *program_ for (l = proc-args.decls; l != NULL; l = l-next) { f_print(fout, \t); ptype(l-decl.prefix, l-decl.type, 1); - if (strcmp(l-decl.type,string) == 1) + if (strcmp(l-decl.type,string) = 1) f_print(fout, ); pvname(proc-proc_name, vp-vers_num); f_print(fout, _%s;\n, l-decl.name); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281683 - head/sys/netgraph/bluetooth/include
Author: takawata Date: Sat Apr 18 06:16:33 2015 New Revision: 281683 URL: https://svnweb.freebsd.org/changeset/base/281683 Log: Forgot to add default event mask definition. Modified: head/sys/netgraph/bluetooth/include/ng_hci.h Modified: head/sys/netgraph/bluetooth/include/ng_hci.h == --- head/sys/netgraph/bluetooth/include/ng_hci.hSat Apr 18 05:05:38 2015(r281682) +++ head/sys/netgraph/bluetooth/include/ng_hci.hSat Apr 18 06:16:33 2015(r281683) @@ -897,6 +897,8 @@ typedef struct { } __attribute__ ((packed)) ng_hci_set_event_mask_cp; typedef ng_hci_status_rp ng_hci_set_event_mask_rp; +#define NG_HCI_EVENT_MASK_DEFAULT 0x1fff +#define NG_HCI_EVENT_MASK_LE 0x2000 #define NG_HCI_OCF_RESET 0x0003 /* No command parameter(s) */ @@ -1454,6 +1456,7 @@ typedef struct { } __attribute__ ((packed)) ng_hci_le_set_event_mask_cp; typedef ng_hci_status_rp ng_hci_le_set_event_mask_rp; +#define NG_HCI_LE_EVENT_MASK_ALL 0x1f #define NG_HCI_OCF_LE_READ_BUFFER_SIZE 0x0002 /*No command parameter */ ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281686 - head/sys/dev/etherswitch
Author: rpaulo Date: Sat Apr 18 07:34:39 2015 New Revision: 281686 URL: https://svnweb.freebsd.org/changeset/base/281686 Log: Fix French typos in etherswitch. Modified: head/sys/dev/etherswitch/miiproxy.c Modified: head/sys/dev/etherswitch/miiproxy.c == --- head/sys/dev/etherswitch/miiproxy.c Sat Apr 18 06:53:13 2015 (r281685) +++ head/sys/dev/etherswitch/miiproxy.c Sat Apr 18 07:34:39 2015 (r281686) @@ -62,35 +62,35 @@ struct mdioproxy_softc { }; /* - * The rendevous data structures and functions allow two device endpoints to + * The rendezvous data structures and functions allow two device endpoints to * match up, so that the proxy endpoint can be associated with a target * endpoint. The proxy has to know the device name of the target that it - * wants to associate with, for example through a hint. The rendevous code + * wants to associate with, for example through a hint. The rendezvous code * makes no assumptions about the devices that want to meet. */ -struct rendevous_entry; +struct rendezvous_entry; -enum rendevous_op { - RENDEVOUS_ATTACH, - RENDEVOUS_DETACH +enum rendezvous_op { + RENDEZVOUS_ATTACH, + RENDEZVOUS_DETACH }; -typedef int (*rendevous_callback_t)(enum rendevous_op, -struct rendevous_entry *); +typedef int (*rendezvous_callback_t)(enum rendezvous_op, +struct rendezvous_entry *); -static SLIST_HEAD(rendevoushead, rendevous_entry) rendevoushead = -SLIST_HEAD_INITIALIZER(rendevoushead); +static SLIST_HEAD(rendezvoushead, rendezvous_entry) rendezvoushead = +SLIST_HEAD_INITIALIZER(rendezvoushead); -struct rendevous_endpoint { +struct rendezvous_endpoint { device_tdevice; const char *name; - rendevous_callback_tcallback; + rendezvous_callback_t callback; }; -struct rendevous_entry { - SLIST_ENTRY(rendevous_entry)entries; - struct rendevous_endpoint proxy; - struct rendevous_endpoint target; +struct rendezvous_entry { + SLIST_ENTRY(rendezvous_entry) entries; + struct rendezvous_endpoint proxy; + struct rendezvous_endpoint target; }; /* @@ -98,15 +98,15 @@ struct rendevous_entry { * returns an error, undo the attachment. */ static int -rendevous_attach(struct rendevous_entry *e, struct rendevous_endpoint *ep) +rendezvous_attach(struct rendezvous_entry *e, struct rendezvous_endpoint *ep) { int error; - error = e-proxy.callback(RENDEVOUS_ATTACH, e); + error = e-proxy.callback(RENDEZVOUS_ATTACH, e); if (error == 0) { - error = e-target.callback(RENDEVOUS_ATTACH, e); + error = e-target.callback(RENDEZVOUS_ATTACH, e); if (error != 0) { - e-proxy.callback(RENDEVOUS_DETACH, e); + e-proxy.callback(RENDEZVOUS_DETACH, e); ep-device = NULL; ep-callback = NULL; } @@ -115,27 +115,27 @@ rendevous_attach(struct rendevous_entry } /* - * Create an entry for the proxy in the rendevous list. The name parameter + * Create an entry for the proxy in the rendezvous list. The name parameter * indicates the name of the device that is the target endpoint for this - * rendevous. The callback will be invoked as soon as the target is + * rendezvous. The callback will be invoked as soon as the target is * registered: either immediately if the target registered itself earlier, * or once the target registers. Returns ENXIO if the target has not yet * registered. */ static int -rendevous_register_proxy(device_t dev, const char *name, -rendevous_callback_t callback) +rendezvous_register_proxy(device_t dev, const char *name, +rendezvous_callback_t callback) { - struct rendevous_entry *e; + struct rendezvous_entry *e; KASSERT(callback != NULL, (callback must be set)); - SLIST_FOREACH(e, rendevoushead, entries) { + SLIST_FOREACH(e, rendezvoushead, entries) { if (strcmp(name, e-target.name) == 0) { /* the target is already attached */ e-proxy.name = device_get_nameunit(dev); e-proxy.device = dev; e-proxy.callback = callback; - return (rendevous_attach(e, e-proxy)); + return (rendezvous_attach(e, e-proxy)); } } e = malloc(sizeof(*e), M_MIIPROXY, M_WAITOK | M_ZERO); @@ -143,34 +143,34 @@ rendevous_register_proxy(device_t dev, c e-proxy.device = dev; e-proxy.callback = callback; e-target.name = name; - SLIST_INSERT_HEAD(rendevoushead, e, entries); + SLIST_INSERT_HEAD(rendezvoushead, e, entries); return (ENXIO); } /* - * Create an entry in the rendevous list for the
svn commit: r281687 - in stable/10/sys: contrib/dev/acpica contrib/dev/acpica/common contrib/dev/acpica/compiler contrib/dev/acpica/components/debugger contrib/dev/acpica/components/disassembler co...
Author: jkim Date: Sat Apr 18 08:01:12 2015 New Revision: 281687 URL: https://svnweb.freebsd.org/changeset/base/281687 Log: MFC: r281396, r281475 Merge ACPICA 20150410. Relnotes: yes Modified: stable/10/sys/contrib/dev/acpica/acpica_prep.sh stable/10/sys/contrib/dev/acpica/changes.txt stable/10/sys/contrib/dev/acpica/common/adfile.c stable/10/sys/contrib/dev/acpica/common/adisasm.c stable/10/sys/contrib/dev/acpica/common/dmtable.c stable/10/sys/contrib/dev/acpica/common/dmtbdump.c stable/10/sys/contrib/dev/acpica/common/dmtbinfo.c stable/10/sys/contrib/dev/acpica/compiler/aslcodegen.c stable/10/sys/contrib/dev/acpica/compiler/aslcompile.c stable/10/sys/contrib/dev/acpica/compiler/aslcompiler.h stable/10/sys/contrib/dev/acpica/compiler/asldefine.h stable/10/sys/contrib/dev/acpica/compiler/aslfold.c stable/10/sys/contrib/dev/acpica/compiler/asllisting.c stable/10/sys/contrib/dev/acpica/compiler/aslmain.c stable/10/sys/contrib/dev/acpica/compiler/aslmap.c stable/10/sys/contrib/dev/acpica/compiler/aslmapenter.c stable/10/sys/contrib/dev/acpica/compiler/asloptions.c stable/10/sys/contrib/dev/acpica/compiler/aslrules.y stable/10/sys/contrib/dev/acpica/compiler/aslstartup.c stable/10/sys/contrib/dev/acpica/compiler/asltree.c stable/10/sys/contrib/dev/acpica/compiler/asltypes.y stable/10/sys/contrib/dev/acpica/compiler/aslutils.c stable/10/sys/contrib/dev/acpica/compiler/aslwalks.c stable/10/sys/contrib/dev/acpica/compiler/dtcompile.c stable/10/sys/contrib/dev/acpica/compiler/dtcompiler.h stable/10/sys/contrib/dev/acpica/compiler/dtio.c stable/10/sys/contrib/dev/acpica/compiler/dttable.c stable/10/sys/contrib/dev/acpica/compiler/dttemplate.h stable/10/sys/contrib/dev/acpica/compiler/dtutils.c stable/10/sys/contrib/dev/acpica/components/debugger/dbmethod.c stable/10/sys/contrib/dev/acpica/components/debugger/dbxface.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmopcode.c stable/10/sys/contrib/dev/acpica/components/disassembler/dmwalk.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c stable/10/sys/contrib/dev/acpica/components/dispatcher/dsutils.c stable/10/sys/contrib/dev/acpica/components/events/evregion.c stable/10/sys/contrib/dev/acpica/components/events/evxfevnt.c stable/10/sys/contrib/dev/acpica/components/executer/exdump.c stable/10/sys/contrib/dev/acpica/components/executer/exfldio.c stable/10/sys/contrib/dev/acpica/components/executer/exoparg3.c stable/10/sys/contrib/dev/acpica/components/executer/exregion.c stable/10/sys/contrib/dev/acpica/components/hardware/hwgpe.c stable/10/sys/contrib/dev/acpica/components/hardware/hwvalid.c stable/10/sys/contrib/dev/acpica/components/namespace/nsdump.c stable/10/sys/contrib/dev/acpica/components/parser/psopcode.c stable/10/sys/contrib/dev/acpica/components/parser/psopinfo.c stable/10/sys/contrib/dev/acpica/components/resources/rsaddr.c stable/10/sys/contrib/dev/acpica/components/resources/rsdump.c stable/10/sys/contrib/dev/acpica/components/resources/rsdumpinfo.c stable/10/sys/contrib/dev/acpica/components/resources/rsxface.c stable/10/sys/contrib/dev/acpica/components/tables/tbdata.c stable/10/sys/contrib/dev/acpica/components/tables/tbinstal.c stable/10/sys/contrib/dev/acpica/components/tables/tbprint.c stable/10/sys/contrib/dev/acpica/components/tables/tbxfroot.c stable/10/sys/contrib/dev/acpica/components/utilities/utaddress.c stable/10/sys/contrib/dev/acpica/components/utilities/utbuffer.c stable/10/sys/contrib/dev/acpica/components/utilities/utglobal.c stable/10/sys/contrib/dev/acpica/components/utilities/utmisc.c stable/10/sys/contrib/dev/acpica/components/utilities/utosi.c stable/10/sys/contrib/dev/acpica/components/utilities/utprint.c stable/10/sys/contrib/dev/acpica/components/utilities/utstate.c stable/10/sys/contrib/dev/acpica/components/utilities/utuuid.c stable/10/sys/contrib/dev/acpica/include/acdebug.h stable/10/sys/contrib/dev/acpica/include/acdisasm.h stable/10/sys/contrib/dev/acpica/include/acglobal.h stable/10/sys/contrib/dev/acpica/include/aclocal.h stable/10/sys/contrib/dev/acpica/include/acmacros.h stable/10/sys/contrib/dev/acpica/include/acopcode.h stable/10/sys/contrib/dev/acpica/include/acpixf.h stable/10/sys/contrib/dev/acpica/include/acresrc.h stable/10/sys/contrib/dev/acpica/include/acrestyp.h stable/10/sys/contrib/dev/acpica/include/acstruct.h stable/10/sys/contrib/dev/acpica/include/actables.h stable/10/sys/contrib/dev/acpica/include/actbl2.h stable/10/sys/contrib/dev/acpica/include/actypes.h stable/10/sys/contrib/dev/acpica/include/acutils.h stable/10/sys/contrib/dev/acpica/include/amlcode.h stable/10/sys/contrib/dev/acpica/include/platform/acenv.h stable/10/sys/dev/acpica/acpi_pcib_acpi.c stable/10/sys/dev/acpica/acpi_resource.c stable/10/sys/x86/acpica/OsdEnvironment.c Directory Properties: stable/10/ (props changed)
svn commit: r281684 - head/usr.sbin/bluetooth/hccontrol
Author: araujo (ports committer) Date: Sat Apr 18 06:48:03 2015 New Revision: 281684 URL: https://svnweb.freebsd.org/changeset/base/281684 Log: Improve code style(9), no functional changes. Differential Revision:D2320 Reviewed by: takawata Modified: head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c head/usr.sbin/bluetooth/hccontrol/le.c Modified: head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.c == --- head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.cSat Apr 18 06:16:33 2015(r281683) +++ head/usr.sbin/bluetooth/hccontrol/host_controller_baseband.cSat Apr 18 06:48:03 2015(r281684) @@ -1491,7 +1491,7 @@ hci_write_page_scan_mode(int s, int argc static int hci_read_le_host_supported_command(int s, int argc, char **argv) { - ng_hci_read_le_host_supported_rprp; + ng_hci_read_le_host_supported_rp rp; int n; n = sizeof(rp); if (hci_simple_request(s, NG_HCI_OPCODE(NG_HCI_OGF_HC_BASEBAND, @@ -1514,10 +1514,10 @@ hci_read_le_host_supported_command(int s static int hci_write_le_host_supported_command(int s, int argc, char **argv) { - ng_hci_write_le_host_supported_cp cp; - ng_hci_write_le_host_supported_rp rp; + ng_hci_write_le_host_supported_cp cp; + ng_hci_write_le_host_supported_rp rp; - int n; + int n; cp.le_supported_host = 0; cp.simultaneous_le_host = 0; Modified: head/usr.sbin/bluetooth/hccontrol/le.c == --- head/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 18 06:16:33 2015 (r281683) +++ head/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 18 06:48:03 2015 (r281684) @@ -46,6 +46,7 @@ #define L2CAP_SOCKET_CHECKED #include bluetooth.h #include hccontrol.h + static int le_set_scan_param(int s, int argc, char *argv[]); static int le_set_scan_enable(int s, int argc, char *argv[]); static int parse_param(int argc, char *argv[], char *buf, int *len); @@ -56,51 +57,47 @@ static int set_le_event_mask(int s, uint static int set_event_mask(int s, uint64_t mask); static int le_enable(int s, int argc, char *argv[]); -static int le_set_scan_param(int s, int argc, char *argv[]) +static int +le_set_scan_param(int s, int argc, char *argv[]) { int type; int interval; int window; int adrtype; - int policy; + int policy; + int e, n; ng_hci_le_set_scan_parameters_cp cp; ng_hci_le_set_scan_parameters_rp rp; - int e,n; - if(argc != 5){ + if (argc != 5) return USAGE; - } - if(strcmp(argv[0], active)==0){ + if (strcmp(argv[0], active) == 0) type = 1; - }else if (strcmp(argv[0], passive) == 0){ + else if (strcmp(argv[0], passive) == 0) type = 0; - }else{ + else return USAGE; - } interval = (int)(atof(argv[1])/0.625); interval = (interval 4)? 4: interval; window = (int)(atof(argv[2])/0.625); window = (window 4) ? 4 : interval; - if(strcmp(argv[3], public)==0){ + if (strcmp(argv[3], public) == 0) adrtype = 0; - }else if (strcmp(argv[0], random) == 0){ + else if (strcmp(argv[0], random) == 0) adrtype = 1; - }else{ + else return USAGE; - } - if(strcmp(argv[4], all)==0){ + if (strcmp(argv[4], all) == 0) policy = 0; - }else if (strcmp(argv[4], whitelist) == 0){ + else if (strcmp(argv[4], whitelist) == 0) policy = 1; - }else{ + else return USAGE; - } - cp.le_scan_type = type; cp.le_scan_interval = interval; @@ -109,43 +106,42 @@ static int le_set_scan_param(int s, int cp.scanning_filter_policy = policy; n = sizeof(rp); e = hci_request(s, NG_HCI_OPCODE(NG_HCI_OGF_LE, -NG_HCI_OCF_LE_SET_SCAN_PARAMETERS), - (void *)cp, sizeof(cp), (void *)rp, n); - + NG_HCI_OCF_LE_SET_SCAN_PARAMETERS), + (void *)cp, sizeof(cp), (void *)rp, n); return 0; - } - -static int le_set_scan_enable(int s, int argc, char *argv[]) +static int +le_set_scan_enable(int s, int argc, char *argv[]) { ng_hci_le_set_scan_enable_cp cp; ng_hci_le_set_scan_enable_rp rp; - int e,n,enable = 0; + int e, n, enable = 0; - if(argc != 1) + if (argc != 1) return USAGE; - if(strcmp(argv[0], enable) == 0){ + if (strcmp(argv[0], enable) == 0) enable = 1; - }else
svn commit: r281685 - head/usr.sbin/bluetooth/hccontrol
Author: araujo (ports committer) Date: Sat Apr 18 06:53:13 2015 New Revision: 281685 URL: https://svnweb.freebsd.org/changeset/base/281685 Log: Fix misspelling. Modified: head/usr.sbin/bluetooth/hccontrol/le.c Modified: head/usr.sbin/bluetooth/hccontrol/le.c == --- head/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 18 06:48:03 2015 (r281684) +++ head/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 18 06:53:13 2015 (r281685) @@ -232,7 +232,7 @@ le_read_local_supported_features(int s, NG_HCI_OCF_LE_READ_LOCAL_SUPPORTED_FEATURES), (void *)rp, n); - printf(LOCAL SUPPOREDED: %d %d %lu\n, e, rp.status, + printf(LOCAL SUPPORTED: %d %d %lu\n, e, rp.status, rp.le_features); return 0; ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281688 - head/usr.sbin/bluetooth/hccontrol
Author: takawata Date: Sat Apr 18 09:08:47 2015 New Revision: 281688 URL: https://svnweb.freebsd.org/changeset/base/281688 Log: Fix Typo. Modified: head/usr.sbin/bluetooth/hccontrol/le.c Modified: head/usr.sbin/bluetooth/hccontrol/le.c == --- head/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 18 08:01:12 2015 (r281687) +++ head/usr.sbin/bluetooth/hccontrol/le.c Sat Apr 18 09:08:47 2015 (r281688) @@ -247,7 +247,7 @@ le_read_supported_status(int s, int argc e = hci_simple_request(s, NG_HCI_OPCODE( NG_HCI_OGF_LE, - NG_HCI_OCF_LE_READ_SUPPORTED), + NG_HCI_OCF_LE_READ_SUPPORTED_STATUS), (void *)rp, n); printf(LE_STATUS: %d %d %lx\n, e, rp.status, rp.le_status); ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org
svn commit: r281689 - head/sys/compat/linux
Author: trasz Date: Sat Apr 18 09:49:09 2015 New Revision: 281689 URL: https://svnweb.freebsd.org/changeset/base/281689 Log: Remove unused code from linux_mount(), and make it possible to mount any kind of filesystem instead of harcoded three. MFC after:1 month Sponsored by: The FreeBSD Foundation Modified: head/sys/compat/linux/linux_file.c Modified: head/sys/compat/linux/linux_file.c == --- head/sys/compat/linux/linux_file.c Sat Apr 18 09:08:47 2015 (r281688) +++ head/sys/compat/linux/linux_file.c Sat Apr 18 09:49:09 2015 (r281689) @@ -55,10 +55,6 @@ __FBSDID($FreeBSD$); #include security/mac/mac_framework.h -#include ufs/ufs/extattr.h -#include ufs/ufs/quota.h -#include ufs/ufs/ufsmount.h - #ifdef COMPAT_LINUX32 #include machine/../linux32/linux.h #include machine/../linux32/linux32_proto.h @@ -1078,12 +1074,10 @@ linux_pwrite(td, uap) int linux_mount(struct thread *td, struct linux_mount_args *args) { - struct ufs_args ufs; char fstypename[MFSNAMELEN]; char mntonname[MNAMELEN], mntfromname[MNAMELEN]; int error; int fsflags; - void *fsdata; error = copyinstr(args-filesystemtype, fstypename, MFSNAMELEN - 1, NULL); @@ -1104,20 +1098,10 @@ linux_mount(struct thread *td, struct li if (strcmp(fstypename, ext2) == 0) { strcpy(fstypename, ext2fs); - fsdata = ufs; - ufs.fspec = mntfromname; -#define DEFAULT_ROOTID -2 - ufs.export.ex_root = DEFAULT_ROOTID; - ufs.export.ex_flags = - args-rwflag LINUX_MS_RDONLY ? MNT_EXRDONLY : 0; } else if (strcmp(fstypename, proc) == 0) { strcpy(fstypename, linprocfs); - fsdata = NULL; } else if (strcmp(fstypename, vfat) == 0) { strcpy(fstypename, msdosfs); - fsdata = NULL; - } else { - return (ENODEV); } fsflags = 0; @@ -1137,19 +1121,11 @@ linux_mount(struct thread *td, struct li fsflags |= MNT_UPDATE; } - if (strcmp(fstypename, linprocfs) == 0) { - error = kernel_vmount(fsflags, - fstype, fstypename, - fspath, mntonname, - NULL); - } else if (strcmp(fstypename, msdosfs) == 0) { - error = kernel_vmount(fsflags, - fstype, fstypename, - fspath, mntonname, - from, mntfromname, - NULL); - } else - error = EOPNOTSUPP; + error = kernel_vmount(fsflags, + fstype, fstypename, + fspath, mntonname, + from, mntfromname, + NULL); return (error); } ___ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to svn-src-all-unsubscr...@freebsd.org