From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 00:24:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 075BC1065670; Sun, 18 Jul 2010 00:24:02 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EB46F8FC18; Sun, 18 Jul 2010 00:24:01 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I0O1up084231; Sun, 18 Jul 2010 00:24:01 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I0O1rC084228; Sun, 18 Jul 2010 00:24:01 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007180024.o6I0O1rC084228@svn.freebsd.org> From: Rick Macklem Date: Sun, 18 Jul 2010 00:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210201 - in head/sys/fs: nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 00:24:02 -0000 Author: rmacklem Date: Sun Jul 18 00:24:01 2010 New Revision: 210201 URL: http://svn.freebsd.org/changeset/base/210201 Log: Change the nfscl_mustflush() function in the experimental NFSv4 client to return a boolean_t in order to make it more compatible with style(9). MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_var.h head/sys/fs/nfsclient/nfs_clstate.c head/sys/fs/nfsclient/nfs_clsubs.c Modified: head/sys/fs/nfs/nfs_var.h ============================================================================== --- head/sys/fs/nfs/nfs_var.h Sat Jul 17 18:35:39 2010 (r210200) +++ head/sys/fs/nfs/nfs_var.h Sun Jul 18 00:24:01 2010 (r210201) @@ -467,7 +467,7 @@ void nfscl_docb(struct nfsrv_descript *, void nfscl_releasealllocks(struct nfsclclient *, vnode_t, NFSPROC_T *); int nfscl_lockt(vnode_t, struct nfsclclient *, u_int64_t, u_int64_t, struct flock *, NFSPROC_T *); -int nfscl_mustflush(vnode_t); +boolean_t nfscl_mustflush(vnode_t); int nfscl_nodeleg(vnode_t, int); int nfscl_removedeleg(vnode_t, NFSPROC_T *, nfsv4stateid_t *); int nfscl_getref(struct nfsmount *); Modified: head/sys/fs/nfsclient/nfs_clstate.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clstate.c Sat Jul 17 18:35:39 2010 (r210200) +++ head/sys/fs/nfsclient/nfs_clstate.c Sun Jul 18 00:24:01 2010 (r210201) @@ -3735,7 +3735,7 @@ nfscl_tryclose(struct nfsclopen *op, str * to the server. This might be a big performance win in some environments. * (Not useful until the client does caching on local stable storage.) */ -APPLESTATIC int +APPLESTATIC boolean_t nfscl_mustflush(vnode_t vp) { struct nfsclclient *clp; @@ -3746,12 +3746,12 @@ nfscl_mustflush(vnode_t vp) np = VTONFS(vp); nmp = VFSTONFS(vnode_mount(vp)); if (!NFSHASNFSV4(nmp)) - return (1); + return (TRUE); NFSLOCKCLSTATE(); clp = nfscl_findcl(nmp); if (clp == NULL) { NFSUNLOCKCLSTATE(); - return (1); + return (TRUE); } dp = nfscl_finddeleg(clp, np->n_fhp->nfh_fh, np->n_fhp->nfh_len); if (dp != NULL && (dp->nfsdl_flags & (NFSCLDL_WRITE | NFSCLDL_RECALL)) @@ -3759,10 +3759,10 @@ nfscl_mustflush(vnode_t vp) (dp->nfsdl_sizelimit >= np->n_size || !NFSHASSTRICT3530(nmp))) { NFSUNLOCKCLSTATE(); - return (0); + return (FALSE); } NFSUNLOCKCLSTATE(); - return (1); + return (TRUE); } /* Modified: head/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clsubs.c Sat Jul 17 18:35:39 2010 (r210200) +++ head/sys/fs/nfsclient/nfs_clsubs.c Sun Jul 18 00:24:01 2010 (r210201) @@ -188,7 +188,8 @@ ncl_getattrcache(struct vnode *vp, struc struct nfsnode *np; struct vattr *vap; struct nfsmount *nmp; - int timeo, mustflush; + int timeo; + boolean_t mustflush; np = VTONFS(vp); vap = &np->n_vattr.na_vattr; @@ -230,7 +231,7 @@ ncl_getattrcache(struct vnode *vp, struc #endif if ((time_second - np->n_attrstamp) >= timeo && - (mustflush != 0 || np->n_attrstamp == 0)) { + (mustflush || np->n_attrstamp == 0)) { newnfsstats.attrcache_misses++; mtx_unlock(&np->n_mtx); #ifdef NFS_ACDEBUG From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 05:09:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33CD7106564A; Sun, 18 Jul 2010 05:09:11 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 21A8B8FC08; Sun, 18 Jul 2010 05:09:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I59BI7049828; Sun, 18 Jul 2010 05:09:11 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I59B6B049826; Sun, 18 Jul 2010 05:09:11 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007180509.o6I59B6B049826@svn.freebsd.org> From: Lawrence Stewart Date: Sun, 18 Jul 2010 05:09:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210203 - head/sys/netinet X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 05:09:11 -0000 Author: lstewart Date: Sun Jul 18 05:09:10 2010 New Revision: 210203 URL: http://svn.freebsd.org/changeset/base/210203 Log: - Move common code from the hook functions that fills in a packet node struct to a separate inline function. This further reduces duplicate code that didn't have a good reason to stay as it was. - Reorder the malloc of a pkt_node struct in the hook functions such that it only occurs if we managed to find a usable tcpcb associated with the packet. - Make the inp_locally_locked variable's type consistent with the prototype of siftr_siftdata(). Sponsored by: FreeBSD Foundation Modified: head/sys/netinet/siftr.c Modified: head/sys/netinet/siftr.c ============================================================================== --- head/sys/netinet/siftr.c Sun Jul 18 04:27:39 2010 (r210202) +++ head/sys/netinet/siftr.c Sun Jul 18 05:09:10 2010 (r210203) @@ -746,6 +746,67 @@ siftr_findinpcb(int ipver, struct ip *ip } +static inline void +siftr_siftdata(struct pkt_node *pn, struct inpcb *inp, struct tcpcb *tp, + int ipver, int dir, int inp_locally_locked) +{ +#ifdef SIFTR_IPV6 + if (ipver == INP_IPV4) { + pn->ip_laddr[3] = inp->inp_laddr.s_addr; + pn->ip_faddr[3] = inp->inp_faddr.s_addr; +#else + *((uint32_t *)pn->ip_laddr) = inp->inp_laddr.s_addr; + *((uint32_t *)pn->ip_faddr) = inp->inp_faddr.s_addr; +#endif +#ifdef SIFTR_IPV6 + } else { + pn->ip_laddr[0] = inp->in6p_laddr.s6_addr32[0]; + pn->ip_laddr[1] = inp->in6p_laddr.s6_addr32[1]; + pn->ip_laddr[2] = inp->in6p_laddr.s6_addr32[2]; + pn->ip_laddr[3] = inp->in6p_laddr.s6_addr32[3]; + pn->ip_faddr[0] = inp->in6p_faddr.s6_addr32[0]; + pn->ip_faddr[1] = inp->in6p_faddr.s6_addr32[1]; + pn->ip_faddr[2] = inp->in6p_faddr.s6_addr32[2]; + pn->ip_faddr[3] = inp->in6p_faddr.s6_addr32[3]; + } +#endif + pn->tcp_localport = inp->inp_lport; + pn->tcp_foreignport = inp->inp_fport; + pn->snd_cwnd = tp->snd_cwnd; + pn->snd_wnd = tp->snd_wnd; + pn->rcv_wnd = tp->rcv_wnd; + pn->snd_bwnd = tp->snd_bwnd; + pn->snd_ssthresh = tp->snd_ssthresh; + pn->snd_scale = tp->snd_scale; + pn->rcv_scale = tp->rcv_scale; + pn->conn_state = tp->t_state; + pn->max_seg_size = tp->t_maxseg; + pn->smoothed_rtt = tp->t_srtt; + pn->sack_enabled = (tp->t_flags & TF_SACK_PERMIT) != 0; + pn->flags = tp->t_flags; + pn->rxt_length = tp->t_rxtcur; + pn->snd_buf_hiwater = inp->inp_socket->so_snd.sb_hiwat; + pn->snd_buf_cc = inp->inp_socket->so_snd.sb_cc; + pn->rcv_buf_hiwater = inp->inp_socket->so_rcv.sb_hiwat; + pn->rcv_buf_cc = inp->inp_socket->so_rcv.sb_cc; + pn->sent_inflight_bytes = tp->snd_max - tp->snd_una; + + /* We've finished accessing the tcb so release the lock. */ + if (inp_locally_locked) + INP_RUNLOCK(inp); + + pn->ipver = ipver; + pn->direction = dir; + + /* + * Significantly more accurate than using getmicrotime(), but slower! + * Gives true microsecond resolution at the expense of a hit to + * maximum pps throughput processing when SIFTR is loaded and enabled. + */ + microtime(&pn->tval); +} + + /* * pfil hook that is called for each IPv4 packet making its way through the * stack in either direction. @@ -758,13 +819,13 @@ static int siftr_chkpkt(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, struct inpcb *inp) { - struct pkt_node *pkt_node; + struct pkt_node *pn; struct ip *ip; struct tcphdr *th; struct tcpcb *tp; struct siftr_stats *ss; unsigned int ip_hl; - uint8_t inp_locally_locked; + int inp_locally_locked; inp_locally_locked = 0; ss = DPCPU_PTR(ss); @@ -818,18 +879,6 @@ siftr_chkpkt(void *arg, struct mbuf **m, INP_LOCK_ASSERT(inp); - pkt_node = malloc(sizeof(struct pkt_node), M_SIFTR_PKTNODE, - M_NOWAIT | M_ZERO); - - if (pkt_node == NULL) { - if (dir == PFIL_IN) - ss->nskip_in_malloc++; - else - ss->nskip_out_malloc++; - - goto inp_unlock; - } - /* Find the TCP control block that corresponds with this packet */ tp = intotcpcb(inp); @@ -844,53 +893,21 @@ siftr_chkpkt(void *arg, struct mbuf **m, else ss->nskip_out_tcpcb++; - free(pkt_node, M_SIFTR_PKTNODE); goto inp_unlock; } - /* Fill in pkt_node data */ -#ifdef SIFTR_IPV6 - pkt_node->ip_laddr[3] = inp->inp_laddr.s_addr; - pkt_node->ip_faddr[3] = inp->inp_faddr.s_addr; -#else - *((uint32_t *)pkt_node->ip_laddr) = inp->inp_laddr.s_addr; - *((uint32_t *)pkt_node->ip_faddr) = inp->inp_faddr.s_addr; -#endif - pkt_node->tcp_localport = inp->inp_lport; - pkt_node->tcp_foreignport = inp->inp_fport; - pkt_node->snd_cwnd = tp->snd_cwnd; - pkt_node->snd_wnd = tp->snd_wnd; - pkt_node->rcv_wnd = tp->rcv_wnd; - pkt_node->snd_bwnd = tp->snd_bwnd; - pkt_node->snd_ssthresh = tp->snd_ssthresh; - pkt_node->snd_scale = tp->snd_scale; - pkt_node->rcv_scale = tp->rcv_scale; - pkt_node->conn_state = tp->t_state; - pkt_node->max_seg_size = tp->t_maxseg; - pkt_node->smoothed_rtt = tp->t_srtt; - pkt_node->sack_enabled = (tp->t_flags & TF_SACK_PERMIT) != 0; - pkt_node->flags = tp->t_flags; - pkt_node->rxt_length = tp->t_rxtcur; - pkt_node->snd_buf_hiwater = inp->inp_socket->so_snd.sb_hiwat; - pkt_node->snd_buf_cc = inp->inp_socket->so_snd.sb_cc; - pkt_node->rcv_buf_hiwater = inp->inp_socket->so_rcv.sb_hiwat; - pkt_node->rcv_buf_cc = inp->inp_socket->so_rcv.sb_cc; - pkt_node->sent_inflight_bytes = tp->snd_max - tp->snd_una; + pn = malloc(sizeof(struct pkt_node), M_SIFTR_PKTNODE, M_NOWAIT|M_ZERO); - /* We've finished accessing the tcb so release the lock. */ - if (inp_locally_locked) - INP_RUNLOCK(inp); + if (pn == NULL) { + if (dir == PFIL_IN) + ss->nskip_in_malloc++; + else + ss->nskip_out_malloc++; - /* These are safe to access without the inp lock. */ - pkt_node->ipver = INP_IPV4; - pkt_node->direction = dir; + goto inp_unlock; + } - /* - * Significantly more accurate than using getmicrotime(), but slower! - * Gives true microsecond resolution at the expense of a hit to - * maximum pps throughput processing when SIFTR is loaded and enabled. - */ - microtime(&(pkt_node->tval)); + siftr_siftdata(pn, inp, tp, INP_IPV4, dir, inp_locally_locked); if (siftr_generate_hashes) { if ((*m)->m_pkthdr.csum_flags & CSUM_TCP) { @@ -950,11 +967,11 @@ siftr_chkpkt(void *arg, struct mbuf **m, * find a way to create the hash and checksum in the same pass * over the bytes. */ - pkt_node->hash = hash_pkt(*m, ip_hl); + pn->hash = hash_pkt(*m, ip_hl); } mtx_lock(&siftr_pkt_queue_mtx); - STAILQ_INSERT_TAIL(&pkt_queue, pkt_node, nodes); + STAILQ_INSERT_TAIL(&pkt_queue, pn, nodes); mtx_unlock(&siftr_pkt_queue_mtx); goto ret; @@ -973,13 +990,13 @@ static int siftr_chkpkt6(void *arg, struct mbuf **m, struct ifnet *ifp, int dir, struct inpcb *inp) { - struct pkt_node *pkt_node; + struct pkt_node *pn; struct ip6_hdr *ip6; struct tcphdr *th; struct tcpcb *tp; struct siftr_stats *ss; unsigned int ip6_hl; - uint8_t inp_locally_locked; + int inp_locally_locked; inp_locally_locked = 0; ss = DPCPU_PTR(ss); @@ -1037,18 +1054,6 @@ siftr_chkpkt6(void *arg, struct mbuf **m inp_locally_locked = 1; } - pkt_node = malloc(sizeof(struct pkt_node), M_SIFTR_PKTNODE, - M_NOWAIT | M_ZERO); - - if (pkt_node == NULL) { - if (dir == PFIL_IN) - ss->nskip_in_malloc++; - else - ss->nskip_out_malloc++; - - goto inp_unlock6; - } - /* Find the TCP control block that corresponds with this packet. */ tp = intotcpcb(inp); @@ -1063,59 +1068,26 @@ siftr_chkpkt6(void *arg, struct mbuf **m else ss->nskip_out_tcpcb++; - free(pkt_node, M_SIFTR_PKTNODE); goto inp_unlock6; } - /* Fill in pkt_node data. */ - pkt_node->ip_laddr[0] = inp->in6p_laddr.s6_addr32[0]; - pkt_node->ip_laddr[1] = inp->in6p_laddr.s6_addr32[1]; - pkt_node->ip_laddr[2] = inp->in6p_laddr.s6_addr32[2]; - pkt_node->ip_laddr[3] = inp->in6p_laddr.s6_addr32[3]; - pkt_node->ip_faddr[0] = inp->in6p_faddr.s6_addr32[0]; - pkt_node->ip_faddr[1] = inp->in6p_faddr.s6_addr32[1]; - pkt_node->ip_faddr[2] = inp->in6p_faddr.s6_addr32[2]; - pkt_node->ip_faddr[3] = inp->in6p_faddr.s6_addr32[3]; - pkt_node->tcp_localport = inp->inp_lport; - pkt_node->tcp_foreignport = inp->inp_fport; - pkt_node->snd_cwnd = tp->snd_cwnd; - pkt_node->snd_wnd = tp->snd_wnd; - pkt_node->rcv_wnd = tp->rcv_wnd; - pkt_node->snd_bwnd = tp->snd_bwnd; - pkt_node->snd_ssthresh = tp->snd_ssthresh; - pkt_node->snd_scale = tp->snd_scale; - pkt_node->rcv_scale = tp->rcv_scale; - pkt_node->conn_state = tp->t_state; - pkt_node->max_seg_size = tp->t_maxseg; - pkt_node->smoothed_rtt = tp->t_srtt; - pkt_node->sack_enabled = (tp->t_flags & TF_SACK_PERMIT) != 0; - pkt_node->flags = tp->t_flags; - pkt_node->rxt_length = tp->t_rxtcur; - pkt_node->snd_buf_hiwater = inp->inp_socket->so_snd.sb_hiwat; - pkt_node->snd_buf_cc = inp->inp_socket->so_snd.sb_cc; - pkt_node->rcv_buf_hiwater = inp->inp_socket->so_rcv.sb_hiwat; - pkt_node->rcv_buf_cc = inp->inp_socket->so_rcv.sb_cc; - pkt_node->sent_inflight_bytes = tp->snd_max - tp->snd_una; + pn = malloc(sizeof(struct pkt_node), M_SIFTR_PKTNODE, M_NOWAIT|M_ZERO); - /* We've finished accessing the tcb so release the lock. */ - if (inp_locally_locked) - INP_RUNLOCK(inp); + if (pn == NULL) { + if (dir == PFIL_IN) + ss->nskip_in_malloc++; + else + ss->nskip_out_malloc++; - /* These are safe to access without the inp lock. */ - pkt_node->ipver = INP_IPV6; - pkt_node->direction = dir; + goto inp_unlock6; + } - /* - * Significantly more accurate than using getmicrotime(), but slower! - * Gives true microsecond resolution at the expense of a hit to - * maximum pps throughput processing when SIFTR is loaded and enabled. - */ - microtime(&(pkt_node->tval)); + siftr_siftdata(pn, inp, tp, INP_IPV6, dir, inp_locally_locked); - /* XXX: Figure out how to do hash calcs for IPv6 */ + /* XXX: Figure out how to generate hashes for IPv6 packets. */ mtx_lock(&siftr_pkt_queue_mtx); - STAILQ_INSERT_TAIL(&pkt_queue, pkt_node, nodes); + STAILQ_INSERT_TAIL(&pkt_queue, pn, nodes); mtx_unlock(&siftr_pkt_queue_mtx); goto ret6; From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 07:11:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A16921065677; Sun, 18 Jul 2010 07:11:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 854D68FC0A; Sun, 18 Jul 2010 07:11:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7B3dV076557; Sun, 18 Jul 2010 07:11:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7B3v9076545; Sun, 18 Jul 2010 07:11:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180711.o6I7B3v9076545@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:11:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210204 - in stable/8/sys/dev/ata: . chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:11:03 -0000 Author: mav Date: Sun Jul 18 07:11:03 2010 New Revision: 210204 URL: http://svn.freebsd.org/changeset/base/210204 Log: MFC r209872: Make hw.ata.ata_dma_check_80pin tunable affect not only device side, but also controller side cable checks. Make respective sysctl writable. PR: kern/143462 Modified: stable/8/sys/dev/ata/ata-all.c stable/8/sys/dev/ata/chipsets/ata-acerlabs.c stable/8/sys/dev/ata/chipsets/ata-amd.c stable/8/sys/dev/ata/chipsets/ata-highpoint.c stable/8/sys/dev/ata/chipsets/ata-intel.c stable/8/sys/dev/ata/chipsets/ata-ite.c stable/8/sys/dev/ata/chipsets/ata-jmicron.c stable/8/sys/dev/ata/chipsets/ata-marvell.c stable/8/sys/dev/ata/chipsets/ata-promise.c stable/8/sys/dev/ata/chipsets/ata-siliconimage.c stable/8/sys/dev/ata/chipsets/ata-sis.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/ata-all.c Sun Jul 18 07:11:03 2010 (r210204) @@ -105,7 +105,7 @@ SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma, C "ATA disk DMA mode control"); TUNABLE_INT("hw.ata.ata_dma_check_80pin", &ata_dma_check_80pin); SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma_check_80pin, - CTLFLAG_RDTUN, &ata_dma_check_80pin, 1, + CTLFLAG_RW, &ata_dma_check_80pin, 1, "Check for 80pin cable before setting ATA DMA mode"); TUNABLE_INT("hw.ata.atapi_dma", &atapi_dma); SYSCTL_INT(_hw_ata, OID_AUTO, atapi_dma, CTLFLAG_RDTUN, &atapi_dma, 0, Modified: stable/8/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-acerlabs.c Sun Jul 18 07:11:03 2010 (r210204) @@ -286,7 +286,7 @@ ata_ali_setmode(device_t dev, int target mode = min(mode, ctlr->chip->max_dma); if (ctlr->chip->cfg2 & ALI_NEW && ctlr->chip->chiprev < 0xc7) { - if (mode > ATA_UDMA2 && + if (ata_dma_check_80pin && mode > ATA_UDMA2 && pci_read_config(parent, 0x4a, 1) & (1 << ch->unit)) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; Modified: stable/8/sys/dev/ata/chipsets/ata-amd.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-amd.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-amd.c Sun Jul 18 07:11:03 2010 (r210204) @@ -119,7 +119,7 @@ ata_amd_setmode(device_t dev, int target mode = min(mode, ctlr->chip->max_dma); if (ctlr->chip->cfg1 & AMD_CABLE) { - if (mode > ATA_UDMA2 && + if (ata_dma_check_80pin && mode > ATA_UDMA2 && !(pci_read_config(parent, 0x42, 1) & (1 << devno))) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; Modified: stable/8/sys/dev/ata/chipsets/ata-highpoint.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-highpoint.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-highpoint.c Sun Jul 18 07:11:03 2010 (r210204) @@ -216,7 +216,7 @@ ata_highpoint_check_80pin(device_t dev, res = pci_read_config(parent, 0x5a, 1) & (ch->unit ? 0x1:0x2); pci_write_config(parent, reg, val, 1); - if (mode > ATA_UDMA2 && res) { + if (ata_dma_check_80pin && mode > ATA_UDMA2 && res) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-intel.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-intel.c Sun Jul 18 07:11:03 2010 (r210204) @@ -336,7 +336,8 @@ ata_intel_new_setmode(device_t dev, int u_int8_t utimings[] = { 0x00, 0x01, 0x02, 0x01, 0x02, 0x01, 0x02 }; mode = min(mode, ctlr->chip->max_dma); - if (mode > ATA_UDMA2 && !(reg54 & (0x10 << devno))) { + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + !(reg54 & (0x10 << devno))) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } Modified: stable/8/sys/dev/ata/chipsets/ata-ite.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-ite.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-ite.c Sun Jul 18 07:11:03 2010 (r210204) @@ -139,7 +139,8 @@ ata_ite_821x_setmode(device_t dev, int t mode = min(mode, ctlr->chip->max_dma); /* check the CBLID bits for 80 conductor cable detection */ - if (mode > ATA_UDMA2 && (pci_read_config(parent, 0x40, 2) & + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + (pci_read_config(parent, 0x40, 2) & (ch->unit ? (1<<3) : (1<<2)))) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; @@ -186,7 +187,8 @@ ata_ite_8213_setmode(device_t dev, int t mode = min(mode, ctlr->chip->max_dma); - if (mode > ATA_UDMA2 && !(reg54 & (0x10 << target))) { + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + !(reg54 & (0x10 << target))) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } Modified: stable/8/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-jmicron.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-jmicron.c Sun Jul 18 07:11:03 2010 (r210204) @@ -149,7 +149,8 @@ ata_jmicron_setmode(device_t dev, int ta mode = min(mode, ctlr->chip->max_dma); /* check for 80pin cable present */ - if (mode > ATA_UDMA2 && pci_read_config(dev, 0x40, 1) & 0x08) { + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + pci_read_config(dev, 0x40, 1) & 0x08) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } Modified: stable/8/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-marvell.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-marvell.c Sun Jul 18 07:11:03 2010 (r210204) @@ -188,7 +188,8 @@ ata_marvell_setmode(device_t dev, int ta mode = min(mode, ctlr->chip->max_dma); /* Check for 80pin cable present. */ - if (mode > ATA_UDMA2 && ATA_IDX_INB(ch, ATA_BMDEVSPEC_0) & 0x01) { + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + ATA_IDX_INB(ch, ATA_BMDEVSPEC_0) & 0x01) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-promise.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-promise.c Sun Jul 18 07:11:03 2010 (r210204) @@ -470,7 +470,8 @@ ata_promise_setmode(device_t dev, int ta switch (ctlr->chip->cfg1) { case PR_OLD: case PR_NEW: - if (mode > ATA_UDMA2 && (pci_read_config(parent, 0x50, 2) & + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + (pci_read_config(parent, 0x50, 2) & (ch->unit ? 1 << 11 : 1 << 10))) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; @@ -479,7 +480,7 @@ ata_promise_setmode(device_t dev, int ta case PR_TX: ATA_IDX_OUTB(ch, ATA_BMDEVSPEC_0, 0x0b); - if (mode > ATA_UDMA2 && + if (ata_dma_check_80pin && mode > ATA_UDMA2 && ATA_IDX_INB(ch, ATA_BMDEVSPEC_1) & 0x04) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; @@ -487,7 +488,7 @@ ata_promise_setmode(device_t dev, int ta break; case PR_MIO: - if (mode > ATA_UDMA2 && + if (ata_dma_check_80pin && mode > ATA_UDMA2 && (ATA_INL(ctlr->r_res2, (ctlr->chip->cfg2 & PR_SX4X ? 0x000c0260 : 0x0260) + (ch->unit << 7)) & 0x01000000)) { Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Sun Jul 18 07:11:03 2010 (r210204) @@ -389,7 +389,8 @@ ata_sii_setmode(device_t dev, int target mode = min(mode, ctlr->chip->max_dma); if (ctlr->chip->cfg2 & SII_SETCLK) { - if (mode > ATA_UDMA2 && (pci_read_config(parent, 0x79, 1) & + if (ata_dma_check_80pin && mode > ATA_UDMA2 && + (pci_read_config(parent, 0x79, 1) & (ch->unit ? 0x02 : 0x01))) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; Modified: stable/8/sys/dev/ata/chipsets/ata-sis.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-sis.c Sun Jul 18 05:09:10 2010 (r210203) +++ stable/8/sys/dev/ata/chipsets/ata-sis.c Sun Jul 18 07:11:03 2010 (r210204) @@ -243,13 +243,13 @@ ata_sis_setmode(device_t dev, int target mode = min(mode, ctlr->chip->max_dma); if (ctlr->chip->cfg1 == SIS_133NEW) { - if (mode > ATA_UDMA2 && + if (ata_dma_check_80pin && mode > ATA_UDMA2 && pci_read_config(parent, ch->unit ? 0x52 : 0x50,2) & 0x8000) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; } } else { - if (mode > ATA_UDMA2 && + if (ata_dma_check_80pin && mode > ATA_UDMA2 && pci_read_config(parent, 0x48, 1)&(ch->unit ? 0x20 : 0x10)) { ata_print_cable(dev, "controller"); mode = ATA_UDMA2; From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 07:13:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ABC2106564A; Sun, 18 Jul 2010 07:13:55 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88F208FC17; Sun, 18 Jul 2010 07:13:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7DtoY077246; Sun, 18 Jul 2010 07:13:55 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7DtS4077238; Sun, 18 Jul 2010 07:13:55 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180713.o6I7DtS4077238@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:13:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210205 - stable/8/sys/dev/ata/chipsets X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:13:55 -0000 Author: mav Date: Sun Jul 18 07:13:55 2010 New Revision: 210205 URL: http://svn.freebsd.org/changeset/base/210205 Log: MFC r209884: If ata_sata_phy_reset() failed and ata_generic_reset() is not called, mark channel as having no devices connected. This improves hot-unplug operation on legacy-emulating SATA controllers. Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c stable/8/sys/dev/ata/chipsets/ata-marvell.c stable/8/sys/dev/ata/chipsets/ata-nvidia.c stable/8/sys/dev/ata/chipsets/ata-promise.c stable/8/sys/dev/ata/chipsets/ata-siliconimage.c stable/8/sys/dev/ata/chipsets/ata-sis.c stable/8/sys/dev/ata/chipsets/ata-via.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-intel.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-intel.c Sun Jul 18 07:13:55 2010 (r210205) @@ -554,8 +554,12 @@ ata_intel_31244_tf_write(struct ata_requ static void ata_intel_31244_reset(device_t dev) { + struct ata_channel *ch = device_get_softc(dev); + if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; } ATA_DECLARE_DRIVER(ata_intel); Modified: stable/8/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-marvell.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-marvell.c Sun Jul 18 07:13:55 2010 (r210205) @@ -579,6 +579,8 @@ ata_marvell_edma_reset(device_t dev) /* enable channel and test for devices */ if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; /* enable EDMA machinery */ ATA_OUTL(ctlr->r_res1, 0x02028 + ATA_MV_EDMA_BASE(ch), 0x00000001); Modified: stable/8/sys/dev/ata/chipsets/ata-nvidia.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-nvidia.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-nvidia.c Sun Jul 18 07:13:55 2010 (r210205) @@ -296,8 +296,12 @@ ata_nvidia_status(device_t dev) static void ata_nvidia_reset(device_t dev) { + struct ata_channel *ch = device_get_softc(dev); + if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; } static int Modified: stable/8/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-promise.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-promise.c Sun Jul 18 07:13:55 2010 (r210205) @@ -744,6 +744,8 @@ ata_promise_mio_reset(device_t dev) if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; /* reset and enable plug/unplug intr */ ATA_OUTL(ctlr->r_res2, 0x06c, (0x00000011 << ch->unit)); Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Sun Jul 18 07:13:55 2010 (r210205) @@ -364,8 +364,12 @@ ata_sii_status(device_t dev) static void ata_sii_reset(device_t dev) { + struct ata_channel *ch = device_get_softc(dev); + if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; } static int Modified: stable/8/sys/dev/ata/chipsets/ata-sis.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-sis.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-sis.c Sun Jul 18 07:13:55 2010 (r210205) @@ -228,8 +228,12 @@ ata_sis_ch_attach(device_t dev) static void ata_sis_reset(device_t dev) { + struct ata_channel *ch = device_get_softc(dev); + if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; } static int Modified: stable/8/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- stable/8/sys/dev/ata/chipsets/ata-via.c Sun Jul 18 07:11:03 2010 (r210204) +++ stable/8/sys/dev/ata/chipsets/ata-via.c Sun Jul 18 07:13:55 2010 (r210205) @@ -290,9 +290,12 @@ ata_via_reset(device_t dev) if ((ctlr->chip->cfg2 & VIABAR) && (ch->unit > 1)) ata_generic_reset(dev); - else + else { if (ata_sata_phy_reset(dev, -1, 1)) ata_generic_reset(dev); + else + ch->devices = 0; + } } static int From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 07:15:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F114106566B; Sun, 18 Jul 2010 07:15:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DB338FC16; Sun, 18 Jul 2010 07:15:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7Fb02077670; Sun, 18 Jul 2010 07:15:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7FbIP077668; Sun, 18 Jul 2010 07:15:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180715.o6I7FbIP077668@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:15:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210206 - stable/8/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:15:37 -0000 Author: mav Date: Sun Jul 18 07:15:37 2010 New Revision: 210206 URL: http://svn.freebsd.org/changeset/base/210206 Log: MFC r209977: Disable multi-sector PIO transfers if ATA_SET_MULTI command failed. Modified: stable/8/sys/dev/ata/ata-disk.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-disk.c ============================================================================== --- stable/8/sys/dev/ata/ata-disk.c Sun Jul 18 07:13:55 2010 (r210205) +++ stable/8/sys/dev/ata/ata-disk.c Sun Jul 18 07:15:37 2010 (r210206) @@ -405,6 +405,8 @@ ad_init(device_t dev) if (!ata_controlcmd(dev, ATA_SET_MULTI, 0, 0, secsperint)) atadev->max_iosize = secsperint * DEV_BSIZE; + else + atadev->max_iosize = DEV_BSIZE; } else atadev->max_iosize = DEV_BSIZE; From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 07:19:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3561A106566C; Sun, 18 Jul 2010 07:19:24 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A24E8FC0A; Sun, 18 Jul 2010 07:19:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7JNs0078581; Sun, 18 Jul 2010 07:19:23 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7JN1K078578; Sun, 18 Jul 2010 07:19:23 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007180719.o6I7JN1K078578@svn.freebsd.org> From: Bernhard Schmidt Date: Sun, 18 Jul 2010 07:19:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210207 - stable/8/sys/dev/iwn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:19:24 -0000 Author: bschmidt Date: Sun Jul 18 07:19:23 2010 New Revision: 210207 URL: http://svn.freebsd.org/changeset/base/210207 Log: MFC r210107,r210108: - Remove duplicate vendor:device entry. - Fix some small whitespace nits. Modified: stable/8/sys/dev/iwn/if_iwn.c stable/8/sys/dev/iwn/if_iwnvar.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/iwn/if_iwn.c ============================================================================== --- stable/8/sys/dev/iwn/if_iwn.c Sun Jul 18 07:15:37 2010 (r210206) +++ stable/8/sys/dev/iwn/if_iwn.c Sun Jul 18 07:19:23 2010 (r210207) @@ -310,7 +310,6 @@ static const struct iwn_ident iwn_ident_ { 0x8086, 0x423D, "Intel(R) PRO/Wireless 5150" }, { 0x8086, 0x4235, "Intel(R) PRO/Wireless 5300" }, { 0x8086, 0x4236, "Intel(R) PRO/Wireless 5300" }, - { 0x8086, 0x4236, "Intel(R) PRO/Wireless 5350" }, { 0x8086, 0x423A, "Intel(R) PRO/Wireless 5350" }, { 0x8086, 0x423B, "Intel(R) PRO/Wireless 5350" }, { 0x8086, 0x0083, "Intel(R) PRO/Wireless 1000" }, @@ -1666,7 +1665,7 @@ iwn5000_read_eeprom(struct iwn_softc *sc DPRINTF(sc, IWN_DEBUG_CALIBRATE, "%s: calib version=%u pa type=%u voltage=%u\n", __func__, hdr.version, hdr.pa_type, le16toh(hdr.volt)); - sc->calib_ver = hdr.version; + sc->calib_ver = hdr.version; if (sc->hw_type == IWN_HW_REV_TYPE_5150) { /* Compute temperature offset. */ @@ -5868,9 +5867,9 @@ iwn5000_nic_config(struct iwn_softc *sc) /* Use internal power amplifier only. */ IWN_WRITE(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_RADIO_2X2_IPA); } - if (sc->hw_type == IWN_HW_REV_TYPE_6050 && sc->calib_ver >= 6) { - /* Indicate that ROM calibration version is >=6. */ - IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_CALIB_VER6); + if (sc->hw_type == IWN_HW_REV_TYPE_6050 && sc->calib_ver >= 6) { + /* Indicate that ROM calibration version is >=6. */ + IWN_SETBITS(sc, IWN_GP_DRIVER, IWN_GP_DRIVER_CALIB_VER6); } return 0; } Modified: stable/8/sys/dev/iwn/if_iwnvar.h ============================================================================== --- stable/8/sys/dev/iwn/if_iwnvar.h Sun Jul 18 07:15:37 2010 (r210206) +++ stable/8/sys/dev/iwn/if_iwnvar.h Sun Jul 18 07:19:23 2010 (r210207) @@ -307,7 +307,7 @@ struct iwn_softc { #define IWN_LOCK_INIT(_sc) \ mtx_init(&(_sc)->sc_mtx, device_get_nameunit((_sc)->sc_dev), \ - MTX_NETWORK_LOCK, MTX_DEF) + MTX_NETWORK_LOCK, MTX_DEF) #define IWN_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) #define IWN_LOCK_ASSERT(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) #define IWN_UNLOCK(_sc) mtx_unlock(&(_sc)->sc_mtx) From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 07:23:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5A581065674; Sun, 18 Jul 2010 07:23:00 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BAAEC8FC13; Sun, 18 Jul 2010 07:23:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7N0RZ079423; Sun, 18 Jul 2010 07:23:00 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7N0Ys079421; Sun, 18 Jul 2010 07:23:00 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180723.o6I7N0Ys079421@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:23:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210208 - stable/8/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:23:01 -0000 Author: mav Date: Sun Jul 18 07:23:00 2010 New Revision: 210208 URL: http://svn.freebsd.org/changeset/base/210208 Log: MFC r209883, r209944: Make interrupt handler check that CAM bus initialization completed before touching it. It fixes possible panic during controller attach in ATA_CAM mode. While there, slightly improve attach errors handling. Modified: stable/8/sys/dev/ata/ata-all.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-all.c ============================================================================== --- stable/8/sys/dev/ata/ata-all.c Sun Jul 18 07:19:23 2010 (r210207) +++ stable/8/sys/dev/ata/ata-all.c Sun Jul 18 07:23:00 2010 (r210208) @@ -195,6 +195,7 @@ ata_attach(device_t dev) } if ((error = bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, NULL, ata_interrupt, ch, &ch->ih))) { + bus_release_resource(dev, SYS_RES_IRQ, rid, ch->r_irq); device_printf(dev, "unable to setup interrupt\n"); return error; } @@ -218,8 +219,9 @@ ata_attach(device_t dev) device_get_unit(dev), &ch->state_mtx, 1, 0, devq); if (ch->sim == NULL) { device_printf(dev, "unable to allocate sim\n"); + cam_simq_free(devq); error = ENOMEM; - goto err2; + goto err1; } if (xpt_bus_register(ch->sim, dev, 0) != CAM_SUCCESS) { device_printf(dev, "unable to register xpt bus\n"); @@ -239,8 +241,9 @@ err3: xpt_bus_deregister(cam_sim_path(ch->sim)); err2: cam_sim_free(ch->sim, /*free_devq*/TRUE); + ch->sim = NULL; err1: - bus_release_resource(dev, SYS_RES_IRQ, ATA_IRQ_RID, ch->r_irq); + bus_release_resource(dev, SYS_RES_IRQ, rid, ch->r_irq); mtx_unlock(&ch->state_mtx); return (error); #endif @@ -281,6 +284,7 @@ ata_detach(device_t dev) xpt_free_path(ch->path); xpt_bus_deregister(cam_sim_path(ch->sim)); cam_sim_free(ch->sim, /*free_devq*/TRUE); + ch->sim = NULL; mtx_unlock(&ch->state_mtx); #endif @@ -307,9 +311,12 @@ ata_conn_event(void *context, int dummy) union ccb *ccb; mtx_lock(&ch->state_mtx); + if (ch->sim == NULL) { + mtx_unlock(&ch->state_mtx); + return; + } ata_reinit(dev); - mtx_unlock(&ch->state_mtx); - if ((ccb = xpt_alloc_ccb()) == NULL) + if ((ccb = xpt_alloc_ccb_nowait()) == NULL) return; if (xpt_create_path(&ccb->ccb_h.path, NULL, cam_sim_path(ch->sim), @@ -318,6 +325,7 @@ ata_conn_event(void *context, int dummy) return; } xpt_rescan(ccb); + mtx_unlock(&ch->state_mtx); #else ata_reinit(dev); #endif From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 07:29:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5E40106566B; Sun, 18 Jul 2010 07:29:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D47F18FC12; Sun, 18 Jul 2010 07:29:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7Tbf6081007; Sun, 18 Jul 2010 07:29:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7TbvQ081005; Sun, 18 Jul 2010 07:29:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180729.o6I7TbvQ081005@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:29:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210209 - stable/8/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:29:38 -0000 Author: mav Date: Sun Jul 18 07:29:37 2010 New Revision: 210209 URL: http://svn.freebsd.org/changeset/base/210209 Log: MFC r208819: Fix double free on error. Modified: stable/8/sys/cam/ata/ata_pmp.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/8/sys/cam/ata/ata_pmp.c Sun Jul 18 07:23:00 2010 (r210208) +++ stable/8/sys/cam/ata/ata_pmp.c Sun Jul 18 07:29:37 2010 (r210209) @@ -737,10 +737,8 @@ pmpdone(struct cam_periph *periph, union if (xpt_create_path(&dpath, periph, xpt_path_path_id(periph->path), i, 0) != CAM_REQ_CMP) { - printf("pmpdone: xpt_create_path failed" - ", bus scan halted\n"); - xpt_free_ccb(done_ccb); - goto done; + printf("pmpdone: xpt_create_path failed\n"); + continue; } /* If we did hard reset to this device, inform XPT. */ if ((softc->reset & softc->found & (1 << i)) != 0) From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 07:31:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B4F49106564A; Sun, 18 Jul 2010 07:31:25 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A3C568FC12; Sun, 18 Jul 2010 07:31:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7VPaJ081452; Sun, 18 Jul 2010 07:31:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7VPtl081450; Sun, 18 Jul 2010 07:31:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180731.o6I7VPtl081450@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:31:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210210 - stable/8/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:31:25 -0000 Author: mav Date: Sun Jul 18 07:31:25 2010 New Revision: 210210 URL: http://svn.freebsd.org/changeset/base/210210 Log: MFC r208823: Add allocation error handling. Modified: stable/8/sys/cam/ata/ata_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sun Jul 18 07:29:37 2010 (r210209) +++ stable/8/sys/cam/ata/ata_xpt.c Sun Jul 18 07:31:25 2010 (r210210) @@ -1209,6 +1209,12 @@ ata_scan_bus(struct cam_periph *periph, !(work_ccb->cpi.hba_misc & PIM_NOBUSRESET) && !timevalisset(&request_ccb->ccb_h.path->bus->last_reset)) { reset_ccb = xpt_alloc_ccb_nowait(); + if (reset_ccb == NULL) { + request_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; + xpt_free_ccb(work_ccb); + xpt_done(request_ccb); + return; + } xpt_setup_ccb(&reset_ccb->ccb_h, request_ccb->ccb_h.path, CAM_PRIORITY_NONE); reset_ccb->ccb_h.func_code = XPT_RESET_BUS; @@ -1228,6 +1234,7 @@ ata_scan_bus(struct cam_periph *periph, malloc(sizeof(ata_scan_bus_info), M_CAMXPT, M_NOWAIT); if (scan_info == NULL) { request_ccb->ccb_h.status = CAM_RESRC_UNAVAIL; + xpt_free_ccb(work_ccb); xpt_done(request_ccb); return; } From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 07:34:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56DAA106564A; Sun, 18 Jul 2010 07:34:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2C2698FC17; Sun, 18 Jul 2010 07:34:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7YNSN082130; Sun, 18 Jul 2010 07:34:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7YN0H082128; Sun, 18 Jul 2010 07:34:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180734.o6I7YN0H082128@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210211 - stable/8/sys/cam/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:34:23 -0000 Author: mav Date: Sun Jul 18 07:34:20 2010 New Revision: 210211 URL: http://svn.freebsd.org/changeset/base/210211 Log: MFC r209744: ATA device reset starts probe sequence from the beginning. If reset caused by timeout/error of one of probe commands, process may continue infinitely. Make CAM ATA more robust to faulty devices and false positive detections, abort probe after two restarts on timeouts or ten on other errors. Modified: stable/8/sys/cam/ata/ata_xpt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/8/sys/cam/ata/ata_xpt.c Sun Jul 18 07:31:25 2010 (r210210) +++ stable/8/sys/cam/ata/ata_xpt.c Sun Jul 18 07:34:20 2010 (r210211) @@ -134,6 +134,7 @@ typedef struct { uint32_t pm_prv; int restart; int spinup; + int faults; u_int caps; struct cam_periph *periph; } probe_softc; @@ -738,14 +739,28 @@ probedone(struct cam_periph *periph, uni ident_buf = &path->device->ident_data; if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { -device_fail: if ((!softc->restart) && - cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) { + if (softc->restart) { + if (bootverbose) { + cam_error_print(done_ccb, + CAM_ESF_ALL, CAM_EPF_ALL); + } + } else if (cam_periph_error(done_ccb, 0, 0, NULL) == ERESTART) return; - } else if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { + if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) { /* Don't wedge the queue */ xpt_release_devq(done_ccb->ccb_h.path, /*count*/1, /*run_queue*/TRUE); } + if (softc->restart) { + softc->faults++; + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) == + CAM_CMD_TIMEOUT) + softc->faults += 4; + if (softc->faults < 10) + goto done; + else + softc->restart = 0; + } else /* Old PIO2 devices may not support mode setting. */ if (softc->action == PROBE_SETMODE && ata_max_pmode(ident_buf) <= ATA_PIO2 && @@ -761,7 +776,7 @@ device_fail: if ((!softc->restart) && * already marked unconfigured, notify the peripheral * drivers that this device is no more. */ - if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0) +device_fail: if ((path->device->flags & CAM_DEV_UNCONFIGURED) == 0) xpt_async(AC_LOST_DEVICE, path, NULL); found = 0; goto done; From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 07:42:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B31F106564A; Sun, 18 Jul 2010 07:42:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 696348FC12; Sun, 18 Jul 2010 07:42:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7gsLI084084; Sun, 18 Jul 2010 07:42:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7gsuE084082; Sun, 18 Jul 2010 07:42:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007180742.o6I7gsuE084082@svn.freebsd.org> From: Alexander Motin Date: Sun, 18 Jul 2010 07:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210212 - stable/8/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:42:54 -0000 Author: mav Date: Sun Jul 18 07:42:54 2010 New Revision: 210212 URL: http://svn.freebsd.org/changeset/base/210212 Log: MFC r209664: Add ata(4) ability to limit initial ATA mode for devices via device hints. After boot this mode can be changed with atacontrol/camcontrol as usual. It works for both legacy and ATA_CAM wrapper mode. Modified: stable/8/share/man/man4/ata.4 Directory Properties: stable/8/share/man/man4/ (props changed) Modified: stable/8/share/man/man4/ata.4 ============================================================================== --- stable/8/share/man/man4/ata.4 Sun Jul 18 07:34:20 2010 (r210211) +++ stable/8/share/man/man4/ata.4 Sun Jul 18 07:42:54 2010 (r210212) @@ -27,7 +27,7 @@ .\" .\" $FreeBSD$ .\" -.Dd March 3, 2010 +.Dd July 3, 2010 .Dt ATA 4 .Os .Sh NAME @@ -103,6 +103,10 @@ can cause data loss on power failures an .It Va hint.atapci.X.msi set to 1 to allow Message Signalled Interrupts (MSI) to be used by specified PCI ATA controller, if supported. +.It Va hint.ata.X.devX.mode +limits initial ATA mode for specified device on specified channel. +.It Va hint.ata.X.mode +limits initial ATA mode for every device on specified channel. .It Va hint.ata.X.pm_level controls SATA interface Power Management for specified channel, allowing to save some power by the cost of additional command latency. From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 07:55:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 031601065675; Sun, 18 Jul 2010 07:55:23 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E68F48FC0A; Sun, 18 Jul 2010 07:55:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7tMWW086919; Sun, 18 Jul 2010 07:55:22 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7tMVf086917; Sun, 18 Jul 2010 07:55:22 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007180755.o6I7tMVf086917@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 18 Jul 2010 07:55:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210213 - head/sys/fs/unionfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:55:23 -0000 Author: trasz Date: Sun Jul 18 07:55:22 2010 New Revision: 210213 URL: http://svn.freebsd.org/changeset/base/210213 Log: Fix build. Submitted by: Andreas Tobler Modified: head/sys/fs/unionfs/union_subr.c Modified: head/sys/fs/unionfs/union_subr.c ============================================================================== --- head/sys/fs/unionfs/union_subr.c Sun Jul 18 07:42:54 2010 (r210212) +++ head/sys/fs/unionfs/union_subr.c Sun Jul 18 07:55:22 2010 (r210213) @@ -50,6 +50,7 @@ #include #include #include +#include #include From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 07:59:55 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E001106566B; Sun, 18 Jul 2010 07:59:55 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52BBD8FC1B; Sun, 18 Jul 2010 07:59:55 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I7xt1r087934; Sun, 18 Jul 2010 07:59:55 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I7xtZn087932; Sun, 18 Jul 2010 07:59:55 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201007180759.o6I7xtZn087932@svn.freebsd.org> From: Martin Matuska Date: Sun, 18 Jul 2010 07:59:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210214 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 07:59:55 -0000 Author: mm Date: Sun Jul 18 07:59:55 2010 New Revision: 210214 URL: http://svn.freebsd.org/changeset/base/210214 Log: MFC r209275: Import latest ARC change from OpenSolaris: - large ghost eviction causes high write latency - arc_adjust might adjust MRU unnecessarily - arc_adapt can lead to wild arc_p adjustment OpenSolaris onnv-revision: 12636:13b5d698941e Submitted by: avg Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6950219, 6953403, 6951024) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Jul 18 07:55:22 2010 (r210213) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Jul 18 07:59:55 2010 (r210214) @@ -1949,8 +1949,9 @@ arc_adjust(void) * Adjust MRU size */ - adjustment = MIN(arc_size - arc_c, - arc_anon->arcs_size + arc_mru->arcs_size + arc_meta_used - arc_p); + adjustment = MIN((int64_t)(arc_size - arc_c), + (int64_t)(arc_anon->arcs_size + arc_mru->arcs_size + arc_meta_used - + arc_p)); if (adjustment > 0 && arc_mru->arcs_lsize[ARC_BUFC_DATA] > 0) { delta = MIN(arc_mru->arcs_lsize[ARC_BUFC_DATA], adjustment); @@ -2271,10 +2272,7 @@ arc_reclaim_thread(void *dummy __unused) arc_no_grow = FALSE; } - if (needfree || - (2 * arc_c < arc_size + - arc_mru_ghost->arcs_size + arc_mfu_ghost->arcs_size)) - arc_adjust(); + arc_adjust(); if (arc_eviction_list != NULL) arc_do_user_evicts(); @@ -2325,6 +2323,7 @@ arc_adapt(int bytes, arc_state_t *state) if (state == arc_mru_ghost) { mult = ((arc_mru_ghost->arcs_size >= arc_mfu_ghost->arcs_size) ? 1 : (arc_mfu_ghost->arcs_size/arc_mru_ghost->arcs_size)); + mult = MIN(mult, 10); /* avoid wild arc_p adjustment */ arc_p = MIN(arc_c - arc_p_min, arc_p + bytes * mult); } else if (state == arc_mfu_ghost) { @@ -2332,6 +2331,7 @@ arc_adapt(int bytes, arc_state_t *state) mult = ((arc_mfu_ghost->arcs_size >= arc_mru_ghost->arcs_size) ? 1 : (arc_mru_ghost->arcs_size/arc_mfu_ghost->arcs_size)); + mult = MIN(mult, 10); delta = MIN(bytes * mult, arc_p); arc_p = MAX(arc_p_min, arc_p - delta); From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 08:34:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 372261065675; Sun, 18 Jul 2010 08:34:45 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2652E8FC14; Sun, 18 Jul 2010 08:34:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I8YjoH095596; Sun, 18 Jul 2010 08:34:45 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I8YjkC095593; Sun, 18 Jul 2010 08:34:45 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201007180834.o6I8YjkC095593@svn.freebsd.org> From: "Simon L. Nielsen" Date: Sun, 18 Jul 2010 08:34:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210215 - head/share/man/man3 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 08:34:45 -0000 Author: simon Date: Sun Jul 18 08:34:44 2010 New Revision: 210215 URL: http://svn.freebsd.org/changeset/base/210215 Log: Cross reference tree(3) and queue(3). MFC after: 1 week Modified: head/share/man/man3/queue.3 head/share/man/man3/tree.3 Modified: head/share/man/man3/queue.3 ============================================================================== --- head/share/man/man3/queue.3 Sun Jul 18 07:59:55 2010 (r210214) +++ head/share/man/man3/queue.3 Sun Jul 18 08:34:44 2010 (r210215) @@ -998,6 +998,8 @@ while (n1 != NULL) { } TAILQ_INIT(&head); .Ed +.Sh SEE ALSO +.Xr tree 3 .Sh HISTORY The .Nm queue Modified: head/share/man/man3/tree.3 ============================================================================== --- head/share/man/man3/tree.3 Sun Jul 18 07:59:55 2010 (r210214) +++ head/share/man/man3/tree.3 Sun Jul 18 08:34:44 2010 (r210215) @@ -497,6 +497,8 @@ and return the pointer to the removed element otherwise they return .Dv NULL to indicate an error. +.Sh SEE ALSO +.Xr queue 3 .Sh AUTHORS The author of the tree macros is .An Niels Provos . From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 08:54:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 81FD4106564A; Sun, 18 Jul 2010 08:54:31 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7174D8FC13; Sun, 18 Jul 2010 08:54:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6I8sVBi099942; Sun, 18 Jul 2010 08:54:31 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6I8sV3R099940; Sun, 18 Jul 2010 08:54:31 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007180854.o6I8sV3R099940@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 18 Jul 2010 08:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210216 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 08:54:31 -0000 Author: trasz Date: Sun Jul 18 08:54:31 2010 New Revision: 210216 URL: http://svn.freebsd.org/changeset/base/210216 Log: Style fix. Modified: head/sys/sys/resource.h Modified: head/sys/sys/resource.h ============================================================================== --- head/sys/sys/resource.h Sun Jul 18 08:34:44 2010 (r210215) +++ head/sys/sys/resource.h Sun Jul 18 08:54:31 2010 (r210216) @@ -92,7 +92,7 @@ struct rusage { #define RLIMIT_NPROC 7 /* number of processes */ #define RLIMIT_NOFILE 8 /* number of open files */ #define RLIMIT_SBSIZE 9 /* maximum size of all socket buffers */ -#define RLIMIT_VMEM 10 /* virtual process size (inclusive of mmap) */ +#define RLIMIT_VMEM 10 /* virtual process size (inclusive of mmap) */ #define RLIMIT_AS RLIMIT_VMEM /* standard name for RLIMIT_VMEM */ #define RLIMIT_NPTS 11 /* pseudo-terminals */ #define RLIMIT_SWAP 12 /* swap used */ From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 10:15:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BE7C1065672; Sun, 18 Jul 2010 10:15:34 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B4328FC08; Sun, 18 Jul 2010 10:15:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6IAFYln018741; Sun, 18 Jul 2010 10:15:34 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6IAFXvK018739; Sun, 18 Jul 2010 10:15:33 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201007181015.o6IAFXvK018739@svn.freebsd.org> From: Ivan Voras Date: Sun, 18 Jul 2010 10:15:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210217 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 10:15:34 -0000 Author: ivoras Date: Sun Jul 18 10:15:33 2010 New Revision: 210217 URL: http://svn.freebsd.org/changeset/base/210217 Log: In keeping with the Age-of-the-fruitbat theme, scale up hirunningspace on machines which can clearly afford the memory. This is a somewhat conservative version of the patch - more fine tuning may be necessary. Idea from: Thread on hackers@ Discussed with: alc Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Sun Jul 18 08:54:31 2010 (r210216) +++ head/sys/kern/vfs_bio.c Sun Jul 18 10:15:33 2010 (r210217) @@ -621,7 +621,9 @@ bufinit(void) lobufspace = hibufspace - MAXBSIZE; lorunningspace = 512 * 1024; - hirunningspace = 1024 * 1024; + hirunningspace = lmin(roundup(hibufspace/64, MAXBSIZE), 16*1024*1024); + if (hirunningspace < 1024 * 1024) + hirunningspace = 1024 * 1024; /* * Limit the amount of malloc memory since it is wired permanently into From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 10:56:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C263E106566C; Sun, 18 Jul 2010 10:56:20 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B0DAC8FC0C; Sun, 18 Jul 2010 10:56:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6IAuKVB027704; Sun, 18 Jul 2010 10:56:20 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6IAuKpp027702; Sun, 18 Jul 2010 10:56:20 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007181056.o6IAuKpp027702@svn.freebsd.org> From: Benedict Reuschling Date: Sun, 18 Jul 2010 10:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210218 - stable/8/sbin/reboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 10:56:20 -0000 Author: bcr (doc committer) Date: Sun Jul 18 10:56:20 2010 New Revision: 210218 URL: http://svn.freebsd.org/changeset/base/210218 Log: MFC r209703: Let boot(8) refer to the uart(4) serial driver, which is the replacement for the obsolete sio(4) driver. PR: docs/144498 Submitted by: Bruce Cran (bruce at cran dot org dot uk) Approved by: marcel Modified: stable/8/sbin/reboot/boot_i386.8 Modified: stable/8/sbin/reboot/boot_i386.8 ============================================================================== --- stable/8/sbin/reboot/boot_i386.8 Sun Jul 18 10:15:33 2010 (r210217) +++ stable/8/sbin/reboot/boot_i386.8 Sun Jul 18 10:56:20 2010 (r210218) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 18, 2005 +.Dd July 4, 2010 .Dt BOOT 8 i386 .Os .Sh NAME @@ -220,14 +220,14 @@ you can use the option to force the kernel to use the serial port as its console device. The serial port driver -.Xr sio 4 +.Xr uart 4 has a flag (0x20) to override this option. If that flag is set, the serial port will always be used as the console, regardless of the .Fl h option described here. See the man page for -.Xr sio 4 +.Xr uart 4 for more details. .It Fl m mute the console to suppress all console input and output during the From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 11:03:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5E31A1065670; Sun, 18 Jul 2010 11:03:32 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CC408FC08; Sun, 18 Jul 2010 11:03:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6IB3WLa029424; Sun, 18 Jul 2010 11:03:32 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6IB3WXD029422; Sun, 18 Jul 2010 11:03:32 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007181103.o6IB3WXD029422@svn.freebsd.org> From: Benedict Reuschling Date: Sun, 18 Jul 2010 11:03:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210219 - stable/7/sbin/reboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 11:03:32 -0000 Author: bcr (doc committer) Date: Sun Jul 18 11:03:32 2010 New Revision: 210219 URL: http://svn.freebsd.org/changeset/base/210219 Log: MFC r209703: Let boot(8) refer to the uart(4) serial driver, which is the replacement for the obsolete sio(4) driver. PR: docs/144498 Submitted by: Bruce Cran (bruce at cran dot org dot uk) Approved by: marcel Modified: stable/7/sbin/reboot/boot_i386.8 Modified: stable/7/sbin/reboot/boot_i386.8 ============================================================================== --- stable/7/sbin/reboot/boot_i386.8 Sun Jul 18 10:56:20 2010 (r210218) +++ stable/7/sbin/reboot/boot_i386.8 Sun Jul 18 11:03:32 2010 (r210219) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 18, 2005 +.Dd July 4, 2010 .Dt BOOT 8 i386 .Os .Sh NAME @@ -220,14 +220,14 @@ you can use the option to force the kernel to use the serial port as its console device. The serial port driver -.Xr sio 4 +.Xr uart 4 has a flag (0x20) to override this option. If that flag is set, the serial port will always be used as the console, regardless of the .Fl h option described here. See the man page for -.Xr sio 4 +.Xr uart 4 for more details. .It Fl m mute the console to suppress all console input and output during the From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 11:13:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B03361065675; Sun, 18 Jul 2010 11:13:36 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F6578FC18; Sun, 18 Jul 2010 11:13:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6IBDaxO031647; Sun, 18 Jul 2010 11:13:36 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6IBDaRq031645; Sun, 18 Jul 2010 11:13:36 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007181113.o6IBDaRq031645@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 18 Jul 2010 11:13:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210220 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 11:13:36 -0000 Author: trasz Date: Sun Jul 18 11:13:36 2010 New Revision: 210220 URL: http://svn.freebsd.org/changeset/base/210220 Log: Style fix - keep the line length below 80 characters. Submitted by: bde@ Modified: head/sys/sys/resource.h Modified: head/sys/sys/resource.h ============================================================================== --- head/sys/sys/resource.h Sun Jul 18 11:03:32 2010 (r210219) +++ head/sys/sys/resource.h Sun Jul 18 11:13:36 2010 (r210220) @@ -92,7 +92,7 @@ struct rusage { #define RLIMIT_NPROC 7 /* number of processes */ #define RLIMIT_NOFILE 8 /* number of open files */ #define RLIMIT_SBSIZE 9 /* maximum size of all socket buffers */ -#define RLIMIT_VMEM 10 /* virtual process size (inclusive of mmap) */ +#define RLIMIT_VMEM 10 /* virtual process size (incl. mmap) */ #define RLIMIT_AS RLIMIT_VMEM /* standard name for RLIMIT_VMEM */ #define RLIMIT_NPTS 11 /* pseudo-terminals */ #define RLIMIT_SWAP 12 /* swap used */ From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 12:45:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 700CE1065670; Sun, 18 Jul 2010 12:45:32 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EA6B8FC1C; Sun, 18 Jul 2010 12:45:32 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6ICjWZf051708; Sun, 18 Jul 2010 12:45:32 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ICjWRJ051706; Sun, 18 Jul 2010 12:45:32 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201007181245.o6ICjWRJ051706@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 18 Jul 2010 12:45:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210221 - in head: bin/sh tools/regression/bin/sh/parser X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 12:45:32 -0000 Author: jilles Date: Sun Jul 18 12:45:31 2010 New Revision: 210221 URL: http://svn.freebsd.org/changeset/base/210221 Log: sh: Allow a background command consisting solely of redirections. Example: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4132F1065677; Sun, 18 Jul 2010 13:53:51 +0000 (UTC) (envelope-from gavin@ury.york.ac.uk) Received: from mail-gw0.york.ac.uk (mail-gw0.york.ac.uk [144.32.128.245]) by mx1.freebsd.org (Postfix) with ESMTP id CF7AC8FC28; Sun, 18 Jul 2010 13:53:50 +0000 (UTC) Received: from ury.york.ac.uk (ury.york.ac.uk [144.32.108.81]) by mail-gw0.york.ac.uk (8.13.6/8.13.6) with ESMTP id o6IDM3aE006386; Sun, 18 Jul 2010 14:22:03 +0100 (BST) Received: from gavin (helo=localhost) by ury.york.ac.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1OaToh-0001JO-LC; Sun, 18 Jul 2010 14:22:03 +0100 Date: Sun, 18 Jul 2010 14:22:03 +0100 (BST) From: Gavin Atkinson X-X-Sender: gavin@ury.york.ac.uk To: Benedict Reuschling In-Reply-To: <201007181103.o6IB3WXD029422@svn.freebsd.org> Message-ID: References: <201007181103.o6IB3WXD029422@svn.freebsd.org> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: X-York-MailScanner: Found to be clean X-York-MailScanner-From: gavin@ury.york.ac.uk Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-7@freebsd.org Subject: Re: svn commit: r210219 - stable/7/sbin/reboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 13:53:51 -0000 On Sun, 18 Jul 2010, Benedict Reuschling wrote: > Author: bcr (doc committer) > Date: Sun Jul 18 11:03:32 2010 > New Revision: 210219 > URL: http://svn.freebsd.org/changeset/base/210219 > > Log: > MFC r209703: > > Let boot(8) refer to the uart(4) serial driver, which is the replacement > for the obsolete sio(4) driver. > > PR: docs/144498 > Submitted by: Bruce Cran (bruce at cran dot org dot uk) > Approved by: marcel > > Modified: > stable/7/sbin/reboot/boot_i386.8 Hmm, sio(4) is still the default on stable/7 - should this be reverted? Gavin From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 14:07:49 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 98B411065686; Sun, 18 Jul 2010 14:07:49 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from mxout0.bln1.prohost.de (mxout0.bln1.prohost.de [213.160.84.46]) by mx1.freebsd.org (Postfix) with ESMTP id 0D2BD8FC0A; Sun, 18 Jul 2010 14:07:48 +0000 (UTC) Received: from Macintosh.local (p4FC77F0E.dip.t-dialin.net [79.199.127.14]) (authenticated bits=0) by mx1.bln1.prohost.de (8.14.1/8.14.1) with ESMTP id o6IE7iQ1028004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Jul 2010 16:07:44 +0200 Message-ID: <4C430AB2.8090405@FreeBSD.org> Date: Sun, 18 Jul 2010 16:07:46 +0200 From: Benedict Reuschling Organization: The FreeBSD Project User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1 MIME-Version: 1.0 To: Gavin Atkinson References: <201007181103.o6IB3WXD029422@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 1.1.1 OpenPGP: id=4A819348 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Null-Tag: 43024fa974ec584590b9f8b809f71ae1 Cc: svn-src-stable@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, svn-src-stable-7@FreeBSD.org Subject: Re: svn commit: r210219 - stable/7/sbin/reboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: bcr@FreeBSD.org List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 14:07:49 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 18.07.10 15:22, schrieb Gavin Atkinson: > On Sun, 18 Jul 2010, Benedict Reuschling wrote: > >> Author: bcr (doc committer) >> Date: Sun Jul 18 11:03:32 2010 >> New Revision: 210219 >> URL: http://svn.freebsd.org/changeset/base/210219 >> >> Log: >> MFC r209703: >> >> Let boot(8) refer to the uart(4) serial driver, which is the replacement >> for the obsolete sio(4) driver. >> >> PR: docs/144498 >> Submitted by: Bruce Cran (bruce at cran dot org dot uk) >> Approved by: marcel >> >> Modified: >> stable/7/sbin/reboot/boot_i386.8 > > Hmm, sio(4) is still the default on stable/7 - should this be reverted? > > Gavin If that is the case, then I guess a revert is probably the best thing to do. Thanks for the hint. Regards Benedict Reuschling Mail: bcr@FreeBSD.org The FreeBSD Documentation Project FreeBSD German Documentation Project - https://doc.bsdgroup.de -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxDCq0ACgkQTSZQLkqBk0hBUQCcDpCMzzyta74sFKPfz7YW7lS6 MDoAoMqTXOU8DxVCqQ7WZnlgxs39Ag+F =bwQU -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 14:52:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E50F106566C; Sun, 18 Jul 2010 14:52:41 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D1128FC1A; Sun, 18 Jul 2010 14:52:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6IEqfqR079534; Sun, 18 Jul 2010 14:52:41 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6IEqfaq079533; Sun, 18 Jul 2010 14:52:41 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007181452.o6IEqfaq079533@svn.freebsd.org> From: Benedict Reuschling Date: Sun, 18 Jul 2010 14:52:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210222 - stable/7/sbin/reboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 14:52:41 -0000 Author: bcr (doc committer) Date: Sun Jul 18 14:52:40 2010 New Revision: 210222 URL: http://svn.freebsd.org/changeset/base/210222 Log: Revert to r172506, because sio(4) is still the default in stable/7. Pointed out by: gavin Modified: stable/7/sbin/reboot/boot_i386.8 Modified: stable/7/sbin/reboot/boot_i386.8 ============================================================================== --- stable/7/sbin/reboot/boot_i386.8 Sun Jul 18 12:45:31 2010 (r210221) +++ stable/7/sbin/reboot/boot_i386.8 Sun Jul 18 14:52:40 2010 (r210222) @@ -36,7 +36,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 4, 2010 +.Dd August 18, 2005 .Dt BOOT 8 i386 .Os .Sh NAME @@ -220,14 +220,14 @@ you can use the option to force the kernel to use the serial port as its console device. The serial port driver -.Xr uart 4 +.Xr sio 4 has a flag (0x20) to override this option. If that flag is set, the serial port will always be used as the console, regardless of the .Fl h option described here. See the man page for -.Xr uart 4 +.Xr sio 4 for more details. .It Fl m mute the console to suppress all console input and output during the From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 15:18:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44CC91065673; Sun, 18 Jul 2010 15:18:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 9045A8FC20; Sun, 18 Jul 2010 15:18:32 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o6IFITMS035384 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Jul 2010 18:18:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o6IFITpr028147; Sun, 18 Jul 2010 18:18:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o6IFITaL028146; Sun, 18 Jul 2010 18:18:29 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 18 Jul 2010 18:18:29 +0300 From: Kostik Belousov To: Benedict Reuschling Message-ID: <20100718151829.GQ2381@deviant.kiev.zoral.com.ua> References: <201007181056.o6IAuKpp027702@svn.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lh55S0yADJsuIVGW" Content-Disposition: inline In-Reply-To: <201007181056.o6IAuKpp027702@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.2 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, svn-src-stable-8@freebsd.org Subject: Re: svn commit: r210218 - stable/8/sbin/reboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 15:18:34 -0000 --lh55S0yADJsuIVGW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jul 18, 2010 at 10:56:20AM +0000, Benedict Reuschling wrote: > Author: bcr (doc committer) > Date: Sun Jul 18 10:56:20 2010 > New Revision: 210218 > URL: http://svn.freebsd.org/changeset/base/210218 >=20 > Log: > MFC r209703: > =20 > Let boot(8) refer to the uart(4) serial driver, which is the replacement > for the obsolete sio(4) driver. > =20 > PR: docs/144498 > Submitted by: Bruce Cran (bruce at cran dot org dot uk) > Approved by: marcel >=20 > Modified: > stable/8/sbin/reboot/boot_i386.8 This commit, as well as accompanying stable/7 commit and reversal, where not merges. Please see http://wiki.freebsd.org/SubversionPrimer/Merging for the proper procedure. --lh55S0yADJsuIVGW Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkxDG0QACgkQC3+MBN1Mb4hLigCfbtv1eADJTBkjynsIeXXTkZJW lPMAoLgVfmKOOYXZOWRQ6P/BssCQW608 =FWv+ -----END PGP SIGNATURE----- --lh55S0yADJsuIVGW-- From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 18:52:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F333D1065676; Sun, 18 Jul 2010 18:52:00 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C7E258FC20; Sun, 18 Jul 2010 18:52:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6IIq0q6032126; Sun, 18 Jul 2010 18:52:00 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6IIq0lo032125; Sun, 18 Jul 2010 18:52:00 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007181852.o6IIq0lo032125@svn.freebsd.org> From: Benedict Reuschling Date: Sun, 18 Jul 2010 18:52:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210223 - stable/8/sbin/reboot X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 18:52:01 -0000 Author: bcr (doc committer) Date: Sun Jul 18 18:52:00 2010 New Revision: 210223 URL: http://svn.freebsd.org/changeset/base/210223 Log: Fix botched mergeinfo in stable/8, caused by my mismerge of r209703. With help from and approved by: kib@ Modified: Directory Properties: stable/8/sbin/reboot/ (props changed) From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 19:29:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18DA810656AB; Sun, 18 Jul 2010 19:29:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 076878FC13; Sun, 18 Jul 2010 19:29:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6IJTC8e040319; Sun, 18 Jul 2010 19:29:12 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6IJTC89040318; Sun, 18 Jul 2010 19:29:12 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007181929.o6IJTC89040318@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 18 Jul 2010 19:29:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210224 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 19:29:13 -0000 Author: trasz Date: Sun Jul 18 19:29:12 2010 New Revision: 210224 URL: http://svn.freebsd.org/changeset/base/210224 Log: Remove outdated comment and move part of it into more applicable place. Modified: head/sys/kern/kern_resource.c head/sys/sys/resourcevar.h Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Sun Jul 18 18:52:00 2010 (r210223) +++ head/sys/kern/kern_resource.c Sun Jul 18 19:29:12 2010 (r210224) @@ -1169,11 +1169,6 @@ lim_rlimit(struct proc *p, int which, st p->p_sysent->sv_fixlimit(rlp, which); } -/* - * Find the uidinfo structure for a uid. This structure is used to - * track the total resource consumption (process count, socket buffer - * size, etc.) for the uid and impose limits. - */ void uihashinit() { Modified: head/sys/sys/resourcevar.h ============================================================================== --- head/sys/sys/resourcevar.h Sun Jul 18 18:52:00 2010 (r210223) +++ head/sys/sys/resourcevar.h Sun Jul 18 19:29:12 2010 (r210224) @@ -80,7 +80,9 @@ struct plimit { }; /*- - * Per uid resource consumption + * Per uid resource consumption. This structure is used to track + * the total resource consumption (process count, socket buffer size, + * etc) for the uid and impose limits. * * Locking guide: * (a) Constant from inception From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 20:23:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DD1E1065675; Sun, 18 Jul 2010 20:23:11 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5B2558FC18; Sun, 18 Jul 2010 20:23:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6IKNBFl052237; Sun, 18 Jul 2010 20:23:11 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6IKNBaU052215; Sun, 18 Jul 2010 20:23:11 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007182023.o6IKNBaU052215@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 18 Jul 2010 20:23:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210225 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 20:23:11 -0000 Author: trasz Date: Sun Jul 18 20:23:10 2010 New Revision: 210225 URL: http://svn.freebsd.org/changeset/base/210225 Log: The "/*-" comment marker is supposed to denote copyrights. Remove non-copyright occurences from sys/sys/ and sys/kern/. Modified: head/sys/kern/init_main.c head/sys/kern/kern_prot.c head/sys/kern/kern_resource.c head/sys/kern/kern_tc.c head/sys/kern/subr_disk.c head/sys/kern/subr_prof.c head/sys/kern/uipc_mbuf.c head/sys/kern/uipc_usrreq.c head/sys/kern/vfs_extattr.c head/sys/sys/cdefs.h head/sys/sys/disk.h head/sys/sys/kthread.h head/sys/sys/mbuf.h head/sys/sys/proc.h head/sys/sys/resourcevar.h head/sys/sys/signal.h head/sys/sys/socketvar.h head/sys/sys/time.h head/sys/sys/timetc.h head/sys/sys/types.h Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/kern/init_main.c Sun Jul 18 20:23:10 2010 (r210225) @@ -539,7 +539,7 @@ proc0_init(void *dummy __unused) vm_map_init(&vmspace0.vm_map, vmspace_pmap(&vmspace0), p->p_sysent->sv_minuser, p->p_sysent->sv_maxuser); - /*- + /* * call the init and ctor for the new thread and proc * we wait to do this until all other structures * are fairly sane. Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/kern/kern_prot.c Sun Jul 18 20:23:10 2010 (r210225) @@ -1316,7 +1316,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_ &see_other_uids, 0, "Unprivileged processes may see subjects/objects with different real uid"); -/*- +/* * Determine if u1 "can see" the subject specified by u2, according to the * 'see_other_uids' policy. * Returns: 0 for permitted, ESRCH otherwise @@ -1375,7 +1375,7 @@ cr_seeothergids(struct ucred *u1, struct return (0); } -/*- +/* * Determine if u1 "can see" the subject specified by u2. * Returns: 0 for permitted, an errno value otherwise * Locks: none @@ -1400,7 +1400,7 @@ cr_cansee(struct ucred *u1, struct ucred return (0); } -/*- +/* * Determine if td "can see" the subject specified by p. * Returns: 0 for permitted, an errno value otherwise * Locks: Sufficient locks to protect p->p_ucred must be held. td really @@ -1431,7 +1431,7 @@ static int conservative_signals = 1; SYSCTL_INT(_security_bsd, OID_AUTO, conservative_signals, CTLFLAG_RW, &conservative_signals, 0, "Unprivileged processes prevented from " "sending certain signals to processes whose credentials have changed"); -/*- +/* * Determine whether cred may deliver the specified signal to proc. * Returns: 0 for permitted, an errno value otherwise. * Locks: A lock must be held for proc. @@ -1507,7 +1507,7 @@ cr_cansignal(struct ucred *cred, struct return (0); } -/*- +/* * Determine whether td may deliver the specified signal to p. * Returns: 0 for permitted, an errno value otherwise * Locks: Sufficient locks to protect various components of td and p @@ -1548,7 +1548,7 @@ p_cansignal(struct thread *td, struct pr return (cr_cansignal(td->td_ucred, p, signum)); } -/*- +/* * Determine whether td may reschedule p. * Returns: 0 for permitted, an errno value otherwise * Locks: Sufficient locks to protect various components of td and p @@ -1600,7 +1600,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, unpr &unprivileged_proc_debug, 0, "Unprivileged processes may use process debugging facilities"); -/*- +/* * Determine whether td may debug p. * Returns: 0 for permitted, an errno value otherwise * Locks: Sufficient locks to protect various components of td and p @@ -1698,7 +1698,7 @@ p_candebug(struct thread *td, struct pro return (0); } -/*- +/* * Determine whether the subject represented by cred can "see" a socket. * Returns: 0 for permitted, ENOENT otherwise. */ @@ -1724,7 +1724,7 @@ cr_canseesocket(struct ucred *cred, stru } #if defined(INET) || defined(INET6) -/*- +/* * Determine whether the subject represented by cred can "see" a socket. * Returns: 0 for permitted, ENOENT otherwise. */ @@ -1751,7 +1751,7 @@ cr_canseeinpcb(struct ucred *cred, struc } #endif -/*- +/* * Determine whether td can wait for the exit of p. * Returns: 0 for permitted, an errno value otherwise * Locks: Sufficient locks to protect various components of td and p @@ -2112,7 +2112,7 @@ setsugid(struct proc *p) p->p_stops = 0; } -/*- +/* * Change a process's effective uid. * Side effects: newcred->cr_uid and newcred->cr_uidinfo will be modified. * References: newcred must be an exclusive credential reference for the @@ -2128,7 +2128,7 @@ change_euid(struct ucred *newcred, struc newcred->cr_uidinfo = euip; } -/*- +/* * Change a process's effective gid. * Side effects: newcred->cr_gid will be modified. * References: newcred must be an exclusive credential reference for the @@ -2141,7 +2141,7 @@ change_egid(struct ucred *newcred, gid_t newcred->cr_groups[0] = egid; } -/*- +/* * Change a process's real uid. * Side effects: newcred->cr_ruid will be updated, newcred->cr_ruidinfo * will be updated, and the old and new cr_ruidinfo proc @@ -2161,7 +2161,7 @@ change_ruid(struct ucred *newcred, struc (void)chgproccnt(newcred->cr_ruidinfo, 1, 0); } -/*- +/* * Change a process's real gid. * Side effects: newcred->cr_rgid will be updated. * References: newcred must be an exclusive credential reference for the @@ -2174,7 +2174,7 @@ change_rgid(struct ucred *newcred, gid_t newcred->cr_rgid = rgid; } -/*- +/* * Change a process's saved uid. * Side effects: newcred->cr_svuid will be updated. * References: newcred must be an exclusive credential reference for the @@ -2187,7 +2187,7 @@ change_svuid(struct ucred *newcred, uid_ newcred->cr_svuid = svuid; } -/*- +/* * Change a process's saved gid. * Side effects: newcred->cr_svgid will be updated. * References: newcred must be an exclusive credential reference for the Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/kern/kern_resource.c Sun Jul 18 20:23:10 2010 (r210225) @@ -1247,7 +1247,7 @@ uihold(uip) refcount_acquire(&uip->ui_ref); } -/*- +/* * Since uidinfo structs have a long lifetime, we use an * opportunistic refcounting scheme to avoid locking the lookup hash * for each release. Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/kern/kern_tc.c Sun Jul 18 20:23:10 2010 (r210225) @@ -484,7 +484,7 @@ tc_windup(void) th->th_offset_count = ncount; } - /*- + /* * Recalculate the scaling factor. We want the number of 1/2^64 * fractions of a second per period of the hardware counter, taking * into account the th_adjustment factor which the NTP PLL/adjtime(2) Modified: head/sys/kern/subr_disk.c ============================================================================== --- head/sys/kern/subr_disk.c Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/kern/subr_disk.c Sun Jul 18 20:23:10 2010 (r210225) @@ -23,7 +23,7 @@ __FBSDID("$FreeBSD$"); #include #include -/*- +/* * Disk error is the preface to plaintive error messages * about failing disk transfers. It prints messages of the form * "hp0g: BLABLABLA cmd=read fsbn 12345 of 12344-12347" Modified: head/sys/kern/subr_prof.c ============================================================================== --- head/sys/kern/subr_prof.c Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/kern/subr_prof.c Sun Jul 18 20:23:10 2010 (r210225) @@ -254,7 +254,7 @@ kmstartup(dummy) mcount_overhead -= empty_loop_time; mexitcount_overhead -= empty_loop_time; - /*- + /* * Profiling overheads are determined by the times between the * following events: * MC1: mcount() is called Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/kern/uipc_mbuf.c Sun Jul 18 20:23:10 2010 (r210225) @@ -161,7 +161,7 @@ m_freem(struct mbuf *mb) mb = m_free(mb); } -/*- +/* * Configure a provided mbuf to refer to the provided external storage * buffer and setup a reference count for said buffer. If the setting * up of the reference count fails, the M_EXT bit will not be set. If Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/kern/uipc_usrreq.c Sun Jul 18 20:23:10 2010 (r210225) @@ -165,7 +165,7 @@ SYSCTL_ULONG(_net_local_seqpacket, OID_A SYSCTL_INT(_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0, "File descriptors in flight."); -/*- +/* * Locking and synchronization: * * Three types of locks exit in the local domain socket implementation: a Modified: head/sys/kern/vfs_extattr.c ============================================================================== --- head/sys/kern/vfs_extattr.c Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/kern/vfs_extattr.c Sun Jul 18 20:23:10 2010 (r210225) @@ -149,7 +149,7 @@ out: return (error); } -/*- +/* * Set a named extended attribute on a file or directory * * Arguments: unlocked vnode "vp", attribute namespace "attrnamespace", @@ -317,7 +317,7 @@ extattr_set_link(td, uap) return (error); } -/*- +/* * Get a named extended attribute on a file or directory * * Arguments: unlocked vnode "vp", attribute namespace "attrnamespace", @@ -638,7 +638,7 @@ extattr_delete_link(td, uap) return(error); } -/*- +/* * Retrieve a list of extended attributes on a file or directory. * * Arguments: unlocked vnode "vp", attribute namespace 'attrnamespace", Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/sys/cdefs.h Sun Jul 18 20:23:10 2010 (r210225) @@ -463,7 +463,7 @@ #define __DEQUALIFY(type, var) ((type)(uintptr_t)(const volatile void *)(var)) #endif -/*- +/* * The following definitions are an extension of the behavior originally * implemented in , but with a different level of granularity. * POSIX.1 requires that the macros we test be defined before any standard @@ -546,7 +546,7 @@ #define __ISO_C_VISIBLE 0 #endif /* _POSIX_C_SOURCE */ #else -/*- +/* * Deal with _ANSI_SOURCE: * If it is defined, and no other compilation environment is explicitly * requested, then define our internal feature-test macros to zero. This Modified: head/sys/sys/disk.h ============================================================================== --- head/sys/sys/disk.h Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/sys/disk.h Sun Jul 18 20:23:10 2010 (r210225) @@ -26,40 +26,40 @@ void disk_err(struct bio *bp, const char #endif #define DIOCGSECTORSIZE _IOR('d', 128, u_int) - /*- + /* * Get the sectorsize of the device in bytes. The sectorsize is the * smallest unit of data which can be transfered from this device. * Usually this is a power of two but it may not be. (ie: CDROM audio) */ #define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */ - /*- + /* * Get the size of the entire device in bytes. This should be a * multiple of the sectorsize. */ #define DIOCGFWSECTORS _IOR('d', 130, u_int) /* Get firmware sectorcount */ - /*- + /* * Get the firmwares notion of number of sectors per track. This * value is mostly used for compatibility with various ill designed * disk label formats. Don't use it unless you have to. */ #define DIOCGFWHEADS _IOR('d', 131, u_int) /* Get firmware headcount */ - /*- + /* * Get the firmwares notion of number of heads per cylinder. This * value is mostly used for compatibility with various ill designed * disk label formats. Don't use it unless you have to. */ #define DIOCSKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */ - /*- + /* * Enable/Disable (the argument is boolean) the device for kernel * core dumps. */ #define DIOCGFRONTSTUFF _IOR('d', 134, off_t) - /*- + /* * Many disk formats have some amount of space reserved at the * start of the disk to hold bootblocks, various disklabels and * similar stuff. This ioctl returns the number of such bytes @@ -67,18 +67,18 @@ void disk_err(struct bio *bp, const char */ #define DIOCGFLUSH _IO('d', 135) /* Flush write cache */ - /*- + /* * Flush write cache of the device. */ #define DIOCGDELETE _IOW('d', 136, off_t[2]) /* Delete data */ - /*- + /* * Mark data on the device as unused. */ #define DISK_IDENT_SIZE 256 #define DIOCGIDENT _IOR('d', 137, char[DISK_IDENT_SIZE]) - /*- + /* * Get the ident of the given provider. Ident is (most of the time) * a uniqe and fixed provider's identifier. Ident's properties are as * follow: @@ -99,19 +99,19 @@ void disk_err(struct bio *bp, const char */ #define DIOCGPROVIDERNAME _IOR('d', 138, char[MAXPATHLEN]) - /*- + /* * Store the provider name, given a device path, in a buffer. The buffer * must be at least MAXPATHLEN bytes long. */ #define DIOCGSTRIPESIZE _IOR('d', 139, off_t) /* Get stripe size in bytes */ - /*- + /* * Get the size of the device's optimal access block in bytes. * This should be a multiple of the sectorsize. */ #define DIOCGSTRIPEOFFSET _IOR('d', 140, off_t) /* Get stripe offset in bytes */ - /*- + /* * Get the offset of the first device's optimal access block in bytes. * This should be a multiple of the sectorsize. */ Modified: head/sys/sys/kthread.h ============================================================================== --- head/sys/sys/kthread.h Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/sys/kthread.h Sun Jul 18 20:23:10 2010 (r210225) @@ -31,7 +31,7 @@ #include -/*- +/* * A kernel process descriptor; used to start "internal" daemons. * * Note: global_procpp may be NULL for no global save area. Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/sys/mbuf.h Sun Jul 18 20:23:10 2010 (r210225) @@ -59,7 +59,7 @@ #define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */ #ifdef _KERNEL -/*- +/* * Macro for type conversion: convert mbuf pointer to data pointer of correct * type: * @@ -827,7 +827,7 @@ struct mbuf *m_split(struct mbuf *, int, struct mbuf *m_uiotombuf(struct uio *, int, int, int, int); struct mbuf *m_unshare(struct mbuf *, int how); -/*- +/* * Network packets may have annotations attached by affixing a list of * "packet tags" to the pkthdr structure. Packet tags are dynamically * allocated semi-opaque data structures that have a fixed header Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/sys/proc.h Sun Jul 18 20:23:10 2010 (r210225) @@ -112,7 +112,7 @@ struct pargs { u_char ar_args[1]; /* Arguments. */ }; -/*- +/* * Description of a process. * * This structure contains the information needed to manage a thread of Modified: head/sys/sys/resourcevar.h ============================================================================== --- head/sys/sys/resourcevar.h Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/sys/resourcevar.h Sun Jul 18 20:23:10 2010 (r210225) @@ -79,7 +79,7 @@ struct plimit { int pl_refcnt; /* number of references */ }; -/*- +/* * Per uid resource consumption. This structure is used to track * the total resource consumption (process count, socket buffer size, * etc) for the uid and impose limits. Modified: head/sys/sys/signal.h ============================================================================== --- head/sys/sys/signal.h Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/sys/signal.h Sun Jul 18 20:23:10 2010 (r210225) @@ -122,7 +122,7 @@ /* #define SIG_CATCH ((__sighandler_t *)2) See signalvar.h */ #define SIG_HOLD ((__sighandler_t *)3) -/*- +/* * Type of a signal handling function. * * Language spec sez signal handlers take exactly one arg, even though we Modified: head/sys/sys/socketvar.h ============================================================================== --- head/sys/sys/socketvar.h Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/sys/socketvar.h Sun Jul 18 20:23:10 2010 (r210225) @@ -57,7 +57,7 @@ typedef u_quad_t so_gen_t; struct socket; -/*- +/* * Locking key to struct socket: * (a) constant after allocation, no locking required. * (b) locked by SOCK_LOCK(so). Modified: head/sys/sys/time.h ============================================================================== --- head/sys/sys/time.h Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/sys/time.h Sun Jul 18 20:23:10 2010 (r210225) @@ -90,7 +90,7 @@ bintime_sub(struct bintime *bt, const st bt->sec -= bt2->sec; } -/*- +/* * Background information: * * When converting between timestamps on parallel timescales of differing Modified: head/sys/sys/timetc.h ============================================================================== --- head/sys/sys/timetc.h Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/sys/timetc.h Sun Jul 18 20:23:10 2010 (r210225) @@ -16,7 +16,7 @@ #error "no user-serviceable parts inside" #endif -/*- +/* * `struct timecounter' is the interface between the hardware which implements * a timecounter and the MI code which uses this to keep track of time. * Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Sun Jul 18 19:29:12 2010 (r210224) +++ head/sys/sys/types.h Sun Jul 18 20:23:10 2010 (r210225) @@ -287,7 +287,7 @@ typedef int boolean_t; typedef struct device *device_t; typedef __intfptr_t intfptr_t; -/*- +/* * XXX this is fixed width for historical reasons. It should have had type * __int_fast32_t. Fixed-width types should not be used unless binary * compatibility is essential. Least-width types should be used even less From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 20:33:59 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id DCA36106564A for ; Sun, 18 Jul 2010 20:33:58 +0000 (UTC) (envelope-from cperciva@freebsd.org) Received: from xps.daemonology.net (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx2.freebsd.org (Postfix) with SMTP id 59A9F1537B7 for ; Sun, 18 Jul 2010 20:33:58 +0000 (UTC) Received: (qmail 74813 invoked from network); 18 Jul 2010 20:33:58 -0000 Received: from unknown (HELO xps.daemonology.net) (127.0.0.1) by localhost with SMTP; 18 Jul 2010 20:33:58 -0000 Message-ID: <4C436535.7000000@freebsd.org> Date: Sun, 18 Jul 2010 13:33:57 -0700 From: Colin Percival User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-US; rv:1.9.1.10) Gecko/20100627 Thunderbird/3.0.5 MIME-Version: 1.0 To: Edward Tomasz Napierala References: <201007182023.o6IKNBaU052215@svn.freebsd.org> In-Reply-To: <201007182023.o6IKNBaU052215@svn.freebsd.org> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r210225 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 20:33:59 -0000 On 07/18/10 13:23, Edward Tomasz Napierala wrote: > Log: > The "/*-" comment marker is supposed to denote copyrights. Remove non-copyright > occurences from sys/sys/ and sys/kern/. The "/*-" comment marker indicates to utilities that comments should not be re-wrapped. Some of the comments you've changed would distinctly suffer if they were re-wrapped, e.g., > -/*- > +/* > * Change a process's real uid. > * Side effects: newcred->cr_ruid will be updated, newcred->cr_ruidinfo > * will be updated, and the old and new cr_ruidinfo proc If you don't want to have "/*-" for these, please change them instead to "/**", since that is an alternative "box comment" marker. -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 20:57:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DC261065672; Sun, 18 Jul 2010 20:57:54 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B04E8FC0A; Sun, 18 Jul 2010 20:57:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6IKvsFG059975; Sun, 18 Jul 2010 20:57:54 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6IKvsJ4059925; Sun, 18 Jul 2010 20:57:54 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007182057.o6IKvsJ4059925@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sun, 18 Jul 2010 20:57:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210226 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 20:57:54 -0000 Author: trasz Date: Sun Jul 18 20:57:53 2010 New Revision: 210226 URL: http://svn.freebsd.org/changeset/base/210226 Log: Revert r210225 - turns out I was wrong; the "/*-" is not license-only thing; it's also used to indicate that the comment should not be automatically rewrapped. Explained by: cperciva@ Modified: head/sys/kern/init_main.c head/sys/kern/kern_prot.c head/sys/kern/kern_resource.c head/sys/kern/kern_tc.c head/sys/kern/subr_disk.c head/sys/kern/subr_prof.c head/sys/kern/uipc_mbuf.c head/sys/kern/uipc_usrreq.c head/sys/kern/vfs_extattr.c head/sys/sys/cdefs.h head/sys/sys/disk.h head/sys/sys/kthread.h head/sys/sys/mbuf.h head/sys/sys/proc.h head/sys/sys/resourcevar.h head/sys/sys/signal.h head/sys/sys/socketvar.h head/sys/sys/time.h head/sys/sys/timetc.h head/sys/sys/types.h Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/kern/init_main.c Sun Jul 18 20:57:53 2010 (r210226) @@ -539,7 +539,7 @@ proc0_init(void *dummy __unused) vm_map_init(&vmspace0.vm_map, vmspace_pmap(&vmspace0), p->p_sysent->sv_minuser, p->p_sysent->sv_maxuser); - /* + /*- * call the init and ctor for the new thread and proc * we wait to do this until all other structures * are fairly sane. Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/kern/kern_prot.c Sun Jul 18 20:57:53 2010 (r210226) @@ -1316,7 +1316,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, see_ &see_other_uids, 0, "Unprivileged processes may see subjects/objects with different real uid"); -/* +/*- * Determine if u1 "can see" the subject specified by u2, according to the * 'see_other_uids' policy. * Returns: 0 for permitted, ESRCH otherwise @@ -1375,7 +1375,7 @@ cr_seeothergids(struct ucred *u1, struct return (0); } -/* +/*- * Determine if u1 "can see" the subject specified by u2. * Returns: 0 for permitted, an errno value otherwise * Locks: none @@ -1400,7 +1400,7 @@ cr_cansee(struct ucred *u1, struct ucred return (0); } -/* +/*- * Determine if td "can see" the subject specified by p. * Returns: 0 for permitted, an errno value otherwise * Locks: Sufficient locks to protect p->p_ucred must be held. td really @@ -1431,7 +1431,7 @@ static int conservative_signals = 1; SYSCTL_INT(_security_bsd, OID_AUTO, conservative_signals, CTLFLAG_RW, &conservative_signals, 0, "Unprivileged processes prevented from " "sending certain signals to processes whose credentials have changed"); -/* +/*- * Determine whether cred may deliver the specified signal to proc. * Returns: 0 for permitted, an errno value otherwise. * Locks: A lock must be held for proc. @@ -1507,7 +1507,7 @@ cr_cansignal(struct ucred *cred, struct return (0); } -/* +/*- * Determine whether td may deliver the specified signal to p. * Returns: 0 for permitted, an errno value otherwise * Locks: Sufficient locks to protect various components of td and p @@ -1548,7 +1548,7 @@ p_cansignal(struct thread *td, struct pr return (cr_cansignal(td->td_ucred, p, signum)); } -/* +/*- * Determine whether td may reschedule p. * Returns: 0 for permitted, an errno value otherwise * Locks: Sufficient locks to protect various components of td and p @@ -1600,7 +1600,7 @@ SYSCTL_INT(_security_bsd, OID_AUTO, unpr &unprivileged_proc_debug, 0, "Unprivileged processes may use process debugging facilities"); -/* +/*- * Determine whether td may debug p. * Returns: 0 for permitted, an errno value otherwise * Locks: Sufficient locks to protect various components of td and p @@ -1698,7 +1698,7 @@ p_candebug(struct thread *td, struct pro return (0); } -/* +/*- * Determine whether the subject represented by cred can "see" a socket. * Returns: 0 for permitted, ENOENT otherwise. */ @@ -1724,7 +1724,7 @@ cr_canseesocket(struct ucred *cred, stru } #if defined(INET) || defined(INET6) -/* +/*- * Determine whether the subject represented by cred can "see" a socket. * Returns: 0 for permitted, ENOENT otherwise. */ @@ -1751,7 +1751,7 @@ cr_canseeinpcb(struct ucred *cred, struc } #endif -/* +/*- * Determine whether td can wait for the exit of p. * Returns: 0 for permitted, an errno value otherwise * Locks: Sufficient locks to protect various components of td and p @@ -2112,7 +2112,7 @@ setsugid(struct proc *p) p->p_stops = 0; } -/* +/*- * Change a process's effective uid. * Side effects: newcred->cr_uid and newcred->cr_uidinfo will be modified. * References: newcred must be an exclusive credential reference for the @@ -2128,7 +2128,7 @@ change_euid(struct ucred *newcred, struc newcred->cr_uidinfo = euip; } -/* +/*- * Change a process's effective gid. * Side effects: newcred->cr_gid will be modified. * References: newcred must be an exclusive credential reference for the @@ -2141,7 +2141,7 @@ change_egid(struct ucred *newcred, gid_t newcred->cr_groups[0] = egid; } -/* +/*- * Change a process's real uid. * Side effects: newcred->cr_ruid will be updated, newcred->cr_ruidinfo * will be updated, and the old and new cr_ruidinfo proc @@ -2161,7 +2161,7 @@ change_ruid(struct ucred *newcred, struc (void)chgproccnt(newcred->cr_ruidinfo, 1, 0); } -/* +/*- * Change a process's real gid. * Side effects: newcred->cr_rgid will be updated. * References: newcred must be an exclusive credential reference for the @@ -2174,7 +2174,7 @@ change_rgid(struct ucred *newcred, gid_t newcred->cr_rgid = rgid; } -/* +/*- * Change a process's saved uid. * Side effects: newcred->cr_svuid will be updated. * References: newcred must be an exclusive credential reference for the @@ -2187,7 +2187,7 @@ change_svuid(struct ucred *newcred, uid_ newcred->cr_svuid = svuid; } -/* +/*- * Change a process's saved gid. * Side effects: newcred->cr_svgid will be updated. * References: newcred must be an exclusive credential reference for the Modified: head/sys/kern/kern_resource.c ============================================================================== --- head/sys/kern/kern_resource.c Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/kern/kern_resource.c Sun Jul 18 20:57:53 2010 (r210226) @@ -1247,7 +1247,7 @@ uihold(uip) refcount_acquire(&uip->ui_ref); } -/* +/*- * Since uidinfo structs have a long lifetime, we use an * opportunistic refcounting scheme to avoid locking the lookup hash * for each release. Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/kern/kern_tc.c Sun Jul 18 20:57:53 2010 (r210226) @@ -484,7 +484,7 @@ tc_windup(void) th->th_offset_count = ncount; } - /* + /*- * Recalculate the scaling factor. We want the number of 1/2^64 * fractions of a second per period of the hardware counter, taking * into account the th_adjustment factor which the NTP PLL/adjtime(2) Modified: head/sys/kern/subr_disk.c ============================================================================== --- head/sys/kern/subr_disk.c Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/kern/subr_disk.c Sun Jul 18 20:57:53 2010 (r210226) @@ -23,7 +23,7 @@ __FBSDID("$FreeBSD$"); #include #include -/* +/*- * Disk error is the preface to plaintive error messages * about failing disk transfers. It prints messages of the form * "hp0g: BLABLABLA cmd=read fsbn 12345 of 12344-12347" Modified: head/sys/kern/subr_prof.c ============================================================================== --- head/sys/kern/subr_prof.c Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/kern/subr_prof.c Sun Jul 18 20:57:53 2010 (r210226) @@ -254,7 +254,7 @@ kmstartup(dummy) mcount_overhead -= empty_loop_time; mexitcount_overhead -= empty_loop_time; - /* + /*- * Profiling overheads are determined by the times between the * following events: * MC1: mcount() is called Modified: head/sys/kern/uipc_mbuf.c ============================================================================== --- head/sys/kern/uipc_mbuf.c Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/kern/uipc_mbuf.c Sun Jul 18 20:57:53 2010 (r210226) @@ -161,7 +161,7 @@ m_freem(struct mbuf *mb) mb = m_free(mb); } -/* +/*- * Configure a provided mbuf to refer to the provided external storage * buffer and setup a reference count for said buffer. If the setting * up of the reference count fails, the M_EXT bit will not be set. If Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/kern/uipc_usrreq.c Sun Jul 18 20:57:53 2010 (r210226) @@ -165,7 +165,7 @@ SYSCTL_ULONG(_net_local_seqpacket, OID_A SYSCTL_INT(_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0, "File descriptors in flight."); -/* +/*- * Locking and synchronization: * * Three types of locks exit in the local domain socket implementation: a Modified: head/sys/kern/vfs_extattr.c ============================================================================== --- head/sys/kern/vfs_extattr.c Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/kern/vfs_extattr.c Sun Jul 18 20:57:53 2010 (r210226) @@ -149,7 +149,7 @@ out: return (error); } -/* +/*- * Set a named extended attribute on a file or directory * * Arguments: unlocked vnode "vp", attribute namespace "attrnamespace", @@ -317,7 +317,7 @@ extattr_set_link(td, uap) return (error); } -/* +/*- * Get a named extended attribute on a file or directory * * Arguments: unlocked vnode "vp", attribute namespace "attrnamespace", @@ -638,7 +638,7 @@ extattr_delete_link(td, uap) return(error); } -/* +/*- * Retrieve a list of extended attributes on a file or directory. * * Arguments: unlocked vnode "vp", attribute namespace 'attrnamespace", Modified: head/sys/sys/cdefs.h ============================================================================== --- head/sys/sys/cdefs.h Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/sys/cdefs.h Sun Jul 18 20:57:53 2010 (r210226) @@ -463,7 +463,7 @@ #define __DEQUALIFY(type, var) ((type)(uintptr_t)(const volatile void *)(var)) #endif -/* +/*- * The following definitions are an extension of the behavior originally * implemented in , but with a different level of granularity. * POSIX.1 requires that the macros we test be defined before any standard @@ -546,7 +546,7 @@ #define __ISO_C_VISIBLE 0 #endif /* _POSIX_C_SOURCE */ #else -/* +/*- * Deal with _ANSI_SOURCE: * If it is defined, and no other compilation environment is explicitly * requested, then define our internal feature-test macros to zero. This Modified: head/sys/sys/disk.h ============================================================================== --- head/sys/sys/disk.h Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/sys/disk.h Sun Jul 18 20:57:53 2010 (r210226) @@ -26,40 +26,40 @@ void disk_err(struct bio *bp, const char #endif #define DIOCGSECTORSIZE _IOR('d', 128, u_int) - /* + /*- * Get the sectorsize of the device in bytes. The sectorsize is the * smallest unit of data which can be transfered from this device. * Usually this is a power of two but it may not be. (ie: CDROM audio) */ #define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */ - /* + /*- * Get the size of the entire device in bytes. This should be a * multiple of the sectorsize. */ #define DIOCGFWSECTORS _IOR('d', 130, u_int) /* Get firmware sectorcount */ - /* + /*- * Get the firmwares notion of number of sectors per track. This * value is mostly used for compatibility with various ill designed * disk label formats. Don't use it unless you have to. */ #define DIOCGFWHEADS _IOR('d', 131, u_int) /* Get firmware headcount */ - /* + /*- * Get the firmwares notion of number of heads per cylinder. This * value is mostly used for compatibility with various ill designed * disk label formats. Don't use it unless you have to. */ #define DIOCSKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */ - /* + /*- * Enable/Disable (the argument is boolean) the device for kernel * core dumps. */ #define DIOCGFRONTSTUFF _IOR('d', 134, off_t) - /* + /*- * Many disk formats have some amount of space reserved at the * start of the disk to hold bootblocks, various disklabels and * similar stuff. This ioctl returns the number of such bytes @@ -67,18 +67,18 @@ void disk_err(struct bio *bp, const char */ #define DIOCGFLUSH _IO('d', 135) /* Flush write cache */ - /* + /*- * Flush write cache of the device. */ #define DIOCGDELETE _IOW('d', 136, off_t[2]) /* Delete data */ - /* + /*- * Mark data on the device as unused. */ #define DISK_IDENT_SIZE 256 #define DIOCGIDENT _IOR('d', 137, char[DISK_IDENT_SIZE]) - /* + /*- * Get the ident of the given provider. Ident is (most of the time) * a uniqe and fixed provider's identifier. Ident's properties are as * follow: @@ -99,19 +99,19 @@ void disk_err(struct bio *bp, const char */ #define DIOCGPROVIDERNAME _IOR('d', 138, char[MAXPATHLEN]) - /* + /*- * Store the provider name, given a device path, in a buffer. The buffer * must be at least MAXPATHLEN bytes long. */ #define DIOCGSTRIPESIZE _IOR('d', 139, off_t) /* Get stripe size in bytes */ - /* + /*- * Get the size of the device's optimal access block in bytes. * This should be a multiple of the sectorsize. */ #define DIOCGSTRIPEOFFSET _IOR('d', 140, off_t) /* Get stripe offset in bytes */ - /* + /*- * Get the offset of the first device's optimal access block in bytes. * This should be a multiple of the sectorsize. */ Modified: head/sys/sys/kthread.h ============================================================================== --- head/sys/sys/kthread.h Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/sys/kthread.h Sun Jul 18 20:57:53 2010 (r210226) @@ -31,7 +31,7 @@ #include -/* +/*- * A kernel process descriptor; used to start "internal" daemons. * * Note: global_procpp may be NULL for no global save area. Modified: head/sys/sys/mbuf.h ============================================================================== --- head/sys/sys/mbuf.h Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/sys/mbuf.h Sun Jul 18 20:57:53 2010 (r210226) @@ -59,7 +59,7 @@ #define M_MAXCOMPRESS (MHLEN / 2) /* max amount to copy for compression */ #ifdef _KERNEL -/* +/*- * Macro for type conversion: convert mbuf pointer to data pointer of correct * type: * @@ -827,7 +827,7 @@ struct mbuf *m_split(struct mbuf *, int, struct mbuf *m_uiotombuf(struct uio *, int, int, int, int); struct mbuf *m_unshare(struct mbuf *, int how); -/* +/*- * Network packets may have annotations attached by affixing a list of * "packet tags" to the pkthdr structure. Packet tags are dynamically * allocated semi-opaque data structures that have a fixed header Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/sys/proc.h Sun Jul 18 20:57:53 2010 (r210226) @@ -112,7 +112,7 @@ struct pargs { u_char ar_args[1]; /* Arguments. */ }; -/* +/*- * Description of a process. * * This structure contains the information needed to manage a thread of Modified: head/sys/sys/resourcevar.h ============================================================================== --- head/sys/sys/resourcevar.h Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/sys/resourcevar.h Sun Jul 18 20:57:53 2010 (r210226) @@ -79,7 +79,7 @@ struct plimit { int pl_refcnt; /* number of references */ }; -/* +/*- * Per uid resource consumption. This structure is used to track * the total resource consumption (process count, socket buffer size, * etc) for the uid and impose limits. Modified: head/sys/sys/signal.h ============================================================================== --- head/sys/sys/signal.h Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/sys/signal.h Sun Jul 18 20:57:53 2010 (r210226) @@ -122,7 +122,7 @@ /* #define SIG_CATCH ((__sighandler_t *)2) See signalvar.h */ #define SIG_HOLD ((__sighandler_t *)3) -/* +/*- * Type of a signal handling function. * * Language spec sez signal handlers take exactly one arg, even though we Modified: head/sys/sys/socketvar.h ============================================================================== --- head/sys/sys/socketvar.h Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/sys/socketvar.h Sun Jul 18 20:57:53 2010 (r210226) @@ -57,7 +57,7 @@ typedef u_quad_t so_gen_t; struct socket; -/* +/*- * Locking key to struct socket: * (a) constant after allocation, no locking required. * (b) locked by SOCK_LOCK(so). Modified: head/sys/sys/time.h ============================================================================== --- head/sys/sys/time.h Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/sys/time.h Sun Jul 18 20:57:53 2010 (r210226) @@ -90,7 +90,7 @@ bintime_sub(struct bintime *bt, const st bt->sec -= bt2->sec; } -/* +/*- * Background information: * * When converting between timestamps on parallel timescales of differing Modified: head/sys/sys/timetc.h ============================================================================== --- head/sys/sys/timetc.h Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/sys/timetc.h Sun Jul 18 20:57:53 2010 (r210226) @@ -16,7 +16,7 @@ #error "no user-serviceable parts inside" #endif -/* +/*- * `struct timecounter' is the interface between the hardware which implements * a timecounter and the MI code which uses this to keep track of time. * Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Sun Jul 18 20:23:10 2010 (r210225) +++ head/sys/sys/types.h Sun Jul 18 20:57:53 2010 (r210226) @@ -287,7 +287,7 @@ typedef int boolean_t; typedef struct device *device_t; typedef __intfptr_t intfptr_t; -/* +/*- * XXX this is fixed width for historical reasons. It should have had type * __int_fast32_t. Fixed-width types should not be used unless binary * compatibility is essential. Least-width types should be used even less From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 22:35:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B1F1106566B; Sun, 18 Jul 2010 22:35:46 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7A8CA8FC12; Sun, 18 Jul 2010 22:35:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6IMZkZv081274; Sun, 18 Jul 2010 22:35:46 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6IMZkvN081273; Sun, 18 Jul 2010 22:35:46 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007182235.o6IMZkvN081273@svn.freebsd.org> From: Rick Macklem Date: Sun, 18 Jul 2010 22:35:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210227 - head/sys/fs/nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 22:35:46 -0000 Author: rmacklem Date: Sun Jul 18 22:35:46 2010 New Revision: 210227 URL: http://svn.freebsd.org/changeset/base/210227 Log: Add a call to nfscl_mustflush() in nfs_close() of the experimental NFSv4 client, so that attributes are not acquired from the server when a delegation for the file is held. This can reduce the number of Getattr Ops significantly. MFC after: 2 weeks Modified: head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sun Jul 18 20:57:53 2010 (r210226) +++ head/sys/fs/nfsclient/nfs_clvnops.c Sun Jul 18 22:35:46 2010 (r210227) @@ -709,7 +709,7 @@ nfs_close(struct vop_close_args *ap) /* * Get attributes so "change" is up to date. */ - if (!error) { + if (error == 0 && nfscl_mustflush(vp)) { ret = nfsrpc_getattr(vp, cred, ap->a_td, &nfsva, NULL); if (!ret) { From owner-svn-src-all@FreeBSD.ORG Sun Jul 18 23:34:49 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94E12106566C; Sun, 18 Jul 2010 23:34:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 56C918FC13; Sun, 18 Jul 2010 23:34:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o6INST9M027192; Sun, 18 Jul 2010 17:28:29 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sun, 18 Jul 2010 17:28:55 -0600 (MDT) Message-Id: <20100718.172855.190216127575145889.imp@bsdimp.com> To: cperciva@FreeBSD.org From: "M. Warner Losh" In-Reply-To: <4C436535.7000000@freebsd.org> References: <201007182023.o6IKNBaU052215@svn.freebsd.org> <4C436535.7000000@freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, trasz@FreeBSD.org Subject: Re: svn commit: r210225 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jul 2010 23:34:49 -0000 In message: <4C436535.7000000@freebsd.org> Colin Percival writes: : On 07/18/10 13:23, Edward Tomasz Napierala wrote: : > Log: : > The "/*-" comment marker is supposed to denote copyrights. Remove non-copyright : > occurences from sys/sys/ and sys/kern/. : : The "/*-" comment marker indicates to utilities that comments should not be : re-wrapped. Some of the comments you've changed would distinctly suffer if : they were re-wrapped, e.g., : : > -/*- : > +/* : > * Change a process's real uid. : > * Side effects: newcred->cr_ruid will be updated, newcred->cr_ruidinfo : > * will be updated, and the old and new cr_ruidinfo proc : : If you don't want to have "/*-" for these, please change them instead to : "/**", since that is an alternative "box comment" marker. Agreed. I specifically didn't *remove* any of the prior /*- comments when I used that to denote the license... Warner From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 02:26:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E5E42106566B; Mon, 19 Jul 2010 02:26:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D5DB98FC16; Mon, 19 Jul 2010 02:26:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6J2Qxgt031799; Mon, 19 Jul 2010 02:26:59 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6J2QxLE031798; Mon, 19 Jul 2010 02:26:59 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007190226.o6J2QxLE031798@svn.freebsd.org> From: Alexander Motin Date: Mon, 19 Jul 2010 02:26:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210228 - head/usr.bin/systat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 02:27:00 -0000 Author: mav Date: Mon Jul 19 02:26:59 2010 New Revision: 210228 URL: http://svn.freebsd.org/changeset/base/210228 Log: Partially revert r209312, restoring ability to fit "stray irqX" names into into available 10 characters by dropping "irq" in the middle of string. Modified: head/usr.bin/systat/vmstat.c Modified: head/usr.bin/systat/vmstat.c ============================================================================== --- head/usr.bin/systat/vmstat.c Sun Jul 18 22:35:46 2010 (r210227) +++ head/usr.bin/systat/vmstat.c Mon Jul 19 02:26:59 2010 (r210228) @@ -259,18 +259,22 @@ initkre(void) cp1 = cp1 + 2; cp2 = strdup(cp); bcopy(cp1, cp, sz - (cp1 - cp) + 1); - /* If line is long - drop "irq", - if too long - drop "irqN". */ - if (sz <= 10 + 1) { - strcat(cp, " "); - strcat(cp, cp2); - } else if (sz <= 10 + 4) { + if (sz <= 10 + 4) { strcat(cp, " "); strcat(cp, cp2 + 3); } free(cp2); } } + + /* + * Convert "name irqN" to "name N" if the former is + * longer than the field width. + */ + if ((cp1 = strstr(cp, "irq")) != NULL && + strlen(cp) > 10) + bcopy(cp1 + 3, cp1, strlen(cp1 + 3) + 1); + intrname[i] = cp; cp = nextcp; } From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 03:42:04 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A75B1065670; Mon, 19 Jul 2010 03:42:04 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 02FB38FC17; Mon, 19 Jul 2010 03:42:03 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6J3fx2x001912 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 19 Jul 2010 13:42:01 +1000 Date: Mon, 19 Jul 2010 13:41:59 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Colin Percival In-Reply-To: <4C436535.7000000@freebsd.org> Message-ID: <20100719132004.B5329@delplex.bde.org> References: <201007182023.o6IKNBaU052215@svn.freebsd.org> <4C436535.7000000@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Edward Tomasz Napierala Subject: Re: svn commit: r210225 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 03:42:04 -0000 On Sun, 18 Jul 2010, Colin Percival wrote: > On 07/18/10 13:23, Edward Tomasz Napierala wrote: >> Log: >> The "/*-" comment marker is supposed to denote copyrights. Remove non-copyright >> occurences from sys/sys/ and sys/kern/. > > The "/*-" comment marker indicates to utilities that comments should not be > re-wrapped. Some of the comments you've changed would distinctly suffer if > they were re-wrapped, e.g., Indeed, the use of this marker for copyright comments is secondary: - most copyright comments would be mangled if they were re-wrapped. Thus ones that don't have the marker are usually wrong. There is an alternative marker "/**" (see indent(1)). Use of this would be just a style bug. Use of full box comments (with comments ornated in boxes made of mostly "*"'s or possibly hyphens or bars or even terminal-specific box drawing characters) would be a larger style bug. indent(1) only claims to support these markers in connection with supporting full box comments. - someone made copyright comments easier to find by using this marker for them constently. >> -/*- >> +/* >> * Change a process's real uid. >> * Side effects: newcred->cr_ruid will be updated, newcred->cr_ruidinfo >> * will be updated, and the old and new cr_ruidinfo proc > > If you don't want to have "/*-" for these, please change them instead to > "/**", since that is an alternative "box comment" marker. Ugh, please don't do this. I want to have "/*-" for normal (but intricately formatted) block comments. Most files should have probably have more of these than copyright comments. However, many intricately formatted block comments are missing the marker. I added the -nfcb flag to indent(1) for avoiding mangling of any block comment, and use it in my .indent.pro, so I rarely see this mangling. The "/**" marker is already used to make doxygen markup especially ugly. I don't know if this is part of the doxygen markup or of the "@foo" markup does everything. Bruce From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 10:55:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 99F231065673; Mon, 19 Jul 2010 10:55:44 +0000 (UTC) (envelope-from ru@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 88B438FC0A; Mon, 19 Jul 2010 10:55:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JAtibs044779; Mon, 19 Jul 2010 10:55:44 GMT (envelope-from ru@svn.freebsd.org) Received: (from ru@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JAtilN044778; Mon, 19 Jul 2010 10:55:44 GMT (envelope-from ru@svn.freebsd.org) Message-Id: <201007191055.o6JAtilN044778@svn.freebsd.org> From: Ruslan Ermilov Date: Mon, 19 Jul 2010 10:55:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210230 - stable/8/sys/geom/cache X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 10:55:44 -0000 Author: ru Date: Mon Jul 19 10:55:44 2010 New Revision: 210230 URL: http://svn.freebsd.org/changeset/base/210230 Log: MFC r210046: Fixed cache size decoding read from a label. PR: kern/144732 Modified: stable/8/sys/geom/cache/g_cache.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/geom/cache/g_cache.h ============================================================================== --- stable/8/sys/geom/cache/g_cache.h Mon Jul 19 07:28:35 2010 (r210229) +++ stable/8/sys/geom/cache/g_cache.h Mon Jul 19 10:55:44 2010 (r210230) @@ -139,7 +139,7 @@ cache_metadata_decode(const u_char *data md->md_version = le32dec(data + 16); bcopy(data + 20, md->md_name, sizeof(md->md_name)); md->md_bsize = le32dec(data + 36); - md->md_size = le16dec(data + 40); + md->md_size = le32dec(data + 40); md->md_provsize = le64dec(data + 44); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 12:16:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1913D1065674; Mon, 19 Jul 2010 12:16:42 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 07E998FC12; Mon, 19 Jul 2010 12:16:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JCGfbi062675; Mon, 19 Jul 2010 12:16:41 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JCGfU9062674; Mon, 19 Jul 2010 12:16:41 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007191216.o6JCGfU9062674@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 19 Jul 2010 12:16:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210231 - stable/8/sys/amd64/amd64 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 12:16:42 -0000 Author: kib Date: Mon Jul 19 12:16:41 2010 New Revision: 210231 URL: http://svn.freebsd.org/changeset/base/210231 Log: MFC r209955: When switching the thread from the processor, store %dr7 content into the pcb before disabling watchpoints. Otherwise, when the thread is restored on a processor, watchpoints are still disabled. Modified: stable/8/sys/amd64/amd64/cpu_switch.S Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/amd64/cpu_switch.S ============================================================================== --- stable/8/sys/amd64/amd64/cpu_switch.S Mon Jul 19 10:55:44 2010 (r210230) +++ stable/8/sys/amd64/amd64/cpu_switch.S Mon Jul 19 12:16:41 2010 (r210231) @@ -245,13 +245,13 @@ store_dr: movq %dr2,%r13 movq %dr3,%r12 movq %dr6,%r11 - andq $0x0000fc00, %rax /* disable all watchpoints */ movq %r15,PCB_DR0(%r8) movq %r14,PCB_DR1(%r8) movq %r13,PCB_DR2(%r8) movq %r12,PCB_DR3(%r8) movq %r11,PCB_DR6(%r8) movq %rax,PCB_DR7(%r8) + andq $0x0000fc00, %rax /* disable all watchpoints */ movq %rax,%dr7 jmp done_store_dr From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 12:32:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 86D241065675; Mon, 19 Jul 2010 12:32:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75C168FC26; Mon, 19 Jul 2010 12:32:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JCWPbM066220; Mon, 19 Jul 2010 12:32:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JCWPTZ066219; Mon, 19 Jul 2010 12:32:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007191232.o6JCWPTZ066219@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 19 Jul 2010 12:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210232 - stable/8/sys/ddb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 12:32:25 -0000 Author: kib Date: Mon Jul 19 12:32:24 2010 New Revision: 210232 URL: http://svn.freebsd.org/changeset/base/210232 Log: MFC r209934: Use _SIG_VALID(). Modified: stable/8/sys/ddb/db_command.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/ddb/db_command.c ============================================================================== --- stable/8/sys/ddb/db_command.c Mon Jul 19 12:16:41 2010 (r210231) +++ stable/8/sys/ddb/db_command.c Mon Jul 19 12:32:24 2010 (r210232) @@ -633,7 +633,7 @@ db_kill(dummy1, dummy2, dummy3, dummy4) if (!db_expression(&pid)) DB_ERROR(("Missing process ID\n")); db_skip_to_eol(); - if (sig < 1 || sig > _SIG_MAXSIG) + if (!_SIG_VALID(sig)) DB_ERROR(("Signal number out of range\n")); /* From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 12:37:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A9C61065678; Mon, 19 Jul 2010 12:37:28 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 795748FC12; Mon, 19 Jul 2010 12:37:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JCbSNn067393; Mon, 19 Jul 2010 12:37:28 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JCbSo1067391; Mon, 19 Jul 2010 12:37:28 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007191237.o6JCbSo1067391@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 19 Jul 2010 12:37:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210233 - stable/8/lib/libthr/thread X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 12:37:28 -0000 Author: kib Date: Mon Jul 19 12:37:28 2010 New Revision: 210233 URL: http://svn.freebsd.org/changeset/base/210233 Log: MFC r209933: Use _SIG_VALID instead of expanded form of the macro. Modified: stable/8/lib/libthr/thread/thr_sig.c Directory Properties: stable/8/lib/libthr/ (props changed) Modified: stable/8/lib/libthr/thread/thr_sig.c ============================================================================== --- stable/8/lib/libthr/thread/thr_sig.c Mon Jul 19 12:32:24 2010 (r210232) +++ stable/8/lib/libthr/thread/thr_sig.c Mon Jul 19 12:37:28 2010 (r210233) @@ -194,7 +194,7 @@ int _sigaction(int sig, const struct sigaction * act, struct sigaction * oact) { /* Check if the signal number is out of range: */ - if (sig < 1 || sig > _SIG_MAXSIG || sig == SIGCANCEL) { + if (!_SIG_VALID(sig) || sig == SIGCANCEL) { /* Return an invalid argument: */ errno = EINVAL; return (-1); From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 12:41:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4DBB61065670; Mon, 19 Jul 2010 12:41:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CB908FC19; Mon, 19 Jul 2010 12:41:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JCf6Ha068236; Mon, 19 Jul 2010 12:41:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JCf6vb068234; Mon, 19 Jul 2010 12:41:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007191241.o6JCf6vb068234@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 19 Jul 2010 12:41:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210234 - stable/8/lib/libc/compat-43 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 12:41:06 -0000 Author: kib Date: Mon Jul 19 12:41:05 2010 New Revision: 210234 URL: http://svn.freebsd.org/changeset/base/210234 Log: MFC r209932: For xsi_sigpause(3), remove the supplied signal from the process mask during sigpause(2) call. It was backward. Check that the signal number is valid. Modified: stable/8/lib/libc/compat-43/sigcompat.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/compat-43/sigcompat.c ============================================================================== --- stable/8/lib/libc/compat-43/sigcompat.c Mon Jul 19 12:37:28 2010 (r210233) +++ stable/8/lib/libc/compat-43/sigcompat.c Mon Jul 19 12:41:05 2010 (r210234) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include +#include #include #include #include "un-namespace.h" @@ -111,9 +112,16 @@ int xsi_sigpause(int sig) { sigset_t set; + int error; - sigemptyset(&set); - sigaddset(&set, sig); + if (!_SIG_VALID(sig)) { + errno = EINVAL; + return (-1); + } + error = _sigprocmask(SIG_BLOCK, NULL, &set); + if (error != 0) + return (error); + sigdelset(&set, sig); return (_sigsuspend(&set)); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 12:52:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EAF09106566C; Mon, 19 Jul 2010 12:52:19 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D9C968FC0A; Mon, 19 Jul 2010 12:52:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JCqJoo070781; Mon, 19 Jul 2010 12:52:19 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JCqJt0070779; Mon, 19 Jul 2010 12:52:19 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007191252.o6JCqJt0070779@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 19 Jul 2010 12:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210235 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 12:52:20 -0000 Author: kib Date: Mon Jul 19 12:52:19 2010 New Revision: 210235 URL: http://svn.freebsd.org/changeset/base/210235 Log: MFC r209197: Add assert to check that the (current) thread is in critical section. MFC r209204: Rename CRITSECT_ASSERT to CRITICAL_ASSERT Modified: stable/8/sys/sys/proc.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/proc.h ============================================================================== --- stable/8/sys/sys/proc.h Mon Jul 19 12:41:05 2010 (r210234) +++ stable/8/sys/sys/proc.h Mon Jul 19 12:52:19 2010 (r210235) @@ -326,6 +326,9 @@ do { \ #define THREAD_LOCKPTR_ASSERT(td, lock) #endif +#define CRITICAL_ASSERT(td) \ + KASSERT((td)->td_critnest >= 1, ("Not in critical section")); + /* * Flags kept in td_flags: * To change these you MUST have the scheduler lock. From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 14:57:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 16CB6106564A; Mon, 19 Jul 2010 14:57:02 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 04C258FC1D; Mon, 19 Jul 2010 14:57:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JEv2ol098294; Mon, 19 Jul 2010 14:57:02 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JEv1XS098292; Mon, 19 Jul 2010 14:57:01 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007191457.o6JEv1XS098292@svn.freebsd.org> From: Rui Paulo Date: Mon, 19 Jul 2010 14:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210236 - vendor/opensolaris/dist/cmd/plockstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 14:57:02 -0000 Author: rpaulo Date: Mon Jul 19 14:57:01 2010 New Revision: 210236 URL: http://svn.freebsd.org/changeset/base/210236 Log: Import plockstat from OpenSolaris r12768. Added: vendor/opensolaris/dist/cmd/plockstat/ vendor/opensolaris/dist/cmd/plockstat/plockstat.c (contents, props changed) Added: vendor/opensolaris/dist/cmd/plockstat/plockstat.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/opensolaris/dist/cmd/plockstat/plockstat.c Mon Jul 19 14:57:01 2010 (r210236) @@ -0,0 +1,996 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2006 Sun Microsystems, Inc. All rights reserved. + * Use is subject to license terms. + */ + +#pragma ident "%Z%%M% %I% %E% SMI" + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +static char *g_pname; +static dtrace_hdl_t *g_dtp; +struct ps_prochandle *g_pr; + +#define E_SUCCESS 0 +#define E_ERROR 1 +#define E_USAGE 2 + +/* + * For hold times we use a global associative array since for mutexes, in + * user-land, it's not invalid to release a sychonization primitive that + * another thread acquired; rwlocks require a thread-local associative array + * since multiple thread can hold the same lock for reading. Note that we + * ignore recursive mutex acquisitions and releases as they don't truly + * affect lock contention. + */ +static const char *g_hold_init = +"plockstat$target:::rw-acquire\n" +"{\n" +" self->rwhold[arg0] = timestamp;\n" +"}\n" +"plockstat$target:::mutex-acquire\n" +"/arg1 == 0/\n" +"{\n" +" mtxhold[arg0] = timestamp;\n" +"}\n"; + +static const char *g_hold_histogram = +"plockstat$target:::rw-release\n" +"/self->rwhold[arg0] && arg1 == 1/\n" +"{\n" +" @rw_w_hold[arg0, ustack()] =\n" +" quantize(timestamp - self->rwhold[arg0]);\n" +" self->rwhold[arg0] = 0;\n" +" rw_w_hold_found = 1;\n" +"}\n" +"plockstat$target:::rw-release\n" +"/self->rwhold[arg0]/\n" +"{\n" +" @rw_r_hold[arg0, ustack()] =\n" +" quantize(timestamp - self->rwhold[arg0]);\n" +" self->rwhold[arg0] = 0;\n" +" rw_r_hold_found = 1;\n" +"}\n" +"plockstat$target:::mutex-release\n" +"/mtxhold[arg0] && arg1 == 0/\n" +"{\n" +" @mtx_hold[arg0, ustack()] = quantize(timestamp - mtxhold[arg0]);\n" +" mtxhold[arg0] = 0;\n" +" mtx_hold_found = 1;\n" +"}\n" +"\n" +"END\n" +"/mtx_hold_found/\n" +"{\n" +" trace(\"Mutex hold\");\n" +" printa(@mtx_hold);\n" +"}\n" +"END\n" +"/rw_r_hold_found/\n" +"{\n" +" trace(\"R/W reader hold\");\n" +" printa(@rw_r_hold);\n" +"}\n" +"END\n" +"/rw_w_hold_found/\n" +"{\n" +" trace(\"R/W writer hold\");\n" +" printa(@rw_w_hold);\n" +"}\n"; + +static const char *g_hold_times = +"plockstat$target:::rw-release\n" +"/self->rwhold[arg0] && arg1 == 1/\n" +"{\n" +" @rw_w_hold[arg0, ustack(5)] = sum(timestamp - self->rwhold[arg0]);\n" +" @rw_w_hold_count[arg0, ustack(5)] = count();\n" +" self->rwhold[arg0] = 0;\n" +" rw_w_hold_found = 1;\n" +"}\n" +"plockstat$target:::rw-release\n" +"/self->rwhold[arg0]/\n" +"{\n" +" @rw_r_hold[arg0, ustack(5)] = sum(timestamp - self->rwhold[arg0]);\n" +" @rw_r_hold_count[arg0, ustack(5)] = count();\n" +" self->rwhold[arg0] = 0;\n" +" rw_r_hold_found = 1;\n" +"}\n" +"plockstat$target:::mutex-release\n" +"/mtxhold[arg0] && arg1 == 0/\n" +"{\n" +" @mtx_hold[arg0, ustack(5)] = sum(timestamp - mtxhold[arg0]);\n" +" @mtx_hold_count[arg0, ustack(5)] = count();\n" +" mtxhold[arg0] = 0;\n" +" mtx_hold_found = 1;\n" +"}\n" +"\n" +"END\n" +"/mtx_hold_found/\n" +"{\n" +" trace(\"Mutex hold\");\n" +" printa(@mtx_hold, @mtx_hold_count);\n" +"}\n" +"END\n" +"/rw_r_hold_found/\n" +"{\n" +" trace(\"R/W reader hold\");\n" +" printa(@rw_r_hold, @rw_r_hold_count);\n" +"}\n" +"END\n" +"/rw_w_hold_found/\n" +"{\n" +" trace(\"R/W writer hold\");\n" +" printa(@rw_w_hold, @rw_w_hold_count);\n" +"}\n"; + + +/* + * For contention, we use thread-local associative arrays since we're tracing + * a single thread's activity in libc and multiple threads can be blocking or + * spinning on the same sychonization primitive. + */ +static const char *g_ctnd_init = +"plockstat$target:::rw-block\n" +"{\n" +" self->rwblock[arg0] = timestamp;\n" +"}\n" +"plockstat$target:::mutex-block\n" +"{\n" +" self->mtxblock[arg0] = timestamp;\n" +"}\n" +"plockstat$target:::mutex-spin\n" +"{\n" +" self->mtxspin[arg0] = timestamp;\n" +"}\n"; + +static const char *g_ctnd_histogram = +"plockstat$target:::rw-blocked\n" +"/self->rwblock[arg0] && arg1 == 1 && arg2 != 0/\n" +"{\n" +" @rw_w_block[arg0, ustack()] =\n" +" quantize(timestamp - self->rwblock[arg0]);\n" +" self->rwblock[arg0] = 0;\n" +" rw_w_block_found = 1;\n" +"}\n" +"plockstat$target:::rw-blocked\n" +"/self->rwblock[arg0] && arg2 != 0/\n" +"{\n" +" @rw_r_block[arg0, ustack()] =\n" +" quantize(timestamp - self->rwblock[arg0]);\n" +" self->rwblock[arg0] = 0;\n" +" rw_r_block_found = 1;\n" +"}\n" +"plockstat$target:::rw-blocked\n" +"/self->rwblock[arg0]/\n" +"{\n" +" self->rwblock[arg0] = 0;\n" +"}\n" +"plockstat$target:::mutex-spun\n" +"/self->mtxspin[arg0] && arg1 != 0/\n" +"{\n" +" @mtx_spin[arg0, ustack()] =\n" +" quantize(timestamp - self->mtxspin[arg0]);\n" +" self->mtxspin[arg0] = 0;\n" +" mtx_spin_found = 1;\n" +"}\n" +"plockstat$target:::mutex-spun\n" +"/self->mtxspin[arg0]/\n" +"{\n" +" @mtx_vain_spin[arg0, ustack()] =\n" +" quantize(timestamp - self->mtxspin[arg0]);\n" +" self->mtxspin[arg0] = 0;\n" +" mtx_vain_spin_found = 1;\n" +"}\n" +"plockstat$target:::mutex-blocked\n" +"/self->mtxblock[arg0] && arg1 != 0/\n" +"{\n" +" @mtx_block[arg0, ustack()] =\n" +" quantize(timestamp - self->mtxblock[arg0]);\n" +" self->mtxblock[arg0] = 0;\n" +" mtx_block_found = 1;\n" +"}\n" +"plockstat$target:::mutex-blocked\n" +"/self->mtxblock[arg0]/\n" +"{\n" +" self->mtxblock[arg0] = 0;\n" +"}\n" +"\n" +"END\n" +"/mtx_block_found/\n" +"{\n" +" trace(\"Mutex block\");\n" +" printa(@mtx_block);\n" +"}\n" +"END\n" +"/mtx_spin_found/\n" +"{\n" +" trace(\"Mutex spin\");\n" +" printa(@mtx_spin);\n" +"}\n" +"END\n" +"/mtx_vain_spin_found/\n" +"{\n" +" trace(\"Mutex unsuccessful spin\");\n" +" printa(@mtx_vain_spin);\n" +"}\n" +"END\n" +"/rw_r_block_found/\n" +"{\n" +" trace(\"R/W reader block\");\n" +" printa(@rw_r_block);\n" +"}\n" +"END\n" +"/rw_w_block_found/\n" +"{\n" +" trace(\"R/W writer block\");\n" +" printa(@rw_w_block);\n" +"}\n"; + + +static const char *g_ctnd_times = +"plockstat$target:::rw-blocked\n" +"/self->rwblock[arg0] && arg1 == 1 && arg2 != 0/\n" +"{\n" +" @rw_w_block[arg0, ustack(5)] =\n" +" sum(timestamp - self->rwblock[arg0]);\n" +" @rw_w_block_count[arg0, ustack(5)] = count();\n" +" self->rwblock[arg0] = 0;\n" +" rw_w_block_found = 1;\n" +"}\n" +"plockstat$target:::rw-blocked\n" +"/self->rwblock[arg0] && arg2 != 0/\n" +"{\n" +" @rw_r_block[arg0, ustack(5)] =\n" +" sum(timestamp - self->rwblock[arg0]);\n" +" @rw_r_block_count[arg0, ustack(5)] = count();\n" +" self->rwblock[arg0] = 0;\n" +" rw_r_block_found = 1;\n" +"}\n" +"plockstat$target:::rw-blocked\n" +"/self->rwblock[arg0]/\n" +"{\n" +" self->rwblock[arg0] = 0;\n" +"}\n" +"plockstat$target:::mutex-spun\n" +"/self->mtxspin[arg0] && arg1 != 0/\n" +"{\n" +" @mtx_spin[arg0, ustack(5)] =\n" +" sum(timestamp - self->mtxspin[arg0]);\n" +" @mtx_spin_count[arg0, ustack(5)] = count();\n" +" self->mtxspin[arg0] = 0;\n" +" mtx_spin_found = 1;\n" +"}\n" +"plockstat$target:::mutex-spun\n" +"/self->mtxspin[arg0]/\n" +"{\n" +" @mtx_vain_spin[arg0, ustack(5)] =\n" +" sum(timestamp - self->mtxspin[arg0]);\n" +" @mtx_vain_spin_count[arg0, ustack(5)] = count();\n" +" self->mtxspin[arg0] = 0;\n" +" mtx_vain_spin_found = 1;\n" +"}\n" +"plockstat$target:::mutex-blocked\n" +"/self->mtxblock[arg0] && arg1 != 0/\n" +"{\n" +" @mtx_block[arg0, ustack(5)] =\n" +" sum(timestamp - self->mtxblock[arg0]);\n" +" @mtx_block_count[arg0, ustack(5)] = count();\n" +" self->mtxblock[arg0] = 0;\n" +" mtx_block_found = 1;\n" +"}\n" +"plockstat$target:::mutex-blocked\n" +"/self->mtxblock[arg0]/\n" +"{\n" +" self->mtxblock[arg0] = 0;\n" +"}\n" +"\n" +"END\n" +"/mtx_block_found/\n" +"{\n" +" trace(\"Mutex block\");\n" +" printa(@mtx_block, @mtx_block_count);\n" +"}\n" +"END\n" +"/mtx_spin_found/\n" +"{\n" +" trace(\"Mutex spin\");\n" +" printa(@mtx_spin, @mtx_spin_count);\n" +"}\n" +"END\n" +"/mtx_vain_spin_found/\n" +"{\n" +" trace(\"Mutex unsuccessful spin\");\n" +" printa(@mtx_vain_spin, @mtx_vain_spin_count);\n" +"}\n" +"END\n" +"/rw_r_block_found/\n" +"{\n" +" trace(\"R/W reader block\");\n" +" printa(@rw_r_block, @rw_r_block_count);\n" +"}\n" +"END\n" +"/rw_w_block_found/\n" +"{\n" +" trace(\"R/W writer block\");\n" +" printa(@rw_w_block, @rw_w_block_count);\n" +"}\n"; + +static char g_prog[4096]; +static size_t g_proglen; +static int g_opt_V, g_opt_s; +static int g_intr; +static int g_exited; +static dtrace_optval_t g_nframes; +static ulong_t g_nent = ULONG_MAX; + +#define PLOCKSTAT_OPTSTR "n:ps:e:vx:ACHV" + +static void +usage(void) +{ + (void) fprintf(stderr, "Usage:\n" + "\t%s [-vACHV] [-n count] [-s depth] [-e secs] [-x opt[=val]]\n" + "\t command [arg...]\n" + "\t%s [-vACHV] [-n count] [-s depth] [-e secs] [-x opt[=val]]\n" + "\t -p pid\n", g_pname, g_pname); + + exit(E_USAGE); +} + +static void +verror(const char *fmt, va_list ap) +{ + int error = errno; + + (void) fprintf(stderr, "%s: ", g_pname); + (void) vfprintf(stderr, fmt, ap); + + if (fmt[strlen(fmt) - 1] != '\n') + (void) fprintf(stderr, ": %s\n", strerror(error)); +} + +/*PRINTFLIKE1*/ +static void +fatal(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + verror(fmt, ap); + va_end(ap); + + if (g_pr != NULL && g_dtp != NULL) + dtrace_proc_release(g_dtp, g_pr); + + exit(E_ERROR); +} + +/*PRINTFLIKE1*/ +static void +dfatal(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + + (void) fprintf(stderr, "%s: ", g_pname); + if (fmt != NULL) + (void) vfprintf(stderr, fmt, ap); + + va_end(ap); + + if (fmt != NULL && fmt[strlen(fmt) - 1] != '\n') { + (void) fprintf(stderr, ": %s\n", + dtrace_errmsg(g_dtp, dtrace_errno(g_dtp))); + } else if (fmt == NULL) { + (void) fprintf(stderr, "%s\n", + dtrace_errmsg(g_dtp, dtrace_errno(g_dtp))); + } + + if (g_pr != NULL) { + dtrace_proc_continue(g_dtp, g_pr); + dtrace_proc_release(g_dtp, g_pr); + } + + exit(E_ERROR); +} + +/*PRINTFLIKE1*/ +static void +notice(const char *fmt, ...) +{ + va_list ap; + + va_start(ap, fmt); + verror(fmt, ap); + va_end(ap); +} + +static void +dprog_add(const char *prog) +{ + size_t len = strlen(prog); + bcopy(prog, g_prog + g_proglen, len + 1); + g_proglen += len; + assert(g_proglen < sizeof (g_prog)); +} + +static void +dprog_compile(void) +{ + dtrace_prog_t *prog; + dtrace_proginfo_t info; + + if (g_opt_V) { + (void) fprintf(stderr, "%s: vvvv D program vvvv\n", g_pname); + (void) fputs(g_prog, stderr); + (void) fprintf(stderr, "%s: ^^^^ D program ^^^^\n", g_pname); + } + + if ((prog = dtrace_program_strcompile(g_dtp, g_prog, + DTRACE_PROBESPEC_NAME, 0, 0, NULL)) == NULL) + dfatal("failed to compile program"); + + if (dtrace_program_exec(g_dtp, prog, &info) == -1) + dfatal("failed to enable probes"); +} + +void +print_legend(void) +{ + (void) printf("%5s %8s %-28s %s\n", "Count", "nsec", "Lock", "Caller"); +} + +void +print_bar(void) +{ + (void) printf("---------------------------------------" + "----------------------------------------\n"); +} + +void +print_histogram_header(void) +{ + (void) printf("\n%10s ---- Time Distribution --- %5s %s\n", + "nsec", "count", "Stack"); +} + +/* + * Convert an address to a symbolic string or a numeric string. If nolocks + * is set, we return an error code if this symbol appears to be a mutex- or + * rwlock-related symbol in libc so the caller has a chance to find a more + * helpful symbol. + */ +static int +getsym(struct ps_prochandle *P, uintptr_t addr, char *buf, size_t size, + int nolocks) +{ + char name[256]; + GElf_Sym sym; + prsyminfo_t info; + size_t len; + + if (P == NULL || Pxlookup_by_addr(P, addr, name, sizeof (name), + &sym, &info) != 0) { + (void) snprintf(buf, size, "%#lx", addr); + return (0); + } + if (info.prs_object == NULL) + info.prs_object = ""; + + if (info.prs_lmid != LM_ID_BASE) { + len = snprintf(buf, size, "LM%lu`", info.prs_lmid); + buf += len; + size -= len; + } + + len = snprintf(buf, size, "%s`%s", info.prs_object, info.prs_name); + buf += len; + size -= len; + + if (sym.st_value != addr) + len = snprintf(buf, size, "+%#lx", addr - sym.st_value); + + if (nolocks && strcmp("libc.so.1", info.prs_object) == 0 && + (strstr("mutex", info.prs_name) == 0 || + strstr("rw", info.prs_name) == 0)) + return (-1); + + return (0); +} + +/*ARGSUSED*/ +static int +process_aggregate(const dtrace_aggdata_t **aggsdata, int naggvars, void *arg) +{ + const dtrace_recdesc_t *rec; + uintptr_t lock; + uint64_t *stack; + caddr_t data; + pid_t pid; + struct ps_prochandle *P; + char buf[256]; + int i, j; + uint64_t sum, count, avg; + + if ((*(uint_t *)arg)++ >= g_nent) + return (DTRACE_AGGWALK_NEXT); + + rec = aggsdata[0]->dtada_desc->dtagd_rec; + data = aggsdata[0]->dtada_data; + + /*LINTED - alignment*/ + lock = (uintptr_t)*(uint64_t *)(data + rec[1].dtrd_offset); + /*LINTED - alignment*/ + stack = (uint64_t *)(data + rec[2].dtrd_offset); + + if (!g_opt_s) { + /*LINTED - alignment*/ + sum = *(uint64_t *)(aggsdata[1]->dtada_data + + aggsdata[1]->dtada_desc->dtagd_rec[3].dtrd_offset); + /*LINTED - alignment*/ + count = *(uint64_t *)(aggsdata[2]->dtada_data + + aggsdata[2]->dtada_desc->dtagd_rec[3].dtrd_offset); + } else { + uint64_t *a; + + /*LINTED - alignment*/ + a = (uint64_t *)(aggsdata[1]->dtada_data + + aggsdata[1]->dtada_desc->dtagd_rec[3].dtrd_offset); + + print_bar(); + print_legend(); + + for (count = sum = 0, i = DTRACE_QUANTIZE_ZEROBUCKET, j = 0; + i < DTRACE_QUANTIZE_NBUCKETS; i++, j++) { + count += a[i]; + sum += a[i] << (j - 64); + } + } + + avg = sum / count; + (void) printf("%5llu %8llu ", (u_longlong_t)count, (u_longlong_t)avg); + + pid = stack[0]; + P = dtrace_proc_grab(g_dtp, pid, PGRAB_RDONLY); + + (void) getsym(P, lock, buf, sizeof (buf), 0); + (void) printf("%-28s ", buf); + + for (i = 2; i <= 5; i++) { + if (getsym(P, stack[i], buf, sizeof (buf), 1) == 0) + break; + } + (void) printf("%s\n", buf); + + if (g_opt_s) { + int stack_done = 0; + int quant_done = 0; + int first_bin, last_bin; + uint64_t bin_size, *a; + + /*LINTED - alignment*/ + a = (uint64_t *)(aggsdata[1]->dtada_data + + aggsdata[1]->dtada_desc->dtagd_rec[3].dtrd_offset); + + print_histogram_header(); + + for (first_bin = DTRACE_QUANTIZE_ZEROBUCKET; + a[first_bin] == 0; first_bin++) + continue; + for (last_bin = DTRACE_QUANTIZE_ZEROBUCKET + 63; + a[last_bin] == 0; last_bin--) + continue; + + for (i = 0; !stack_done || !quant_done; i++) { + if (!stack_done) { + (void) getsym(P, stack[i + 2], buf, + sizeof (buf), 0); + } else { + buf[0] = '\0'; + } + + if (!quant_done) { + bin_size = a[first_bin]; + + (void) printf("%10llu |%-24.*s| %5llu %s\n", + 1ULL << + (first_bin - DTRACE_QUANTIZE_ZEROBUCKET), + (int)(24.0 * bin_size / count), + "@@@@@@@@@@@@@@@@@@@@@@@@@@", + (u_longlong_t)bin_size, buf); + } else { + (void) printf("%43s %s\n", "", buf); + } + + if (i + 1 >= g_nframes || stack[i + 3] == 0) + stack_done = 1; + + if (first_bin++ == last_bin) + quant_done = 1; + } + } + + dtrace_proc_release(g_dtp, P); + + return (DTRACE_AGGWALK_NEXT); +} + +/*ARGSUSED*/ +static void +prochandler(struct ps_prochandle *P, const char *msg, void *arg) +{ + const psinfo_t *prp = Ppsinfo(P); + int pid = Pstatus(P)->pr_pid; + char name[SIG2STR_MAX]; + + if (msg != NULL) { + notice("pid %d: %s\n", pid, msg); + return; + } + + switch (Pstate(P)) { + case PS_UNDEAD: + /* + * Ideally we would like to always report pr_wstat here, but it + * isn't possible given current /proc semantics. If we grabbed + * the process, Ppsinfo() will either fail or return a zeroed + * psinfo_t depending on how far the parent is in reaping it. + * When /proc provides a stable pr_wstat in the status file, + * this code can be improved by examining this new pr_wstat. + */ + if (prp != NULL && WIFSIGNALED(prp->pr_wstat)) { + notice("pid %d terminated by %s\n", pid, + proc_signame(WTERMSIG(prp->pr_wstat), + name, sizeof (name))); + } else if (prp != NULL && WEXITSTATUS(prp->pr_wstat) != 0) { + notice("pid %d exited with status %d\n", + pid, WEXITSTATUS(prp->pr_wstat)); + } else { + notice("pid %d has exited\n", pid); + } + g_exited = 1; + break; + + case PS_LOST: + notice("pid %d exec'd a set-id or unobservable program\n", pid); + g_exited = 1; + break; + } +} + +/*ARGSUSED*/ +static int +chewrec(const dtrace_probedata_t *data, const dtrace_recdesc_t *rec, void *arg) +{ + dtrace_eprobedesc_t *epd = data->dtpda_edesc; + dtrace_aggvarid_t aggvars[2]; + const void *buf; + int i, nagv; + + /* + * A NULL rec indicates that we've processed the last record. + */ + if (rec == NULL) + return (DTRACE_CONSUME_NEXT); + + buf = data->dtpda_data - rec->dtrd_offset; + + switch (rec->dtrd_action) { + case DTRACEACT_DIFEXPR: + (void) printf("\n%s\n\n", (char *)buf + rec->dtrd_offset); + if (!g_opt_s) { + print_legend(); + print_bar(); + } + return (DTRACE_CONSUME_NEXT); + + case DTRACEACT_PRINTA: + for (nagv = 0, i = 0; i < epd->dtepd_nrecs - 1; i++) { + const dtrace_recdesc_t *nrec = &rec[i]; + + if (nrec->dtrd_uarg != rec->dtrd_uarg) + break; + + /*LINTED - alignment*/ + aggvars[nagv++] = *(dtrace_aggvarid_t *)((caddr_t)buf + + nrec->dtrd_offset); + } + + if (nagv == (g_opt_s ? 1 : 2)) { + uint_t nent = 0; + if (dtrace_aggregate_walk_joined(g_dtp, aggvars, nagv, + process_aggregate, &nent) != 0) + dfatal("failed to walk aggregate"); + } + + return (DTRACE_CONSUME_NEXT); + } + + return (DTRACE_CONSUME_THIS); +} + +/*ARGSUSED*/ +static void +intr(int signo) +{ + g_intr = 1; +} + +int +main(int argc, char **argv) +{ + ucred_t *ucp; + int err; + int opt_C = 0, opt_H = 0, opt_p = 0, opt_v = 0; + char c, *p, *end; + struct sigaction act; + int done = 0; + + g_pname = basename(argv[0]); + argv[0] = g_pname; /* rewrite argv[0] for getopt errors */ + + /* + * Make sure we have the required dtrace_proc privilege. + */ + if ((ucp = ucred_get(getpid())) != NULL) { + const priv_set_t *psp; + if ((psp = ucred_getprivset(ucp, PRIV_EFFECTIVE)) != NULL && + !priv_ismember(psp, PRIV_DTRACE_PROC)) { + fatal("dtrace_proc privilege required\n"); + } + + ucred_free(ucp); + } + + while ((c = getopt(argc, argv, PLOCKSTAT_OPTSTR)) != EOF) { + switch (c) { + case 'n': + errno = 0; + g_nent = strtoul(optarg, &end, 10); + if (*end != '\0' || errno != 0) { + (void) fprintf(stderr, "%s: invalid count " + "'%s'\n", g_pname, optarg); + usage(); + } + break; + + case 'p': + opt_p = 1; + break; + + case 'v': + opt_v = 1; + break; + + case 'A': + opt_C = opt_H = 1; + break; + + case 'C': + opt_C = 1; + break; + + case 'H': + opt_H = 1; + break; + + case 'V': + g_opt_V = 1; + break; + + default: + if (strchr(PLOCKSTAT_OPTSTR, c) == NULL) + usage(); + } + } + + /* + * We need a command or at least one pid. + */ + if (argc == optind) + usage(); + + if (opt_C == 0 && opt_H == 0) + opt_C = 1; + + if ((g_dtp = dtrace_open(DTRACE_VERSION, 0, &err)) == NULL) + fatal("failed to initialize dtrace: %s\n", + dtrace_errmsg(NULL, err)); + + /* + * The longest string we trace is 23 bytes long -- so 32 is plenty. + */ + if (dtrace_setopt(g_dtp, "strsize", "32") == -1) + dfatal("failed to set 'strsize'"); + + /* + * 1k should be more than enough for all trace() and printa() actions. + */ + if (dtrace_setopt(g_dtp, "bufsize", "1k") == -1) + dfatal("failed to set 'bufsize'"); + + /* + * The table we produce has the hottest locks at the top. + */ + if (dtrace_setopt(g_dtp, "aggsortrev", NULL) == -1) + dfatal("failed to set 'aggsortrev'"); + + /* + * These are two reasonable defaults which should suffice. + */ + if (dtrace_setopt(g_dtp, "aggsize", "256k") == -1) + dfatal("failed to set 'aggsize'"); + if (dtrace_setopt(g_dtp, "aggrate", "1sec") == -1) + dfatal("failed to set 'aggrate'"); + + /* + * Take a second pass through to look for options that set options now + * that we have an open dtrace handle. + */ + optind = 1; + while ((c = getopt(argc, argv, PLOCKSTAT_OPTSTR)) != EOF) { + switch (c) { + case 's': + g_opt_s = 1; + if (dtrace_setopt(g_dtp, "ustackframes", optarg) == -1) + dfatal("failed to set 'ustackframes'"); + break; + + case 'x': + if ((p = strchr(optarg, '=')) != NULL) + *p++ = '\0'; + + if (dtrace_setopt(g_dtp, optarg, p) != 0) + dfatal("failed to set -x %s", optarg); + break; + + case 'e': + errno = 0; + (void) strtoul(optarg, &end, 10); + if (*optarg == '-' || *end != '\0' || errno != 0) { + (void) fprintf(stderr, "%s: invalid timeout " + "'%s'\n", g_pname, optarg); + usage(); + } + + /* + * Construct a DTrace enabling that will exit after + * the specified number of seconds. + */ + dprog_add("BEGIN\n{\n\tend = timestamp + "); + dprog_add(optarg); + dprog_add(" * 1000000000;\n}\n"); + dprog_add("tick-10hz\n/timestamp >= end/\n"); + dprog_add("{\n\texit(0);\n}\n"); + break; + } + } + + argc -= optind; + argv += optind; + + if (opt_H) { + dprog_add(g_hold_init); + if (g_opt_s == NULL) + dprog_add(g_hold_times); + else + dprog_add(g_hold_histogram); + } + + if (opt_C) { + dprog_add(g_ctnd_init); + if (g_opt_s == NULL) + dprog_add(g_ctnd_times); + else + dprog_add(g_ctnd_histogram); + } + + if (opt_p) { + ulong_t pid; + + if (argc > 1) { + (void) fprintf(stderr, "%s: only one pid is allowed\n", + g_pname); + usage(); + } + + errno = 0; + pid = strtoul(argv[0], &end, 10); + if (*end != '\0' || errno != 0 || (pid_t)pid != pid) { + (void) fprintf(stderr, "%s: invalid pid '%s'\n", + g_pname, argv[0]); + usage(); + } + + if ((g_pr = dtrace_proc_grab(g_dtp, (pid_t)pid, 0)) == NULL) + dfatal(NULL); + } else { + if ((g_pr = dtrace_proc_create(g_dtp, argv[0], argv)) == NULL) + dfatal(NULL); + } + + dprog_compile(); + + if (dtrace_handle_proc(g_dtp, &prochandler, NULL) == -1) + dfatal("failed to establish proc handler"); + + (void) sigemptyset(&act.sa_mask); + act.sa_flags = 0; + act.sa_handler = intr; + (void) sigaction(SIGINT, &act, NULL); + (void) sigaction(SIGTERM, &act, NULL); + + if (dtrace_go(g_dtp) != 0) + dfatal("dtrace_go()"); + + if (dtrace_getopt(g_dtp, "ustackframes", &g_nframes) != 0) + dfatal("failed to get 'ustackframes'"); + + dtrace_proc_continue(g_dtp, g_pr); + + if (opt_v) + (void) printf("%s: tracing enabled for pid %d\n", g_pname, + (int)Pstatus(g_pr)->pr_pid); + + do { + if (!g_intr && !done) + dtrace_sleep(g_dtp); + + if (done || g_intr || g_exited) { + done = 1; + if (dtrace_stop(g_dtp) == -1) + dfatal("couldn't stop tracing"); + } + + switch (dtrace_work(g_dtp, stdout, NULL, chewrec, NULL)) { + case DTRACE_WORKSTATUS_DONE: + done = 1; + break; + case DTRACE_WORKSTATUS_OKAY: + break; + default: + dfatal("processing aborted"); + } + + } while (!done); + + dtrace_close(g_dtp); + + return (0); +} From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 14:59:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 25C5110656AD; Mon, 19 Jul 2010 14:59:24 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id F00948FC28; Mon, 19 Jul 2010 14:59:23 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JExNrt098880; Mon, 19 Jul 2010 14:59:23 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JExNVr098879; Mon, 19 Jul 2010 14:59:23 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007191459.o6JExNVr098879@svn.freebsd.org> From: Rui Paulo Date: Mon, 19 Jul 2010 14:59:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210237 - head/cddl/contrib/opensolaris/cmd/plockstat X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 14:59:24 -0000 Author: rpaulo Date: Mon Jul 19 14:59:23 2010 New Revision: 210237 URL: http://svn.freebsd.org/changeset/base/210237 Log: MFV: OpenSolaris' plockstat utility. Sponsored by: The FreeBSD Foundation Added: head/cddl/contrib/opensolaris/cmd/plockstat/ - copied from r210236, vendor/opensolaris/dist/cmd/plockstat/ Modified: Directory Properties: head/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 15:03:26 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C94A106566B; Mon, 19 Jul 2010 15:03:26 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 284E58FC21; Mon, 19 Jul 2010 15:03:26 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 445E91FFC34; Mon, 19 Jul 2010 15:03:25 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 6FBE384815; Mon, 19 Jul 2010 17:01:11 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Bruce Evans References: <201007182023.o6IKNBaU052215@svn.freebsd.org> <4C436535.7000000@freebsd.org> <20100719132004.B5329@delplex.bde.org> Date: Mon, 19 Jul 2010 17:01:11 +0200 In-Reply-To: <20100719132004.B5329@delplex.bde.org> (Bruce Evans's message of "Mon, 19 Jul 2010 13:41:59 +1000 (EST)") Message-ID: <868w57cy88.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Edward Tomasz Napierala , Colin Percival Subject: Re: svn commit: r210225 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 15:03:26 -0000 Bruce Evans writes: > The "/**" marker is already used to make doxygen markup especially ugly. > I don't know if this is part of the doxygen markup or of the "@foo" > markup does everything. The presence or absence of @keywords is irrelevant, and there are alternative syntaxes, but /** is the most commonly used marker. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 15:05:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBDB0106567C; Mon, 19 Jul 2010 15:05:35 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BB3EE8FC0C; Mon, 19 Jul 2010 15:05:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JF5Z55000439; Mon, 19 Jul 2010 15:05:35 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JF5ZSr000437; Mon, 19 Jul 2010 15:05:35 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201007191505.o6JF5ZSr000437@svn.freebsd.org> From: Adrian Chadd Date: Mon, 19 Jul 2010 15:05:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210238 - head/sys/dev/flash X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 15:05:35 -0000 Author: adrian Date: Mon Jul 19 15:05:35 2010 New Revision: 210238 URL: http://svn.freebsd.org/changeset/base/210238 Log: Include 4k/32k erase commands. These were sourced from the MX25L128 datasheet and match up with what is used in Linux mtd/devices/m25p80.c . Add a FreeBSD keyword whilst I'm here. Modified: head/sys/dev/flash/mx25lreg.h (contents, props changed) Modified: head/sys/dev/flash/mx25lreg.h ============================================================================== --- head/sys/dev/flash/mx25lreg.h Mon Jul 19 14:59:23 2010 (r210237) +++ head/sys/dev/flash/mx25lreg.h Mon Jul 19 15:05:35 2010 (r210238) @@ -23,6 +23,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $FreeBSD$ */ #ifndef __MX25LREG_H__ @@ -41,6 +43,8 @@ #define CMD_PAGE_PROGRAM 0x02 #define CMD_SECTOR_ERASE 0xD8 #define CMD_BULK_ERASE 0xC7 +#define CMD_BLOCK_4K_ERASE 0x20 +#define CMD_BLOCK_32K_ERASE 0x52 /* * Status register flags From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 15:26:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4642C106564A; Mon, 19 Jul 2010 15:26:43 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 315AF8FC17; Mon, 19 Jul 2010 15:26:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JFQhC6005177; Mon, 19 Jul 2010 15:26:43 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JFQhaY005143; Mon, 19 Jul 2010 15:26:43 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007191526.o6JFQhaY005143@svn.freebsd.org> From: Hiroki Sato Date: Mon, 19 Jul 2010 15:26:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210239 - in stable/8/release/doc: en_US.ISO8859-1/errata en_US.ISO8859-1/relnotes share/sgml X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 15:26:43 -0000 Author: hrs Date: Mon Jul 19 15:26:42 2010 New Revision: 210239 URL: http://svn.freebsd.org/changeset/base/210239 Log: - Clean up old contents and bump version numbers. - Add items for security advisories. Modified: stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml stable/8/release/doc/share/sgml/release.dsl stable/8/release/doc/share/sgml/release.ent Modified: stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jul 19 15:05:35 2010 (r210238) +++ stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Mon Jul 19 15:26:42 2010 (r210239) @@ -16,7 +16,7 @@ %release; - + ]>
@@ -40,7 +40,7 @@ $FreeBSD$ - 2009 + 2010 The &os; Documentation Project @@ -119,7 +119,6 @@ For a list of all &os; CERT security advisories, see or . - @@ -144,34 +143,74 @@ - SA-09:17.freebsd-update - 03 December 2009 - Inappropriate directory permissions in freebsd-update(8) + SA-09:15.ssl + 3 Dec 2009 + SSL protocol flaw SA-09:16.rtld - 03 December 2009 - Improper environment sanitization in rtld(1) + 3 Dec 2009 + Improper environment sanitization in &man.rtld.1; - SA-09:15.ssl - 03 December 2009 - SSL protocol flaw + SA-09:17.freebsd-update + 3 Dec 2009 + Inappropriate directory permissions in &man.freebsd-update.8; + + + SA-10:01.bind + 6 Jan 2010 + BIND &man.named.8; cache poisoning with DNSSEC validation + + + SA-10:02.ntpd + 6 Jan 2010 + ntpd mode 7 denial of service + + + SA-10:03.zfs + 6 Jan 2010 + ZFS ZIL playback with insecure permissions + + + SA-10:04.jail + 27 May 2010 + Insufficient environment sanitization in &man.jail.8; + + + SA-10:05.opie + 27 May 2010 + OPIE off-by-one stack overflow + + + SA-10:06.nfsclient + 27 May 2010 + Unvalidated input in nfsclient + + + SA-10:07.mbuf + 13 July 2010 + Lost mbuf flag resulting in data corruption - Open Issues No open issues. - @@ -179,5 +218,4 @@ No news. -
Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Mon Jul 19 15:05:35 2010 (r210238) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Mon Jul 19 15:26:42 2010 (r210239) @@ -15,16 +15,7 @@ $FreeBSD$ - 2000 - 2001 - 2002 - 2003 - 2004 - 2005 - 2006 - 2007 - 2008 - 2009 + 2010 The &os; Documentation Project @@ -106,9 +97,7 @@ What's New This section describes the most user-visible new or changed - features in &os; since &release.prev;, and changes shown in - Release Notes for the previous releases are marked as - [7.1R] and [7.2R]. + features in &os; since &release.prev;. Typical release note items document recent security advisories issued after &release.prev;, new drivers or hardware @@ -142,163 +131,65 @@ - - SA-08:05.openssh - 17 April 2008 - OpenSSH X11-forwarding privilege escalation - - - - SA-08:06.bind - 13 July 2008 - DNS cache poisoning - - - - SA-08:07.amd64 - 3 September 2008 - amd64 swapgs local privilege escalation - - - - SA-08:08.nmount - 3 September 2008 - &man.nmount.2; local arbitrary code execution - - - - SA-08:09.icmp6 - 3 September 2008 - Remote kernel panics on IPv6 connections - - - - SA-08:10.nd6 - 1 October 2008 - IPv6 Neighbor Discovery Protocol routing vulnerability - - - - SA-08:11.arc4random - 24 November 2008 - &man.arc4random.9; predictable sequence vulnerability - - - - SA-08:12.ftpd - 23 December 2008 - Cross-site request forgery in &man.ftpd.8; - - - - SA-08:13.protosw - 23 December 2008 - netgraph / bluetooth privilege escalation - - - - SA-09:01.lukemftpd - 07 January 2009 - Cross-site request forgery in - &man.lukemftpd.8; - - - - SA-09:02.openssl - 07 January 2009 - OpenSSL incorrectly checks for malformed - signatures - - - - SA-09:03.ntpd - 13 January 2009 - ntpd cryptographic signature - bypass - - - - SA-09:04.bind - 13 January 2009 - BIND DNSSEC incorrect checks for - malformed signatures + + SA-09:15.ssl + 3 Dec 2009 + SSL protocol flaw - - - SA-09:05.telnetd - 16 February 2009 - telnetd code execution - vulnerability + + SA-09:16.rtld + 3 Dec 2009 + Improper environment sanitization in &man.rtld.1; - - - SA-09:06.ktimer - 23 March 2009 - Local privilege escalation + + SA-09:17.freebsd-update + 3 Dec 2009 + Inappropriate directory permissions in &man.freebsd-update.8; - - - SA-09:07.libc - 04 April 2009 - Information leak in &man.db.3; + + SA-10:01.bind + 6 Jan 2010 + BIND &man.named.8; cache poisoning with DNSSEC validation - - - SA-09:08.openssl - 22 April 2009 - Remotely exploitable crash in - OpenSSL + + SA-10:02.ntpd + 6 Jan 2010 + ntpd mode 7 denial of service - - - SA-09:09.pipe - 10 June 2009 - Local information disclosure via direct pipe writes + + SA-10:03.zfs + 6 Jan 2010 + ZFS ZIL playback with insecure permissions - - - SA-09:10.ipv6 - 10 June 2009 - Missing permission check on SIOCSIFINFO_IN6 ioctl + + SA-10:04.jail + 27 May 2010 + Insufficient environment sanitization in &man.jail.8; - - - SA-09:11.ntpd - 10 June 2009 - ntpd stack-based buffer-overflow vulnerability + + SA-10:05.opie + 27 May 2010 + OPIE off-by-one stack overflow - - - SA-09:12.bind - 29 July 2009 - BIND &man.named.8; dynamic update message remote DoS + + SA-10:06.nfsclient + 27 May 2010 + Unvalidated input in nfsclient - - SA-09:14.devfs - 2 Oct 2009 - Devfs / VFS NULL pointer race condition + + SA-10:07.mbuf + 13 July 2010 + Lost mbuf flag resulting in data corruption @@ -308,2034 +199,68 @@ Kernel Changes - The &os; GENERIC kernel now - includes Trusted BSD MAC (Mandatory Access Control) support. - No MAC policy module is loaded by default. - - A loader - tunable hw.clflush_disable has been added - to avoid panic (trap 9) - at map_invalidate_cache_range() even if - Intel CPU is used. This tunable can be set - to -1 (default), 0 and - 1. The -1 is same as - the current behavior, which automatically - disables CLFLUSH on Intel CPUs without - CPUID_SS (this should occurr on Xen - only). You can specify 1 when this panic - happens on non-Intel CPUs (such as AMD's). Because disabling - CLFLUSH can reduce performance, you can try - with setting 0 on Intel CPUs - without SS to - use CLFLUSH feature. - - The &man.jail.8; subsystem has been updated. Changes include: - - - - A new virtualization container - named vimage has been implemented. This is - not enabled by default. To enable this, add the following - kernel options to your kernel configuration file and - rebuild the kernel: - - options VIMAGE - - Note that options SCTP in the - GENERIC kernel is not compatible with - options VIMAGE. This limitation will - be fixed in the next release. - - The vimage is a jail with a virtualized instance of - the &os; network stack. It can be created by using - &man.jail.8; command like this: - - &prompt.root; jail -c vnet name=vnet1 host.hostname=vnet1.example.net path=/ persist - - The vimage has own loopback interface and a separated - network stack including the L3 routing tables. Network - interfaces on the system can be moved by using - &man.ifconfig.8; option between the - different vimage jails and outside of them. - - Furthermore, the &man.epair.4; pseudo-interface driver - has been added to help communication between vimage jails. - It emulates a pair of back-to-back connected Ethernet - interfaces. For example, the following commands create an - interface pair of &man.epair.4;: - - &prompt.root; ifconfig epair0 create -epair0a -&prompt.root; ifconfig epair0a -epair0a: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 - ether 02:c0:64:00:07:0a -&prompt.root; ifconfig epair0b -epair0b: flags=8842<BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 - ether 02:c0:64:00:08:0b - - The &man.epair.4; pseudo-interfaces and any physical - interfaces on the system can be moved between vimage jails - by using &man.ifconfig.8; option as - described above. Even after half of an &man.epair.4; pair - is moved, the back-to-back connection still valid and can - be used for inter-jail communication. - - Note that vimage is still considered as an - experimental feature. - - - - A jail can now have arbitrary named parameters similar - to environmental variables and the fixed jail parameters - in the previous releases have been replaced with them. - The jail name can now be used for identifying the jail in - &man.jexec.8; and &man.killall.1;. - - - - Multiple IPv4 and/or IPv6 addresses per jail are now - supported. It is even possible to have jails without - an IP address at all, which basically gives one a chrooted - environment with restricted process view and no - networking. - - - - SCTP (&man.sctp.4;) with IPv6 in jails has been - implemented. - - - - Specific CPU binding by using &man.cpuset.1; has been - implemented. Note that the current implementation allows - the superuser inside of the jail to change the CPU - bindings specified. - - - - A &man.jail.8; can start with a specific route - FIB now. - - - - The &man.ddb.8; kernel debugger now supports a - show jails subcommand. - - - - Compatibility support which permits 32-bit jail - binaries to be used on 64-bit systems to manage jails has - been added. - - - - Note that both version numbers of - jail and prison in - the &man.jail.8; have been updated for the new - features. - - - - The &man.ksyms.4;, kernel symbol table - interface driver has been added. It creates a character - device /dev/ksyms and provides - read-only access to a snapshot of the kernel symbol - table. - - The &os; Linux emulation - layer has been updated to version 2.6.16 and the default Linux - infrastructure port is - emulators/linux_base-f10 (Fedora - 10). - - The &os;/&arch.arm; now - supports mini dump. - - The &os;/&arch.powerpc; now - supports kernel core dump. - - The &os; virtual memory - subsystem now supports fully transparent use of - superpages for application memory; - application memory pages are dynamically promoted to or - demoted from superpages without any modification to - application code. This change offers the benefit of large - page sizes such as improved virtual memory efficiency and - reduced TLB (translation lookaside buffer) misses without - downsides like application changes and virtual memory - inflexibility. This can be enabled by setting a loader tunable - vm.pmap.pg_ps_enabled to - 1 and is enabled by default on - &arch.amd64;. - - The &man.ddb.8; kernel debugger now supports a - show mount subcommand. - - The &os; DTrace subsystem now supports a probe for - process execution. - - The &os; kernel virtual address - space has been increased to 6GB. This allows subsystems to use - larger virtual memory space than before. For example, the - &man.zfs.8; adaptive replacement cache (ARC) requires large - kernel memory space to cache file system data, so it benefits - from the increased address space. Note that the ceiling on - the kernel map size is now 60% of the size of physical memory - rather than an absolute quantity. - - The &man.kld.4; now supports installing 32-bit - system calls to the &os; syscall translation layer from kernel - modules. - - The &man.ktr.4; now supports a new KTR tracepoint in the - KTR_CALLOUT class to note when a callout - routine finishes executing. - - Types of variables used to track the amount of allocated - System V shared memory have been changed from - int to size_t. This - makes it possible to use more than 2 GB of memory for shared - memory segments on 64-bit architectures. Please note the new - BUGS section in &man.shmctl.2; and - /usr/src/UPDATING for limitations of this - temporary solution. - - The &man.sysctl.3; leaf nodes have a flag to tag - themselves as MPSAFE now. - - The &os; 32-bit system call translation layer now - supports installing 32-bit system calls for - VFS_AIO. - - The &man.clock.gettime.2; and the related system calls now - support a clock ID CLOCK_THREAD_CPUTIME_ID, - as defined in POSIX. - - The &man.cpuset.2; system call has been added. This is an - API for thread to CPU binding and CPU resource grouping and - assignment. - - The DTrace, a comprehensive dynamic tracing framework and - &man.dtrace.1; userland utility have been imported from - OpenSolaris. DTrace provides a powerful infrastructure to - permit administrators, developers, and service personnel to - concisely answer arbitrary questions about the behavior of the - operating system and user programs. - - The &man.ddb.4; kernel debugger now has an output capture - facility. Input and output from &man.ddb.4; can now be captured - to a memory buffer for later inspection using &man.sysctl.8; or - a textdump. The new capture command controls - this feature. - - The &man.ddb.4; debugger now supports a simple scripting - facility, which supports a set of named scripts consisting of a - set of &man.ddb.4; commands. These commands can be managed from - within &man.ddb.4; or with the use of the new &man.ddb.8; - utility. More details can be found in the &man.ddb.4; manual - page. - - The &man.ddb.4; ex command now supports - an mode which interprets and prints the - value at the requested address as a symbol. For example, - ex /S aio_swake - prints the name of the function currently registered in - via aio_swake hook. - - The &man.ddb.4; show conifhk command has - been added. This lists hooks currently waiting for completion - in run_interrupt_driven_config_hooks(). - - The &man.fcntl.2; system call now supports - F_DUP2FD command. This is equivalent to - &man.dup.2;, and compatible with the Sun Solaris and the IBM - AIX. - - The &os;'s &man.linux.4; ABI support now implements - sched_setaffinity() and - sched_getaffinity() using real CPU affinity - setting primitives. - - The &man.procstat.1; utility has been added. This is a - process inspection utility which provides some of the missing - functionality from &man.procfs.5; and new functionality for monitoring - and debugging specific processes. - - The client side functionality of &man.rpc.lockd.8; has been - implemented in the &os; kernel. This implementation provides the - correct semantics for &man.flock.2; style locks which are used - by the &man.lockf.1; command line tool and the &man.pidfile.3; - library. It also implements recovery from server restarts and - ensures that dirty cache blocks are written to the server before - obtaining locks (allowing multiple clients to use file locking - to safely share data). Also, a new kernel option - options NFSLOCKD has been added and enabled - by default. If the kernel support is enabled, &man.rpc.lockd.8; - automatically detects and uses the functionality. - - The &os; kernel now supports a new textdump format of kernel - dumps. A textdump provides higher-level information via - mechanically generated/extracted debugging output, rather than a - simple memory dump. This facility can be used to generate brief - kernel bug reports that are rich in debugging information, but - are not dependent on kernel symbol tables or precisely - synchronized source code. More information can be found in the - &man.textdump.4; manual page. - - The &man.wait4.2; system call now supports - flag to keep the process whose status - is returned in a waitable state and - which is equivalent to . - - The &os; kernel now has - initial support of binding interrupts to CPUs. - - The &man.sched.ule.4; scheduler is now the default - process scheduler in GENERIC - kernels. - - The sysctl - variables kern.features.compat_freebsd[456] - have been added. These are corresponding to the kernel options - COMPAT_FREEBSD[456]. + Boot Loader Changes - The boot0 boot - loader now preserves volume ID at offset - 0x1b8 used in other operating systems - - The &man.boot0cfg.8; utility now supports a - new option to set the volume ID. - - The &man.loader.8; now - supports U-Boot support library. - - The &man.boot.8; now supports 4-byte volume ID that - certain versions of &windows; put into the MBR and invoking - PXE by pressing the F6 key on some supported BIOSes. - - The &man.boot.8; BTX loader has been - improved. This fixes several boot issues on recent machines - reported for 7.1-RELEASE and before. - - The &man.loader.8; is now able to obtain DHCP options - from network boot via &man.kenv.2; variables. - - A bug in the &man.loader.8; has been fixed. Now the - following line works as expected: - - loader_conf_files="foo bar ${variable}" - - The BTX kernel used by the boot - loader has been changed to invoke BIOS routines from real - mode. This change makes it possible to boot &os; from USB - devices. - - A new gptboot boot loader has - been added to support booting from a GPT labeled disk. A - new boot command has been added to - &man.gpt.8;, which makes a GPT disk bootable by writing the - required bits of the boot loader, creating a new boot - partition if required. + Hardware Support - The &os; now includes experimental support - for &arch.mips; platform. - - Support for RTC on Dallas Semiconductor chips - has been improved. The DS133x and DS1553 are now - supported. - - The &os;/&arch.arm; now supports - Feroceon and Sheeva embedded CPU, Marvell Orion (88F5281), - Kirkwood (88F6281), Discovery Innovation (MV-78100) - systems-on-chip CPU. - - The &os;/&arch.powerpc; now - supports SMP machines - - The &os;/&arch.powerpc; now - supports E500 (Book-E) embedded CPU and Freescale - PowerQUICCIII MPC85xx system-on-chip (including single and - dual-core). - - The &man.acpi.4; subsystem now supports the System - Resource Affinity Table (SRAT) used to describe affinity - relationships between CPUs and memory, ACPI 3.0 fields in - the MADT including X2APIC entries and UIDs for local SAPICs, and - ACPI 3.0 flags in the FADT. - - The &man.cpufreq.4; framework now - supports PowerPC G5, along with a skeleton SMU driver in order to slew - CPU voltage during frequency changes. - - The sec(4) driver has been added to provide - support for the integrated security engine found in - Freescale system-on-chip devices. - - The &os; TTY layer has been replaced with a - new one which has better support for SMP and robust resource - handling. A tty now has own mutex and it is expected to - improve scalability when compared to the old implementation - based on the Giant lock. - - The &man.uart.4; driver is now the - default driver for serial port devices in favor of the - &man.sio.4; driver. Note that the device nodes have been - renamed from - /dev/cuadN and - /dev/ttydN to - /dev/cuauN and - /dev/ttyuN. - - - Users who are upgrading will need to change their - kernel configurations and possibly also - /boot/loader.conf and - /boot/device.hints. - - - The &os; USB subsystem has been reimplemented - to support modern devices and better SMP scalability. The - new implementation includes Giant-lock-free device drivers, - a Linux compatibility layer, &man.usbconfig.8; utility, full - support for split transaction and isochronous transaction, - and more. Device node names for USB devices are now in a - the form - of /dev/usb/bus.dev.endpoint, - and /dev/usbctl is the master device - node. Note that the &man.ugen.4; driver has nodes for each device as /dev/ugenbus.dev for backward compatibility. - - &os; now supports Ultra SPARC III - (Cheetah) processor family. - - The &man.acpi.4; subsystem now supports a &man.sysctl.8; - variable debug.batt.batt_sleep_ms. On - some laptops with smart batteries, enabling battery - monitoring software causes keystrokes from &man.atkbd.4; to - be lost. This sysctl variable adds a delay in millisecond - to the status checking code as a workaround. - - The &man.acpi.asus.4; driver now supports Asus A8Sr - notebooks. - - Support for the AltiVec, a floating point - and integer SIMD instruction set has been added. - - The &man.cpuctl.4; driver, which provides a special - device /dev/cpuctl as an interface to - the system CPU has been added. The &man.cpuctl.4; - functionality includes the ability to retrieve CPUID - information, read/write machine specific registers (MSR), - and perform CPU firmware updates. - - The &man.cpufreq.4; driver now supports an - hw.est.msr_info loader tunable. When - this is set to 1, it attempts to build a - simple list containing just the high and low frequencies if - it cannot obtain a frequency list from either ACPI or the - static tables. This is disabled by default. - - CPU frequency change notifiers are now - disabled when the TSC is P-state invariant. Also, a new - loader tunable - kern.timecounter.invariant_tsc has been - added to force this behavior by setting it to - non-zero. - - The &man.atkbd.4; driver now disables the interrupt - handler which is called from the keyboard callback function - when polled mode is enabled. This fixes the problem of - duplicated/missing characters at the mountroot prompt on - multi CPU systems while &man.kbdmux.4; is enabled. - - In the &man.pci.4; subsystem INTx is now disabled when - MSI/MSIX is enabled. This change fixes interrupt storm - related issues. - - The schizo(4) driver for Schizo - Fireplane/Safari to PCI 2.1 and Tomatillo JBus to PCI 2.2 - bridges has been added. - - The &man.u3g.4; driver for USB based 3G cards and - dongles including Vodafone Mobile Connect Card 3G, Qualcomm - CDMA MSM, Huawei E220, Novatel U740, Sierra MC875U, and more - has been added. This provides support for the multiple - USB-to-serial interfaces exposed by many 3G USB/PC Card - modems, and the device is accessed through the &man.ucom.4; - driver which makes it behave like a &man.tty.4;. - - The &man.sched.ule.4; scheduler now supports - the loader tunable - machdep.hyperthreading_enabled just like - &man.sched.4bsd.4;. Note that it cannot be modified at - run-time. - - The &man.cmx.4; driver, a driver for Omnikey CardMan 4040 - PCMCIA smartcard readers, has been added. - - The &man.kbdmux.4; driver now - supports &arch.sparc64;. The &man.sunkbd.4; driver now - supports &man.atkbd.4; emulation like &man.ukbd.4;. - - The nvram(4) driver is now - MPSAFE. - - An option of the &man.puc.4; - driver, PUC_FASTINTR, is no longer - supported. - - The &man.psm.4; driver now attempts detection of Synaptics - touchpad before IntelliMouse. Some touchpads will pretend to - be IntelliMouse causing the IntelliMouse probe to work and the - Synaptics detection never to be done. - - The &man.uslcom.4; driver, a driver for Silicon - Laboratories CP2101/CP2102-based USB serial adapters, has been - imported from OpenBSD. + Multimedia Support - The &os; audio subsystem has been improved. - The changes include volume per channel, high quality - fixed-point band-limited SINC sampling rate converter, - bit-perfect mode, transparent/adaptive virtual channel, - and exclusive stream. For more details, see the - &man.snd.4; manual page. - - The &man.agp.4; driver now supports Intel G4X series - graphics chipsets. - - The Direct Rendering Manager - (DRM), a kernel module that - gives direct hardware access to DRI clients, has been - updated. Support for AMD/ATI r500, r600, r700, and IGP - based chips, XGI V3XE/V5/V8, and Intel i915 chipsets has - been improved. - - A new loader tunable hw.drm.msi has - been added to control if DRM uses MSI or not. This is set - to 1 (enabled) by default. - - The snd_au88x0(4) driver for Aureal Vortex - 1/2/Advantage PCI has been removed because it has been - broken for a long time. - - The &man.snd.hda.4; driver has been updated. These - changes include support for multiple codecs per HDA bus, - multiple functional groups per codec, multiple audio - devices per functional group, digital (SPDIF/HDMI) audio - input/output, suspend/resume, and part of multichannel - audio. - - Note that due to added HDMI audio and - logical audio devices support, the updated driver often - provides several PCM devices. This means that in some - cases the system default audio device no longer - corresponds to the users's habitual audio connectors. In - such cases the default device can be specified in audio - applications' setup or defined globally via - hw.snd.default_unit sysctl variable, as - described in the &man.sound.4; manual page. - - The &man.agp.4; driver now supports the - Intel G33 and G45. - - The dpms(4) driver has - been added to use the VESA BIOS for DPMS during suspend and - resume. - - The DRM kernel driver now - supports i915 GME devices. + Network Interface Support - The &man.bwi.4; driver has been added to - provide support for Broadcom BCM43xx IEEE 802.11b/g wireless - network interfaces. - - The &man.cas.4; driver has - been added to provide support for Sun Cassini/Cassini+ and - National Semiconductor DP83065 Saturn Gigabit Ethernet - devices. - - The &man.cxgbtool.8; now supports an - interactive mode for scripting of repeatedly performed - tasks. - - The &man.fxp.4; driver has been improved. Changes include: - - - - The multicast filter re-programming - is now more robust. - - - - The checksum offload feature can be controlled by - &man.ifconfig.8; now. - - - - Rx checksum offload support for 82559 or later - controllers has been added. - - - - TSO (TCP Segmentation Offload) support for 82550 - and 82551 controllers has been added. - - - - WoL (Wake on LAN) support for 82550, 82551, 82558, - and 82559-based controllers has been added. Note that - ICH based controllers are treated as 82559, and 82557, - earlier revisions of 82558, and 82559ER have no WoL - capability. - - - - VLAN hardware tag insertion/stripping support and - Tx/Rx checksum offload for VLAN frames support has - been added. Note that the VLAN hardware assistance is - available only on 82550 or 82551-based - controllers. - - - - The mge(4) driver has - been added to provide support for Marvell Gigabit Ethernet - controllers found on ARM-based SOCs (Orion, Kirkwood, - Discovery), as well as on system controllers for PowerPC - processors (MV64430, MV6446x). - - The &man.miibus.4; driver now supports - the Marvell 88E3016. - - The &man.msk.4; driver now supports Yukon - FE+ A0 including 88E8040, 88E8040T, 88E8048 and - 88E8070. - - The &man.mwl.4; driver has been added to - provide support for Marvell 88W8363 IEEE 802.11n wireless - network devices. - - The &man.mxge.4; driver now supports some newer - revisions and 10GBASE-LRM and 10GBASE-Twinax media - types. The firmware version has been updated to 1.4.43. - - The &man.nge.4; driver has been improved and - now works on all platforms. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 16:38:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D1B4C1065676; Mon, 19 Jul 2010 16:38:45 +0000 (UTC) (envelope-from nork@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C055E8FC1B; Mon, 19 Jul 2010 16:38:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JGcjO4021522; Mon, 19 Jul 2010 16:38:45 GMT (envelope-from nork@svn.freebsd.org) Received: (from nork@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JGcjFs021520; Mon, 19 Jul 2010 16:38:45 GMT (envelope-from nork@svn.freebsd.org) Message-Id: <201007191638.o6JGcjFs021520@svn.freebsd.org> From: Norikatsu Shigemura Date: Mon, 19 Jul 2010 16:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210243 - head/usr.sbin/tzsetup X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 16:38:45 -0000 Author: nork Date: Mon Jul 19 16:38:45 2010 New Revision: 210243 URL: http://svn.freebsd.org/changeset/base/210243 Log: Fix support for chrooted installs. Approved by: imp (mentor) Modified: head/usr.sbin/tzsetup/tzsetup.c Modified: head/usr.sbin/tzsetup/tzsetup.c ============================================================================== --- head/usr.sbin/tzsetup/tzsetup.c Mon Jul 19 16:08:47 2010 (r210242) +++ head/usr.sbin/tzsetup/tzsetup.c Mon Jul 19 16:38:45 2010 (r210243) @@ -821,16 +821,16 @@ main(int argc, char **argv) "or you don't know, please choose NO here!"); if (!DIALOG_UTC(title, prompt, 7, 72)) { if (reallydoit) - unlink(_PATH_WALL_CMOS_CLOCK); + unlink(path_wall_cmos_clock); } else { if (reallydoit) { - fd = open(_PATH_WALL_CMOS_CLOCK, + fd = open(path_wall_cmos_clock, O_WRONLY | O_CREAT | O_TRUNC, S_IRUSR | S_IRGRP | S_IROTH); if (fd < 0) { end_dialog(); err(1, "create %s", - _PATH_WALL_CMOS_CLOCK); + path_wall_cmos_clock); } close(fd); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 18:01:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E20691065673; Mon, 19 Jul 2010 18:01:06 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CEF8A8FC08; Mon, 19 Jul 2010 18:01:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JI16jP040263; Mon, 19 Jul 2010 18:01:06 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JI167C040261; Mon, 19 Jul 2010 18:01:06 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007191801.o6JI167C040261@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Jul 2010 18:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210244 - head/sys/pci X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 18:01:07 -0000 Author: yongari Date: Mon Jul 19 18:01:06 2010 New Revision: 210244 URL: http://svn.freebsd.org/changeset/base/210244 Log: Implement WOL. WOL is supported on RTL8139B or newer controllers. PR: kern/148013 Modified: head/sys/pci/if_rl.c Modified: head/sys/pci/if_rl.c ============================================================================== --- head/sys/pci/if_rl.c Mon Jul 19 16:38:45 2010 (r210243) +++ head/sys/pci/if_rl.c Mon Jul 19 18:01:06 2010 (r210244) @@ -222,6 +222,8 @@ static int rl_suspend(device_t); static void rl_tick(void *); static void rl_txeof(struct rl_softc *); static void rl_watchdog(struct rl_softc *); +static void rl_setwol(struct rl_softc *); +static void rl_clrwol(struct rl_softc *); #ifdef RL_USEIOSPACE #define RL_RES SYS_RES_IOPORT @@ -803,7 +805,7 @@ rl_attach(device_t dev) struct rl_type *t; struct sysctl_ctx_list *ctx; struct sysctl_oid_list *children; - int error = 0, i, rid; + int error = 0, hwrev, i, pmc, rid; int unit; uint16_t rl_did = 0; char tn[32]; @@ -938,6 +940,25 @@ rl_attach(device_t dev) ifp->if_start = rl_start; ifp->if_init = rl_init; ifp->if_capabilities = IFCAP_VLAN_MTU; + /* Check WOL for RTL8139B or newer controllers. */ + if (sc->rl_type == RL_8139 && + pci_find_extcap(sc->rl_dev, PCIY_PMG, &pmc) == 0) { + hwrev = CSR_READ_4(sc, RL_TXCFG) & RL_TXCFG_HWREV; + switch (hwrev) { + case RL_HWREV_8139B: + case RL_HWREV_8130: + case RL_HWREV_8139C: + case RL_HWREV_8139D: + case RL_HWREV_8101: + case RL_HWREV_8100: + ifp->if_capabilities |= IFCAP_WOL; + /* Disable WOL. */ + rl_clrwol(sc); + break; + default: + break; + } + } ifp->if_capenable = ifp->if_capabilities; #ifdef DEVICE_POLLING ifp->if_capabilities |= IFCAP_POLLING; @@ -1926,7 +1947,7 @@ rl_ioctl(struct ifnet *ifp, u_long comma struct ifreq *ifr = (struct ifreq *)data; struct mii_data *mii; struct rl_softc *sc = ifp->if_softc; - int error = 0; + int error = 0, mask; switch (command) { case SIOCSIFFLAGS: @@ -1953,6 +1974,7 @@ rl_ioctl(struct ifnet *ifp, u_long comma error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command); break; case SIOCSIFCAP: + mask = ifr->ifr_reqcap ^ ifp->if_capenable; #ifdef DEVICE_POLLING if (ifr->ifr_reqcap & IFCAP_POLLING && !(ifp->if_capenable & IFCAP_POLLING)) { @@ -1978,6 +2000,15 @@ rl_ioctl(struct ifnet *ifp, u_long comma return (error); } #endif /* DEVICE_POLLING */ + if ((mask & IFCAP_WOL) != 0 && + (ifp->if_capabilities & IFCAP_WOL) != 0) { + if ((mask & IFCAP_WOL_UCAST) != 0) + ifp->if_capenable ^= IFCAP_WOL_UCAST; + if ((mask & IFCAP_WOL_MCAST) != 0) + ifp->if_capenable ^= IFCAP_WOL_MCAST; + if ((mask & IFCAP_WOL_MAGIC) != 0) + ifp->if_capenable ^= IFCAP_WOL_MAGIC; + } break; default: error = ether_ioctl(ifp, command, data); @@ -2066,6 +2097,7 @@ rl_suspend(device_t dev) RL_LOCK(sc); rl_stop(sc); + rl_setwol(sc); sc->suspended = 1; RL_UNLOCK(sc); @@ -2082,12 +2114,31 @@ rl_resume(device_t dev) { struct rl_softc *sc; struct ifnet *ifp; + int pmc; + uint16_t pmstat; sc = device_get_softc(dev); ifp = sc->rl_ifp; RL_LOCK(sc); + if ((ifp->if_capabilities & IFCAP_WOL) != 0 && + pci_find_extcap(sc->rl_dev, PCIY_PMG, &pmc) == 0) { + /* Disable PME and clear PME status. */ + pmstat = pci_read_config(sc->rl_dev, + pmc + PCIR_POWER_STATUS, 2); + if ((pmstat & PCIM_PSTAT_PMEENABLE) != 0) { + pmstat &= ~PCIM_PSTAT_PMEENABLE; + pci_write_config(sc->rl_dev, + pmc + PCIR_POWER_STATUS, pmstat, 2); + } + /* + * Clear WOL matching such that normal Rx filtering + * wouldn't interfere with WOL patterns. + */ + rl_clrwol(sc); + } + /* reinitialize interface if necessary */ if (ifp->if_flags & IFF_UP) rl_init_locked(sc); @@ -2112,7 +2163,93 @@ rl_shutdown(device_t dev) RL_LOCK(sc); rl_stop(sc); + /* + * Mark interface as down since otherwise we will panic if + * interrupt comes in later on, which can happen in some + * cases. + */ + sc->rl_ifp->if_flags &= ~IFF_UP; + rl_setwol(sc); RL_UNLOCK(sc); return (0); } + +static void +rl_setwol(struct rl_softc *sc) +{ + struct ifnet *ifp; + int pmc; + uint16_t pmstat; + uint8_t v; + + RL_LOCK_ASSERT(sc); + + ifp = sc->rl_ifp; + if ((ifp->if_capabilities & IFCAP_WOL) == 0) + return; + if (pci_find_extcap(sc->rl_dev, PCIY_PMG, &pmc) != 0) + return; + + /* Enable config register write. */ + CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE); + + /* Enable PME. */ + v = CSR_READ_1(sc, RL_CFG1); + v &= ~RL_CFG1_PME; + if ((ifp->if_capenable & IFCAP_WOL) != 0) + v |= RL_CFG1_PME; + CSR_WRITE_1(sc, RL_CFG1, v); + + v = CSR_READ_1(sc, RL_CFG3); + v &= ~(RL_CFG3_WOL_LINK | RL_CFG3_WOL_MAGIC); + if ((ifp->if_capenable & IFCAP_WOL_MAGIC) != 0) + v |= RL_CFG3_WOL_MAGIC; + CSR_WRITE_1(sc, RL_CFG3, v); + + /* Config register write done. */ + CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); + + v = CSR_READ_1(sc, RL_CFG5); + v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST); + v &= ~RL_CFG5_WOL_LANWAKE; + if ((ifp->if_capenable & IFCAP_WOL_UCAST) != 0) + v |= RL_CFG5_WOL_UCAST; + if ((ifp->if_capenable & IFCAP_WOL_MCAST) != 0) + v |= RL_CFG5_WOL_MCAST | RL_CFG5_WOL_BCAST; + if ((ifp->if_capenable & IFCAP_WOL) != 0) + v |= RL_CFG5_WOL_LANWAKE; + CSR_WRITE_1(sc, RL_CFG5, v); + /* Request PME if WOL is requested. */ + pmstat = pci_read_config(sc->rl_dev, pmc + PCIR_POWER_STATUS, 2); + pmstat &= ~(PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE); + if ((ifp->if_capenable & IFCAP_WOL) != 0) + pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE; + pci_write_config(sc->rl_dev, pmc + PCIR_POWER_STATUS, pmstat, 2); +} + +static void +rl_clrwol(struct rl_softc *sc) +{ + struct ifnet *ifp; + uint8_t v; + + ifp = sc->rl_ifp; + if ((ifp->if_capabilities & IFCAP_WOL) == 0) + return; + + /* Enable config register write. */ + CSR_WRITE_1(sc, RL_EECMD, RL_EE_MODE); + + v = CSR_READ_1(sc, RL_CFG3); + v &= ~(RL_CFG3_WOL_LINK | RL_CFG3_WOL_MAGIC); + CSR_WRITE_1(sc, RL_CFG3, v); + + /* Config register write done. */ + CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); + + v = CSR_READ_1(sc, RL_CFG5); + v &= ~(RL_CFG5_WOL_BCAST | RL_CFG5_WOL_MCAST | RL_CFG5_WOL_UCAST); + v &= ~RL_CFG5_WOL_LANWAKE; + CSR_WRITE_1(sc, RL_CFG5, v); +} From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 18:20:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 30CD61065672; Mon, 19 Jul 2010 18:20:45 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1DA5C8FC1B; Mon, 19 Jul 2010 18:20:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JIKja5044888; Mon, 19 Jul 2010 18:20:45 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JIKjSl044886; Mon, 19 Jul 2010 18:20:45 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201007191820.o6JIKjSl044886@svn.freebsd.org> From: Andriy Gapon Date: Mon, 19 Jul 2010 18:20:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210245 - head/contrib/binutils/ld/emultempl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 18:20:45 -0000 Author: avg Date: Mon Jul 19 18:20:44 2010 New Revision: 210245 URL: http://svn.freebsd.org/changeset/base/210245 Log: binutils/ld: fix incorrect placement of __start_SECNAME in some cases __start_SECNAME and __stop_SECNAME symbols are automatically generated by ld for orphan sections, i.e. those not explicitely referenced by a linker script. The symbols are supposed to be placed correspondingly at the start and the end of the section in output file. In some cases __start_SECNAME may be placed at the address after the end of the previous section (if any) and before the start the section. This happens when following conditions are met: 1. the orphan section is found in more than one input file 2. the orphan section has different alignment requirements across input files 3. the first instance of the section encountered doesn't have the greatest alignment requirement In these conditions resulting output section will be placed at address after the end of the previous section aligned to the greatest alignment requirement in the inputs, but __start_SECNAME will be placed at address after the end of the previous section aligned to the alignment requirement of the first input in which the section is encountered. See commit message of r196118 for a concrete example of problems caused by this bug. The fix is to place __start_SECNAME inside the section and use ABSOLUTE directive, rather than placing __start_SECNAME outside the section and trying to guess address alignment. This fix is in line with upstream binutils change/fix made between versions 2.19 and 2.20 in revision of 1.307 ldlang.c. MFC after: 3 weeks Modified: head/contrib/binutils/ld/emultempl/elf32.em Modified: head/contrib/binutils/ld/emultempl/elf32.em ============================================================================== --- head/contrib/binutils/ld/emultempl/elf32.em Mon Jul 19 18:01:06 2010 (r210244) +++ head/contrib/binutils/ld/emultempl/elf32.em Mon Jul 19 18:20:44 2010 (r210245) @@ -1314,26 +1314,6 @@ gld${EMULATION_NAME}_place_orphan (lang_ lang_list_init (stat_ptr); } - if (config.build_constructors) - { - /* If the name of the section is representable in C, then create - symbols to mark the start and the end of the section. */ - for (ps = secname; *ps != '\0'; ps++) - if (! ISALNUM (*ps) && *ps != '_') - break; - if (*ps == '\0') - { - char *symname; - etree_type *e_align; - - symname = (char *) xmalloc (ps - secname + sizeof "__start_"); - sprintf (symname, "__start_%s", secname); - e_align = exp_unop (ALIGN_K, - exp_intop ((bfd_vma) 1 << s->alignment_power)); - lang_add_assignment (exp_assop ('=', symname, e_align)); - } - } - address = NULL; if (link_info.relocatable || (s->flags & (SEC_LOAD | SEC_ALLOC)) == 0) address = exp_intop ((bfd_vma) 0); @@ -1354,6 +1334,26 @@ gld${EMULATION_NAME}_place_orphan (lang_ (etree_type *) NULL, load_base); + if (config.build_constructors) + { + /* If the name of the section is representable in C, then create + symbols to mark the start and the end of the section. */ + for (ps = secname; *ps != '\0'; ps++) + if (! ISALNUM (*ps) && *ps != '_') + break; + if (*ps == '\0') + { + char *symname; + etree_type *e_align; + + symname = (char *) xmalloc (ps - secname + sizeof "__start_"); + sprintf (symname, "__start_%s", secname); + lang_add_assignment (exp_assop ('=', symname, + exp_unop (ABSOLUTE, + exp_nameop (NAME, ".")))); + } + } + lang_add_section (&os->children, s, os, file); lang_leave_output_section_statement From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 18:41:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3BDA6106564A; Mon, 19 Jul 2010 18:41:52 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0F4FF8FC1A; Mon, 19 Jul 2010 18:41:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JIfptF049681; Mon, 19 Jul 2010 18:41:51 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JIfpLN049679; Mon, 19 Jul 2010 18:41:51 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007191841.o6JIfpLN049679@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 19 Jul 2010 18:41:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210246 - in head/sys: arm/mv conf dev/fdt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 18:41:52 -0000 Author: raj Date: Mon Jul 19 18:41:50 2010 New Revision: 210246 URL: http://svn.freebsd.org/changeset/base/210246 Log: Move MRVL FDT fixups and PIC decode routine to a platform specific area. This allows for better encapsulation (and eliminates generic fdt_arm.c, at least for now). Deleted: head/sys/dev/fdt/fdt_arm.c Modified: head/sys/arm/mv/common.c head/sys/conf/files.arm Modified: head/sys/arm/mv/common.c ============================================================================== --- head/sys/arm/mv/common.c Mon Jul 19 18:20:44 2010 (r210245) +++ head/sys/arm/mv/common.c Mon Jul 19 18:41:50 2010 (r210246) @@ -1834,3 +1834,45 @@ fdt_win_setup(void) return (0); } + +static void +fdt_fixup_busfreq(phandle_t root) +{ + phandle_t sb; + pcell_t freq; + + /* + * This fixup sets the simple-bus bus-frequency property. + */ + + if ((sb = fdt_find_compatible(root, "simple-bus", 1)) == 0) + return; + + freq = cpu_to_fdt32(get_tclk()); + OF_setprop(sb, "bus-frequency", (void *)&freq, sizeof(freq)); +} + +struct fdt_fixup_entry fdt_fixup_table[] = { + { "mrvl,DB-88F6281", &fdt_fixup_busfreq }, + { NULL, NULL } +}; + +static int +fdt_pic_decode_ic(phandle_t node, pcell_t *intr, int *interrupt, int *trig, + int *pol) +{ + + if (!fdt_is_compatible(node, "mrvl,pic")) + return (ENXIO); + + *interrupt = fdt32_to_cpu(intr[0]); + *trig = INTR_TRIGGER_CONFORM; + *pol = INTR_POLARITY_CONFORM; + + return (0); +} + +fdt_pic_decode_t fdt_pic_table[] = { + &fdt_pic_decode_ic, + NULL +}; Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Mon Jul 19 18:20:44 2010 (r210245) +++ head/sys/conf/files.arm Mon Jul 19 18:41:50 2010 (r210246) @@ -47,7 +47,6 @@ arm/arm/vm_machdep.c standard arm/fpe-arm/armfpe_glue.S optional armfpe arm/fpe-arm/armfpe_init.c optional armfpe arm/fpe-arm/armfpe.S optional armfpe -dev/fdt/fdt_arm.c optional fdt dev/hwpmc/hwpmc_arm.c optional hwpmc dev/ofw/openfirm.c optional fdt dev/ofw/openfirmio.c optional fdt From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 18:47:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5FD54106564A; Mon, 19 Jul 2010 18:47:20 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4BD818FC14; Mon, 19 Jul 2010 18:47:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JIlKqs050977; Mon, 19 Jul 2010 18:47:20 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JIlJYG050941; Mon, 19 Jul 2010 18:47:19 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007191847.o6JIlJYG050941@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 19 Jul 2010 18:47:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210247 - in head/sys: arm/include arm/mv dev/fdt dev/uart powerpc/booke powerpc/include X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 18:47:20 -0000 Author: raj Date: Mon Jul 19 18:47:18 2010 New Revision: 210247 URL: http://svn.freebsd.org/changeset/base/210247 Log: Eliminate FDT_IMMR_VA define. This removes platform dependencies from /fdt.h for the benfit of portability. Modified: head/sys/arm/include/fdt.h head/sys/arm/mv/mv_machdep.c head/sys/dev/fdt/fdt_common.c head/sys/dev/fdt/fdt_common.h head/sys/dev/uart/uart_bus_fdt.c head/sys/powerpc/booke/machdep.c head/sys/powerpc/include/fdt.h Modified: head/sys/arm/include/fdt.h ============================================================================== --- head/sys/arm/include/fdt.h Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/arm/include/fdt.h Mon Jul 19 18:47:18 2010 (r210247) @@ -37,18 +37,10 @@ #include #include +#include #include #include -#include -#include - -/* - * This is the base virtual address the internal mem-mapped registers (IMMR) - * range is available at. - */ -#define FDT_IMMR_VA MV_BASE - /* Max interrupt number */ #define FDT_INTR_MAX NIRQ Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/arm/mv/mv_machdep.c Mon Jul 19 18:47:18 2010 (r210247) @@ -380,7 +380,7 @@ initarm(void *mdp, void *unused __unused &memsize) != 0) while(1); - if (fdt_immr_addr() != 0) + if (fdt_immr_addr(MV_BASE) != 0) while (1); /* Platform-specific initialisation */ Modified: head/sys/dev/fdt/fdt_common.c ============================================================================== --- head/sys/dev/fdt/fdt_common.c Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/dev/fdt/fdt_common.c Mon Jul 19 18:47:18 2010 (r210247) @@ -63,7 +63,7 @@ vm_offset_t fdt_immr_va; vm_offset_t fdt_immr_size; int -fdt_immr_addr(void) +fdt_immr_addr(vm_offset_t immr_va) { pcell_t ranges[6], *rangesptr; phandle_t node; @@ -122,7 +122,7 @@ moveon: size = fdt_data_get((void *)rangesptr, size_cells); fdt_immr_pa = base; - fdt_immr_va = FDT_IMMR_VA; + fdt_immr_va = immr_va; fdt_immr_size = size; return (0); Modified: head/sys/dev/fdt/fdt_common.h ============================================================================== --- head/sys/dev/fdt/fdt_common.h Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/dev/fdt/fdt_common.h Mon Jul 19 18:47:18 2010 (r210247) @@ -90,7 +90,7 @@ int fdt_data_verify(void *, int); phandle_t fdt_find_compatible(phandle_t, const char *, int); int fdt_get_mem_regions(struct mem_region *, int *, uint32_t *); int fdt_get_phyaddr(phandle_t node, int *); -int fdt_immr_addr(void); +int fdt_immr_addr(vm_offset_t); int fdt_regsize(phandle_t, u_long *, u_long *); int fdt_intr_decode(phandle_t, pcell_t *, int *, int *, int *); int fdt_intr_to_rl(phandle_t, struct resource_list *, struct fdt_sense_level *); Modified: head/sys/dev/uart/uart_bus_fdt.c ============================================================================== --- head/sys/dev/uart/uart_bus_fdt.c Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/dev/uart/uart_bus_fdt.c Mon Jul 19 18:47:18 2010 (r210247) @@ -188,7 +188,7 @@ uart_cpu_getdev(int devtype, struct uart err = fdt_regsize(node, &start, &size); if (err) return (ENXIO); - start += FDT_IMMR_VA; + start += fdt_immr_va; uart_bus_space_mem = fdtbus_bs_tag; uart_bus_space_io = NULL; Modified: head/sys/powerpc/booke/machdep.c ============================================================================== --- head/sys/powerpc/booke/machdep.c Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/powerpc/booke/machdep.c Mon Jul 19 18:47:18 2010 (r210247) @@ -319,7 +319,7 @@ e500_init(u_int32_t startkernel, u_int32 if (OF_init((void *)dtbp) != 0) while (1); - if (fdt_immr_addr() != 0) + if (fdt_immr_addr(CCSRBAR_VA) != 0) while (1); OF_interpret("perform-fixup", 0); Modified: head/sys/powerpc/include/fdt.h ============================================================================== --- head/sys/powerpc/include/fdt.h Mon Jul 19 18:41:50 2010 (r210246) +++ head/sys/powerpc/include/fdt.h Mon Jul 19 18:47:18 2010 (r210247) @@ -34,14 +34,6 @@ #include #include -#include -#include - -/* - * This is the base virtual address the internal mem-mapped registers (IMMR) - * range is available at. - */ -#define FDT_IMMR_VA CCSRBAR_VA /* Max interrupt number */ #define FDT_INTR_MAX INTR_VECTORS From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 18:56:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6C2951065674; Mon, 19 Jul 2010 18:56:18 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 598468FC17; Mon, 19 Jul 2010 18:56:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JIuILL053061; Mon, 19 Jul 2010 18:56:18 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JIuI85053059; Mon, 19 Jul 2010 18:56:18 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007191856.o6JIuI85053059@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 19 Jul 2010 18:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210248 - head/sys/dev/syscons X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 18:56:18 -0000 Author: jkim Date: Mon Jul 19 18:56:18 2010 New Revision: 210248 URL: http://svn.freebsd.org/changeset/base/210248 Log: Fix two long-standing line wrapping bugs in VGA renderer for pixel mode. Font size may be smaller than 16 and logical scan line may be larger than the displayed scan line. MFC after: 3 days Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Mon Jul 19 18:47:18 2010 (r210247) +++ head/sys/dev/syscons/scvgarndr.c Mon Jul 19 18:56:18 2010 (r210248) @@ -766,8 +766,9 @@ vga_vgadraw_direct(scr_stat *scp, int fr d += 8 * pixel_size; if ((i % scp->xsize) == scp->xsize - 1) - d += scp->xoff * 16 * pixel_size + - (scp->font_size - 1) * line_width; + d += scp->xoff * scp->font_size * pixel_size + + scp->font_size * line_width - + scp->xpixel * pixel_size; } } From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 19:19:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4C8DC106566B; Mon, 19 Jul 2010 19:19:34 +0000 (UTC) (envelope-from raj@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 38C198FC1D; Mon, 19 Jul 2010 19:19:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JJJYGn058379; Mon, 19 Jul 2010 19:19:34 GMT (envelope-from raj@svn.freebsd.org) Received: (from raj@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JJJYVX058372; Mon, 19 Jul 2010 19:19:34 GMT (envelope-from raj@svn.freebsd.org) Message-Id: <201007191919.o6JJJYVX058372@svn.freebsd.org> From: Rafal Jaworowski Date: Mon, 19 Jul 2010 19:19:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210249 - in head/sys: arm/mv arm/mv/discovery arm/mv/kirkwood arm/mv/orion conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 19:19:34 -0000 Author: raj Date: Mon Jul 19 19:19:33 2010 New Revision: 210249 URL: http://svn.freebsd.org/changeset/base/210249 Log: Now that we are fully FDT-driven on MRVL platforms, remove PHYSMEM_SIZE option. Modified: head/sys/arm/mv/discovery/std.db78xxx head/sys/arm/mv/kirkwood/std.db88f6xxx head/sys/arm/mv/kirkwood/std.sheevaplug head/sys/arm/mv/mv_machdep.c head/sys/arm/mv/orion/std.db88f5xxx head/sys/conf/options.arm Modified: head/sys/arm/mv/discovery/std.db78xxx ============================================================================== --- head/sys/arm/mv/discovery/std.db78xxx Mon Jul 19 18:56:18 2010 (r210248) +++ head/sys/arm/mv/discovery/std.db78xxx Mon Jul 19 19:19:33 2010 (r210249) @@ -9,5 +9,4 @@ makeoptions KERNVIRTADDR=0xc0900000 options KERNPHYSADDR=0x00900000 options KERNVIRTADDR=0xc0900000 options PHYSADDR=0x00000000 -options PHYSMEM_SIZE=0x20000000 options STARTUP_PAGETABLE_ADDR=0x00100000 Modified: head/sys/arm/mv/kirkwood/std.db88f6xxx ============================================================================== --- head/sys/arm/mv/kirkwood/std.db88f6xxx Mon Jul 19 18:56:18 2010 (r210248) +++ head/sys/arm/mv/kirkwood/std.db88f6xxx Mon Jul 19 19:19:33 2010 (r210249) @@ -3,5 +3,3 @@ include "../mv/std.mv" include "../mv/kirkwood/std.kirkwood" files "../mv/kirkwood/files.kirkwood" - -options PHYSMEM_SIZE=0x20000000 Modified: head/sys/arm/mv/kirkwood/std.sheevaplug ============================================================================== --- head/sys/arm/mv/kirkwood/std.sheevaplug Mon Jul 19 18:56:18 2010 (r210248) +++ head/sys/arm/mv/kirkwood/std.sheevaplug Mon Jul 19 19:19:33 2010 (r210249) @@ -3,5 +3,3 @@ include "../mv/std.mv" include "../mv/kirkwood/std.kirkwood" files "../mv/kirkwood/files.sheevaplug" - -options PHYSMEM_SIZE=0x20000000 Modified: head/sys/arm/mv/mv_machdep.c ============================================================================== --- head/sys/arm/mv/mv_machdep.c Mon Jul 19 18:56:18 2010 (r210248) +++ head/sys/arm/mv/mv_machdep.c Mon Jul 19 19:19:33 2010 (r210249) @@ -153,7 +153,7 @@ static int availmem_regions_sz; static void print_kenv(void); static void print_kernel_section_addr(void); -static void physmap_init(int); +static void physmap_init(void); static int platform_devmap_init(void); static int platform_mpp_init(void); @@ -202,7 +202,7 @@ print_kernel_section_addr(void) } static void -physmap_init(int hardcoded) +physmap_init(void) { int i, j, cnt; vm_offset_t phys_kernelend, kernload; @@ -213,22 +213,6 @@ physmap_init(int hardcoded) kernload = KERNPHYSADDR; /* - * Use hardcoded physical addresses if we don't use memory regions - * from metadata. - */ - if (hardcoded) { - phys_avail[0] = 0; - phys_avail[1] = kernload; - - phys_avail[2] = phys_kernelend; - phys_avail[3] = PHYSMEM_SIZE; - - phys_avail[4] = 0; - phys_avail[5] = 0; - return; - } - - /* * Remove kernel physical address range from avail * regions list. Page align all regions. * Non-page aligned memory isn't very interesting to us. @@ -352,12 +336,6 @@ initarm(void *mdp, void *unused __unused } else { /* Fall back to hardcoded metadata. */ lastaddr = fake_preload_metadata(); - - /* - * Assume a single memory region of size specified in board - * configuration file. - */ - memsize = PHYSMEM_SIZE; } #if defined(FDT_DTB_STATIC) @@ -602,10 +580,8 @@ initarm(void *mdp, void *unused __unused /* * Prepare map of physical memory regions available to vm subsystem. - * If metadata pointer doesn't point to a valid address, use hardcoded - * values. */ - physmap_init((mdp != NULL) ? 0 : 1); + physmap_init(); /* Do basic tuning, hz etc */ init_param1(); Modified: head/sys/arm/mv/orion/std.db88f5xxx ============================================================================== --- head/sys/arm/mv/orion/std.db88f5xxx Mon Jul 19 18:56:18 2010 (r210248) +++ head/sys/arm/mv/orion/std.db88f5xxx Mon Jul 19 19:19:33 2010 (r210249) @@ -9,5 +9,4 @@ makeoptions KERNVIRTADDR=0xc0900000 options KERNPHYSADDR=0x00900000 options KERNVIRTADDR=0xc0900000 options PHYSADDR=0x00000000 -options PHYSMEM_SIZE=0x08000000 options STARTUP_PAGETABLE_ADDR=0x00100000 Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Mon Jul 19 18:56:18 2010 (r210248) +++ head/sys/conf/options.arm Mon Jul 19 19:19:33 2010 (r210249) @@ -23,7 +23,6 @@ KERNPHYSADDR opt_global.h KERNVIRTADDR opt_global.h LOADERRAMADDR opt_global.h PHYSADDR opt_global.h -PHYSMEM_SIZE opt_global.h SKYEYE_WORKAROUNDS opt_global.h SOC_MV_DISCOVERY opt_global.h SOC_MV_KIRKWOOD opt_global.h From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 19:51:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E80C2106564A; Mon, 19 Jul 2010 19:51:17 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D49458FC13; Mon, 19 Jul 2010 19:51:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JJpHDS065637; Mon, 19 Jul 2010 19:51:17 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JJpHku065635; Mon, 19 Jul 2010 19:51:17 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201007191951.o6JJpHku065635@svn.freebsd.org> From: Jamie Gritton Date: Mon, 19 Jul 2010 19:51:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210251 - stable/8/lib/libjail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 19:51:18 -0000 Author: jamie Date: Mon Jul 19 19:51:17 2010 New Revision: 210251 URL: http://svn.freebsd.org/changeset/base/210251 Log: MFC r210133: Don't import parameter values in jail_getv, except for the search key. Remove the internal jailparam_vlist, in favor of using variants of its logic separately in jail_setv and jail_getv. Free the temporary parameter list and exported values in jail_setv and jail_getv. Noted by: Stanislav Uzunchev Modified: stable/8/lib/libjail/jail.c Directory Properties: stable/8/lib/libjail/ (props changed) Modified: stable/8/lib/libjail/jail.c ============================================================================== --- stable/8/lib/libjail/jail.c Mon Jul 19 19:40:38 2010 (r210250) +++ stable/8/lib/libjail/jail.c Mon Jul 19 19:51:17 2010 (r210251) @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); static int jailparam_import_enum(const char **values, int nvalues, const char *valstr, size_t valsize, int *value); -static int jailparam_vlist(struct jailparam **jpp, va_list ap); static int jailparam_type(struct jailparam *jp); static char *noname(const char *name); static char *nononame(const char *name); @@ -74,16 +73,31 @@ static const char *jailsys_values[] = { int jail_setv(int flags, ...) { - va_list ap; + va_list ap, tap; struct jailparam *jp; - int njp; + const char *name, *value; + int njp, jid; + /* Create the parameter list and import the parameters. */ va_start(ap, flags); - njp = jailparam_vlist(&jp, ap); + va_copy(tap, ap); + for (njp = 0; va_arg(tap, char *) != NULL; njp++) + (void)va_arg(tap, char *); + va_end(tap); + jp = alloca(njp * sizeof(struct jailparam)); + for (njp = 0; (name = va_arg(ap, char *)) != NULL; njp++) { + value = va_arg(ap, char *); + if (jailparam_init(jp + njp, name) < 0 || + jailparam_import(jp + njp, value) < 0) { + jailparam_free(jp, njp); + va_end(ap); + return (-1); + } + } va_end(ap); - if (njp < 0) - return (njp); - return (jailparam_set(jp, njp, flags)); + jid = jailparam_set(jp, njp, flags); + jailparam_free(jp, njp); + return (jid); } /* @@ -94,48 +108,85 @@ int jail_getv(int flags, ...) { va_list ap, tap; - struct jailparam *jp; - char *valarg; - const char *value; - int njp, i, jid, namekey, zero; + struct jailparam *jp, *jp_lastjid, *jp_jid, *jp_name, *jp_key; + char *valarg, *value; + const char *name, *key_value, *lastjid_value, *jid_value, *name_value; + int njp, i, jid; + /* Create the parameter list and find the key. */ va_start(ap, flags); va_copy(tap, ap); - njp = jailparam_vlist(&jp, tap); + for (njp = 0; va_arg(tap, char *) != NULL; njp++) + (void)va_arg(tap, char *); va_end(tap); - if (njp < 0) - return (njp); - /* - * See if the name is the search key. If so, we don't want to write - * it back in case it's a read-only string. - */ - namekey = 1; - zero = 0; - for (i = 0; i < njp; i++) { - if (!strcmp(jp->jp_name, "lastjid") || - (!strcmp(jp->jp_name, "jid") && - memcmp(jp->jp_value, &zero, sizeof(zero)))) - namekey = 0; + + jp = alloca(njp * sizeof(struct jailparam)); + va_copy(tap, ap); + jp_lastjid = jp_jid = jp_name = NULL; + lastjid_value = jid_value = name_value = NULL; + for (njp = 0; (name = va_arg(tap, char *)) != NULL; njp++) { + value = va_arg(tap, char *); + if (jailparam_init(jp + njp, name) < 0) { + va_end(tap); + goto error; + } + if (!strcmp(jp[njp].jp_name, "lastjid")) { + jp_lastjid = jp + njp; + lastjid_value = value; + } else if (!strcmp(jp[njp].jp_name, "jid")) { + jp_jid = jp + njp; + jid_value = value; + } if (!strcmp(jp[njp].jp_name, "name")) { + jp_name = jp + njp; + name_value = value; + } } - jid = jailparam_get(jp, njp, flags); - if (jid < 0) { - va_end(ap); - return (-1); + va_end(tap); + /* Import the key parameter. */ + if (jp_lastjid != NULL) { + jp_key = jp_lastjid; + key_value = lastjid_value; + } else if (jp_jid != NULL && strtol(jid_value, NULL, 10) != 0) { + jp_key = jp_jid; + key_value = jid_value; + } else if (jp_name != NULL) { + jp_key = jp_name; + key_value = name_value; + } else { + strlcpy(jail_errmsg, "no jail specified", JAIL_ERRMSGLEN); + errno = ENOENT; + goto error; } + if (jailparam_import(jp_key, key_value) < 0) + goto error; + /* Get the jail and export the parameters. */ + jid = jailparam_get(jp, njp, flags); + if (jid < 0) + goto error; for (i = 0; i < njp; i++) { (void)va_arg(ap, char *); - value = jailparam_export(jp + i); - if (value == NULL) { - va_end(ap); - return (-1); - } valarg = va_arg(ap, char *); - if (!namekey || strcmp(jp[i].jp_name, "name")) + if (jp + i != jp_key) { /* It's up to the caller to ensure there's room. */ - strcpy(valarg, value); + if ((jp[i].jp_ctltype & CTLTYPE) == CTLTYPE_STRING) + strcpy(valarg, jp[i].jp_value); + else { + value = jailparam_export(jp + i); + if (value == NULL) + goto error; + strcpy(valarg, value); + free(value); + } + } } + jailparam_free(jp, njp); va_end(ap); return (jid); + + error: + jailparam_free(jp, njp); + va_end(ap); + return (-1); } /* @@ -794,41 +845,6 @@ jailparam_free(struct jailparam *jp, uns } /* - * Create and import an array of jail parameters, given a list of name and - * value strings, terminated by a null name. - */ -static int -jailparam_vlist(struct jailparam **jpp, va_list ap) -{ - va_list tap; - struct jailparam *jp; - char *name, *value; - int njp; - - va_copy(tap, ap); - for (njp = 0; va_arg(tap, char *) != NULL; njp++) - (void)va_arg(tap, char *); - va_end(tap); - jp = calloc(njp, sizeof(struct jailparam)); - if (jp == NULL) { - strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); - return (-1); - } - - for (njp = 0; (name = va_arg(ap, char *)) != NULL; njp++) { - value = va_arg(ap, char *); - if (jailparam_init(jp + njp, name) < 0 || - jailparam_import(jp + njp, value) < 0) { - jailparam_free(jp, njp); - free(jp); - return (-1); - } - } - *jpp = jp; - return (njp); -} - -/* * Find a parameter's type and size from its MIB. */ static int From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 19:52:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2BB5D106566C; Mon, 19 Jul 2010 19:52:03 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1956D8FC1D; Mon, 19 Jul 2010 19:52:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JJq3BL065853; Mon, 19 Jul 2010 19:52:03 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JJq2px065851; Mon, 19 Jul 2010 19:52:03 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201007191952.o6JJq2px065851@svn.freebsd.org> From: Jamie Gritton Date: Mon, 19 Jul 2010 19:52:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210252 - stable/8/lib/libjail X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 19:52:03 -0000 Author: jamie Date: Mon Jul 19 19:52:02 2010 New Revision: 210252 URL: http://svn.freebsd.org/changeset/base/210252 Log: MFC r210134: Don't copy and return a potentially unset buffer when jail_get fails. Modified: stable/8/lib/libjail/jail_getid.c Directory Properties: stable/8/lib/libjail/ (props changed) Modified: stable/8/lib/libjail/jail_getid.c ============================================================================== --- stable/8/lib/libjail/jail_getid.c Mon Jul 19 19:51:17 2010 (r210251) +++ stable/8/lib/libjail/jail_getid.c Mon Jul 19 19:52:02 2010 (r210252) @@ -94,11 +94,15 @@ jail_getname(int jid) jiov[5].iov_len = JAIL_ERRMSGLEN; jail_errmsg[0] = 0; jid = jail_get(jiov, 6, 0); - if (jid < 0 && !jail_errmsg[0]) - snprintf(jail_errmsg, JAIL_ERRMSGLEN, "jail_get: %s", - strerror(errno)); - name = strdup(namebuf); - if (name == NULL) - strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); + if (jid < 0) { + if (!jail_errmsg[0]) + snprintf(jail_errmsg, JAIL_ERRMSGLEN, "jail_get: %s", + strerror(errno)); + return NULL; + } else { + name = strdup(namebuf); + if (name == NULL) + strerror_r(errno, jail_errmsg, JAIL_ERRMSGLEN); + } return name; } From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 19:54:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87E96106564A; Mon, 19 Jul 2010 19:54:37 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 75CBB8FC13; Mon, 19 Jul 2010 19:54:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JJsb18066448; Mon, 19 Jul 2010 19:54:37 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JJsb9X066446; Mon, 19 Jul 2010 19:54:37 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007191954.o6JJsb9X066446@svn.freebsd.org> From: Benedict Reuschling Date: Mon, 19 Jul 2010 19:54:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210253 - stable/8/etc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 19:54:37 -0000 Author: bcr (doc committer) Date: Mon Jul 19 19:54:37 2010 New Revision: 210253 URL: http://svn.freebsd.org/changeset/base/210253 Log: MFC r209954: Fix spelling of "weirdo" in /etc/gettytab comment. PR: docs/148500 Submitted by: Warren Block (wblock at wonkity dot com) Approved by: ed@ Modified: stable/8/etc/gettytab Directory Properties: stable/8/etc/ (props changed) Modified: stable/8/etc/gettytab ============================================================================== --- stable/8/etc/gettytab Mon Jul 19 19:52:02 2010 (r210252) +++ stable/8/etc/gettytab Mon Jul 19 19:54:37 2010 (r210253) @@ -165,7 +165,7 @@ P|Pc|Pc console:\ :ht:np:sp#115200: # -# Wierdo special case for fast crt's with hardcopy devices +# Weirdo special case for fast crt's with hardcopy devices # 8|T9600|CRT with hardcopy:\ :nx=T300:tc=9600-baud: From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 20:19:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0114F106567D; Mon, 19 Jul 2010 20:19:14 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6430B8FC12; Mon, 19 Jul 2010 20:19:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JKJESi072069; Mon, 19 Jul 2010 20:19:14 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JKJEg5072065; Mon, 19 Jul 2010 20:19:14 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201007192019.o6JKJEg5072065@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 19 Jul 2010 20:19:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210254 - in head/etc: defaults periodic/security X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 20:19:16 -0000 Author: gabor Date: Mon Jul 19 20:19:14 2010 New Revision: 210254 URL: http://svn.freebsd.org/changeset/base/210254 Log: - Add a periodic script, which can be used to find installed ports' files with mismatched checksum PR: conf/124641 Submitted by: Alex Kozlov Approved by: delphij (mentor) Added: head/etc/periodic/security/460.chkportsum (contents, props changed) Modified: head/etc/defaults/periodic.conf head/etc/periodic/security/Makefile Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Mon Jul 19 19:54:37 2010 (r210253) +++ head/etc/defaults/periodic.conf Mon Jul 19 20:19:14 2010 (r210254) @@ -171,6 +171,9 @@ daily_status_security_passwdless_enable= # 410.logincheck daily_status_security_logincheck_enable="YES" +# 460.chkportsum +daily_status_security_chkportsum_enable="NO" # Check ports w/ wrong checksum + # 500.ipfwdenied daily_status_security_ipfwdenied_enable="YES" Added: head/etc/periodic/security/460.chkportsum ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/periodic/security/460.chkportsum Mon Jul 19 20:19:14 2010 (r210254) @@ -0,0 +1,68 @@ +#!/bin/sh - +# +# Copyright (c) 2010 The FreeBSD Project +# 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$ +# + +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +. /etc/periodic/security/security.functions + +rc=0 + +echo "" +echo 'Checking for ports with mismatched checksums:' + +case "${daily_status_security_chkportsum_enable}" in + [Yy][Ee][Ss]) + pkg_info -ga 2>/dev/null | \ + while read one two three; do + case ${one} in + Information) + case ${two} in + for) name=${three%%:} ;; + *) name='??' ;; + esac + ;; + Mismatched|'') ;; + *) + if [ -n ${name} ]; then + echo ${name}: ${one} + fi + ;; + esac + done + ;; + *) + rc=0 + ;; +esac + +exit $rc Modified: head/etc/periodic/security/Makefile ============================================================================== --- head/etc/periodic/security/Makefile Mon Jul 19 19:54:37 2010 (r210253) +++ head/etc/periodic/security/Makefile Mon Jul 19 20:19:14 2010 (r210254) @@ -7,6 +7,7 @@ FILES= 100.chksetuid \ 300.chkuid0 \ 400.passwdless \ 410.logincheck \ + 460.chkportsum \ 700.kernelmsg \ 800.loginfail \ 900.tcpwrap \ From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 20:22:21 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A6CAA1065677; Mon, 19 Jul 2010 20:22:21 +0000 (UTC) (envelope-from gabor@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95BB98FC13; Mon, 19 Jul 2010 20:22:21 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JKMLXB072821; Mon, 19 Jul 2010 20:22:21 GMT (envelope-from gabor@svn.freebsd.org) Received: (from gabor@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JKMLr3072819; Mon, 19 Jul 2010 20:22:21 GMT (envelope-from gabor@svn.freebsd.org) Message-Id: <201007192022.o6JKMLr3072819@svn.freebsd.org> From: Gabor Kovesdan Date: Mon, 19 Jul 2010 20:22:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210255 - head/usr.sbin/sysinstall X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 20:22:21 -0000 Author: gabor Date: Mon Jul 19 20:22:21 2010 New Revision: 210255 URL: http://svn.freebsd.org/changeset/base/210255 Log: - Add Latinamerican keymaps to sysinstall's Makefile so that it can find them [1] - While here, also add a missing Spanish entry PR: bin/67365 [1] Submitted by: Pedro F. Giffuni [1] Approved by: delphij (mentor) Modified: head/usr.sbin/sysinstall/Makefile Modified: head/usr.sbin/sysinstall/Makefile ============================================================================== --- head/usr.sbin/sysinstall/Makefile Mon Jul 19 20:19:14 2010 (r210254) +++ head/usr.sbin/sysinstall/Makefile Mon Jul 19 20:22:21 2010 (r210255) @@ -79,8 +79,9 @@ KEYMAPS= be.iso bg.bds.ctrlcaps bg.phone ce.iso2 cs.latin2.qwertz danish.iso el.iso07 \ estonian.cp850 estonian.iso estonian.iso15 finnish.iso fr.iso \ german.iso gr.elot.acc gr.us101.acc hr.iso hu.iso2.101keys \ - it.iso icelandic.iso jp.106 norwegian.iso pl_PL.ISO8859-2 \ - pt.iso ru.koi8-r si.iso sk.iso2 spanish.iso swedish.iso \ + it.iso icelandic.iso jp.106 latinamerican latinamerican.iso.acc \ + norwegian.iso pl_PL.ISO8859-2 \ + pt.iso ru.koi8-r si.iso sk.iso2 spanish.iso spanish.iso.acc swedish.iso \ swissfrench.iso \ swissgerman.iso ua.koi8-u ua.koi8-u.shift.alt uk.iso us.dvorak \ us.iso us.pc-ctrl us.unix From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 20:31:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D226D1065674; Mon, 19 Jul 2010 20:31:04 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C0B648FC08; Mon, 19 Jul 2010 20:31:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JKV4Tu074808; Mon, 19 Jul 2010 20:31:04 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JKV4ue074806; Mon, 19 Jul 2010 20:31:04 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007192031.o6JKV4ue074806@svn.freebsd.org> From: Jung-uk Kim Date: Mon, 19 Jul 2010 20:31:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210256 - head/sys/dev/syscons X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 20:31:04 -0000 Author: jkim Date: Mon Jul 19 20:31:04 2010 New Revision: 210256 URL: http://svn.freebsd.org/changeset/base/210256 Log: Improve style slightly. Modified: head/sys/dev/syscons/scvgarndr.c Modified: head/sys/dev/syscons/scvgarndr.c ============================================================================== --- head/sys/dev/syscons/scvgarndr.c Mon Jul 19 20:22:21 2010 (r210255) +++ head/sys/dev/syscons/scvgarndr.c Mon Jul 19 20:31:04 2010 (r210256) @@ -171,39 +171,42 @@ static u_short mouse_or_mask[16] = { #endif #ifdef SC_PIXEL_MODE -#define VIDEO_MEMORY_POS(scp, pos, x) \ - scp->sc->adp->va_window + \ - x * scp->xoff + \ - scp->yoff * scp->font_size * scp->sc->adp->va_line_width + \ - x * (pos % scp->xsize) + \ - scp->font_size * scp->sc->adp->va_line_width * (pos / scp->xsize) - -#define vga_drawpxl(pos, color) \ - switch (scp->sc->adp->va_info.vi_depth) { \ - case 32: \ - writel(pos, vga_palette32[color]); \ - break; \ - case 24: \ - if (((pos) & 1) == 0) { \ - writew(pos, vga_palette32[color]); \ - writeb(pos + 2, vga_palette32[color] >> 16);\ - } else { \ - writeb(pos, vga_palette32[color]); \ - writew(pos + 1, vga_palette32[color] >> 8);\ - } \ - break; \ - case 16: \ - if (scp->sc->adp->va_info.vi_pixel_fsizes[1] == 5)\ - writew(pos, vga_palette15[color]); \ - else \ - writew(pos, vga_palette16[color]); \ - break; \ - case 15: \ - writew(pos, vga_palette15[color]); \ - break; \ - case 8: \ - writeb(pos, (uint8_t)color); \ - } +#define GET_PIXEL(scp, pos, x, w) \ +({ \ + (scp)->sc->adp->va_window + \ + (x) * (scp)->xoff + \ + (scp)->yoff * (scp)->font_size * (w) + \ + (x) * ((pos) % (scp)->xsize) + \ + (scp)->font_size * (w) * ((pos) / (scp)->xsize); \ +}) + +#define DRAW_PIXEL(scp, pos, color) do { \ + switch ((scp)->sc->adp->va_info.vi_depth) { \ + case 32: \ + writel((pos), vga_palette32[color]); \ + break; \ + case 24: \ + if (((pos) & 1) == 0) { \ + writew((pos), vga_palette32[color]); \ + writeb((pos) + 2, vga_palette32[color] >> 16); \ + } else { \ + writeb((pos), vga_palette32[color]); \ + writew((pos) + 1, vga_palette32[color] >> 8); \ + } \ + break; \ + case 16: \ + if ((scp)->sc->adp->va_info.vi_pixel_fsizes[1] == 5) \ + writew((pos), vga_palette15[color]); \ + else \ + writew((pos), vga_palette16[color]); \ + break; \ + case 15: \ + writew((pos), vga_palette15[color]); \ + break; \ + case 8: \ + writeb((pos), (uint8_t)(color)); \ + } \ +} while (0) static uint32_t vga_palette32[16] = { 0x000000, 0x0000ad, 0x00ad00, 0x00adad, @@ -589,7 +592,7 @@ vga_pxlborder_direct(scr_stat *scp, int e = s + line_width * scp->yoff * scp->font_size; for (f = s; f < e; f += pixel_size) - vga_drawpxl(f, color); + DRAW_PIXEL(scp, f, color); } y = (scp->yoff + scp->ysize) * scp->font_size; @@ -599,7 +602,7 @@ vga_pxlborder_direct(scr_stat *scp, int e = s + line_width * (scp->ypixel - y); for (f = s; f < e; f += pixel_size) - vga_drawpxl(f, color); + DRAW_PIXEL(scp, f, color); } y = scp->yoff * scp->font_size; @@ -611,7 +614,7 @@ vga_pxlborder_direct(scr_stat *scp, int e = s + scp->xoff * 8 * pixel_size; for (f = s; f < e; f += pixel_size) - vga_drawpxl(f, color); + DRAW_PIXEL(scp, f, color); } if (x > 0) { @@ -621,7 +624,7 @@ vga_pxlborder_direct(scr_stat *scp, int e = s + x * 8 * pixel_size; for (f = s; f < e; f += pixel_size) - vga_drawpxl(f, color); + DRAW_PIXEL(scp, f, color); } } } @@ -677,7 +680,7 @@ vga_egadraw(scr_stat *scp, int from, int line_width = scp->sc->adp->va_line_width; - d = VIDEO_MEMORY_POS(scp, from, 1); + d = GET_PIXEL(scp, from, 1, line_width); outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ outw(GDCIDX, 0x0003); /* data rotate/function select */ @@ -724,7 +727,7 @@ vga_egadraw(scr_stat *scp, int from, int static void vga_vgadraw_direct(scr_stat *scp, int from, int count, int flip) { - vm_offset_t d = 0; + vm_offset_t d; vm_offset_t e; u_char *f; u_short col1, col2, color; @@ -735,7 +738,7 @@ vga_vgadraw_direct(scr_stat *scp, int fr line_width = scp->sc->adp->va_line_width; pixel_size = scp->sc->adp->va_info.vi_pixel_size; - d = VIDEO_MEMORY_POS(scp, from, 8 * pixel_size); + d = GET_PIXEL(scp, from, 8 * pixel_size, line_width); if (from + count > scp->xsize * scp->ysize) count = scp->xsize * scp->ysize - from; @@ -757,7 +760,7 @@ vga_vgadraw_direct(scr_stat *scp, int fr for (j = 0; j < scp->font_size; ++j, ++f) { for (k = 0; k < 8; ++k) { color = *f & (1 << (7 - k)) ? col1 : col2; - vga_drawpxl(e + pixel_size * k, color); + DRAW_PIXEL(scp, e + pixel_size * k, color); } e += line_width; @@ -785,10 +788,10 @@ vga_vgadraw_planar(scr_stat *scp, int fr int a; u_char c; - d = VIDEO_MEMORY_POS(scp, from, 1); - line_width = scp->sc->adp->va_line_width; + d = GET_PIXEL(scp, from, 1, line_width); + outw(GDCIDX, 0x0305); /* read mode 0, write mode 3 */ outw(GDCIDX, 0x0003); /* data rotate/function select */ outw(GDCIDX, 0x0f01); /* set/reset enable */ @@ -847,7 +850,7 @@ vga_pxlcursor_shape(scr_stat *scp, int b static void draw_pxlcursor_direct(scr_stat *scp, int at, int on, int flip) { - vm_offset_t d = 0; + vm_offset_t d; u_char *f; int line_width, pixel_size; int height; @@ -858,7 +861,7 @@ draw_pxlcursor_direct(scr_stat *scp, int line_width = scp->sc->adp->va_line_width; pixel_size = scp->sc->adp->va_info.vi_pixel_size; - d = VIDEO_MEMORY_POS(scp, at, 8 * pixel_size) + + d = GET_PIXEL(scp, at, 8 * pixel_size, line_width) + (scp->font_size - scp->curs_attr.base - 1) * line_width; a = sc_vtb_geta(&scp->vtb, at); @@ -879,7 +882,7 @@ draw_pxlcursor_direct(scr_stat *scp, int for (i = 0; i < height; ++i, --f) { for (j = 0; j < 8; ++j) { color = *f & (1 << (7 - j)) ? col1 : col2; - vga_drawpxl(d + pixel_size * j, color); + DRAW_PIXEL(scp, d + pixel_size * j, color); } d -= line_width; @@ -900,7 +903,7 @@ draw_pxlcursor_planar(scr_stat *scp, int line_width = scp->sc->adp->va_line_width; - d = VIDEO_MEMORY_POS(scp, at, 1) + + d = GET_PIXEL(scp, at, 1, line_width) + (scp->font_size - scp->curs_attr.base - 1) * line_width; outw(GDCIDX, 0x0005); /* read mode 0, write mode 0 */ From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 21:13:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9D531065674; Mon, 19 Jul 2010 21:13:07 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9A96D8FC13; Mon, 19 Jul 2010 21:13:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JLD7Qi084356; Mon, 19 Jul 2010 21:13:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JLD7TD084354; Mon, 19 Jul 2010 21:13:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007192113.o6JLD7TD084354@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Jul 2010 21:13:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210257 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 21:13:07 -0000 Author: yongari Date: Mon Jul 19 21:13:07 2010 New Revision: 210257 URL: http://svn.freebsd.org/changeset/base/210257 Log: When we didn't find a matching flash device, do not touch flash config data. While I'm here, use return code of bce_init_nvram() to set error instead of directly setting ENODEV. Reviewed by: davidch Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Jul 19 20:31:04 2010 (r210256) +++ head/sys/dev/bce/if_bce.c Mon Jul 19 21:13:07 2010 (r210257) @@ -2264,7 +2264,8 @@ bce_init_nvram(struct bce_softc *sc) sc->bce_flash_info = NULL; BCE_PRINTF("%s(%d): Unknown Flash NVRAM found!\n", __FILE__, __LINE__); - rc = ENODEV; + DBEXIT(BCE_VERBOSE_NVRAM); + return (ENODEV); } bce_init_nvram_get_flash_size: @@ -4796,10 +4797,8 @@ bce_chipinit(struct bce_softc *sc) } /* Prepare NVRAM for access. */ - if (bce_init_nvram(sc)) { - rc = ENODEV; + if ((rc = bce_init_nvram(sc)) != 0) goto bce_chipinit_exit; - } /* Set the kernel bypass block size */ val = REG_RD(sc, BCE_MQ_CONFIG); From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 21:25:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 80372106564A; Mon, 19 Jul 2010 21:25:05 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 714198FC1E; Mon, 19 Jul 2010 21:25:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JLP5E1087077; Mon, 19 Jul 2010 21:25:05 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JLP5qY087075; Mon, 19 Jul 2010 21:25:05 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007192125.o6JLP5qY087075@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Jul 2010 21:25:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210259 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 21:25:05 -0000 Author: yongari Date: Mon Jul 19 21:25:05 2010 New Revision: 210259 URL: http://svn.freebsd.org/changeset/base/210259 Log: Have bce_init_ctx() return error code and make caller check the return code. If context was not setup correctly give up initialization. While I'm here move variable declarations to the beginning of the function. Reviewed by: davidch Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Jul 19 21:24:48 2010 (r210258) +++ head/sys/dev/bce/if_bce.c Mon Jul 19 21:25:05 2010 (r210259) @@ -429,7 +429,7 @@ static void bce_init_locked (struct bce static void bce_init (void *); static void bce_mgmt_init_locked (struct bce_softc *sc); -static void bce_init_ctx (struct bce_softc *); +static int bce_init_ctx (struct bce_softc *); static void bce_get_mac_addr (struct bce_softc *); static void bce_set_mac_addr (struct bce_softc *); static void bce_phy_intr (struct bce_softc *); @@ -4396,16 +4396,18 @@ bce_init_cpus(struct bce_softc *sc) /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static int bce_init_ctx(struct bce_softc *sc) { + u32 offset, val, vcid_addr; + int i, j, rc, retry_cnt; + rc = 0; DBENTER(BCE_VERBOSE_RESET | BCE_VERBOSE_CTX); if ((BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5709) || (BCE_CHIP_NUM(sc) == BCE_CHIP_NUM_5716)) { - int i, retry_cnt = CTX_INIT_RETRY_COUNT; - u32 val; + retry_cnt = CTX_INIT_RETRY_COUNT; DBPRINT(sc, BCE_INFO_CTX, "Initializing 5709 context.\n"); @@ -4426,15 +4428,14 @@ bce_init_ctx(struct bce_softc *sc) break; DELAY(2); } - - /* ToDo: Consider returning an error here. */ - DBRUNIF((val & BCE_CTX_COMMAND_MEM_INIT), - BCE_PRINTF("%s(): Context memory initialization " - "failed!\n", __FUNCTION__)); + if ((val & BCE_CTX_COMMAND_MEM_INIT) != 0) { + BCE_PRINTF("%s(): Context memory initialization failed!\n", + __FUNCTION__); + rc = EBUSY; + goto init_ctx_fail; + } for (i = 0; i < sc->ctx_pages; i++) { - int j; - /* Set the physical address of the context memory. */ REG_WR(sc, BCE_CTX_HOST_PAGE_TBL_DATA0, BCE_ADDR_LO(sc->ctx_paddr[i] & 0xfffffff0) | @@ -4452,14 +4453,14 @@ bce_init_ctx(struct bce_softc *sc) break; DELAY(5); } - - /* ToDo: Consider returning an error here. */ - DBRUNIF((val & BCE_CTX_HOST_PAGE_TBL_CTRL_WRITE_REQ), - BCE_PRINTF("%s(): Failed to initialize " - "context page %d!\n", __FUNCTION__, i)); + if ((val & BCE_CTX_HOST_PAGE_TBL_CTRL_WRITE_REQ) != 0) { + BCE_PRINTF("%s(): Failed to initialize " + "context page %d!\n", __FUNCTION__, i); + rc = EBUSY; + goto init_ctx_fail; + } } } else { - u32 vcid_addr, offset; DBPRINT(sc, BCE_INFO, "Initializing 5706/5708 context.\n"); @@ -4486,7 +4487,9 @@ bce_init_ctx(struct bce_softc *sc) } } +init_ctx_fail: DBEXIT(BCE_VERBOSE_RESET | BCE_VERBOSE_CTX); + return (rc); } @@ -4785,7 +4788,8 @@ bce_chipinit(struct bce_softc *sc) BCE_MISC_ENABLE_STATUS_BITS_CONTEXT_ENABLE); /* Initialize context mapping and zero out the quick contexts. */ - bce_init_ctx(sc); + if ((rc = bce_init_ctx(sc)) != 0) + goto bce_chipinit_exit; /* Initialize the on-boards CPUs */ bce_init_cpus(sc); From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 21:32:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 207B31065670; Mon, 19 Jul 2010 21:32:48 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 11C318FC19; Mon, 19 Jul 2010 21:32:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JLWlDW088789; Mon, 19 Jul 2010 21:32:47 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JLWlm0088787; Mon, 19 Jul 2010 21:32:47 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007192132.o6JLWlm0088787@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Jul 2010 21:32:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210260 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 21:32:48 -0000 Author: yongari Date: Mon Jul 19 21:32:47 2010 New Revision: 210260 URL: http://svn.freebsd.org/changeset/base/210260 Log: Don't change current media in bce_stop(). There is no need to do this here. Reviewed by: davidch Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Jul 19 21:25:05 2010 (r210259) +++ head/sys/dev/bce/if_bce.c Mon Jul 19 21:32:47 2010 (r210260) @@ -4577,9 +4577,6 @@ static void bce_stop(struct bce_softc *sc) { struct ifnet *ifp; - struct ifmedia_entry *ifm; - struct mii_data *mii = NULL; - int mtmp, itmp; DBENTER(BCE_VERBOSE_RESET); @@ -4587,8 +4584,6 @@ bce_stop(struct bce_softc *sc) ifp = sc->bce_ifp; - mii = device_get_softc(sc->bce_miibus); - callout_stop(&sc->bce_tick_callout); /* Disable the transmit/receive blocks. */ @@ -4607,25 +4602,6 @@ bce_stop(struct bce_softc *sc) /* Free TX buffers. */ bce_free_tx_chain(sc); - /* - * Isolate/power down the PHY, but leave the media selection - * unchanged so that things will be put back to normal when - * we bring the interface back up. - */ - - itmp = ifp->if_flags; - ifp->if_flags |= IFF_UP; - - /* If we are called from bce_detach(), mii is already NULL. */ - if (mii != NULL) { - ifm = mii->mii_media.ifm_cur; - mtmp = ifm->ifm_media; - ifm->ifm_media = IFM_ETHER | IFM_NONE; - mii_mediachg(mii); - ifm->ifm_media = mtmp; - } - - ifp->if_flags = itmp; sc->watchdog_timer = 0; sc->bce_link_up = FALSE; From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 21:38:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A422106568A; Mon, 19 Jul 2010 21:38:08 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E678C8FC14; Mon, 19 Jul 2010 21:38:07 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JLc7Gi089992; Mon, 19 Jul 2010 21:38:07 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JLc7ZX089990; Mon, 19 Jul 2010 21:38:07 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007192138.o6JLc7ZX089990@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Jul 2010 21:38:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210261 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 21:38:08 -0000 Author: yongari Date: Mon Jul 19 21:38:07 2010 New Revision: 210261 URL: http://svn.freebsd.org/changeset/base/210261 Log: Correctly check the result of media selection. Previously it always returned success. Reviewed by: davidch Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Jul 19 21:32:47 2010 (r210260) +++ head/sys/dev/bce/if_bce.c Mon Jul 19 21:38:07 2010 (r210261) @@ -423,7 +423,7 @@ static void bce_start (struct ifnet *) static int bce_ioctl (struct ifnet *, u_long, caddr_t); static void bce_watchdog (struct bce_softc *); static int bce_ifmedia_upd (struct ifnet *); -static void bce_ifmedia_upd_locked (struct ifnet *); +static int bce_ifmedia_upd_locked (struct ifnet *); static void bce_ifmedia_sts (struct ifnet *, struct ifmediareq *); static void bce_init_locked (struct bce_softc *); static void bce_init (void *); @@ -5789,15 +5789,16 @@ static int bce_ifmedia_upd(struct ifnet *ifp) { struct bce_softc *sc = ifp->if_softc; + int error; DBENTER(BCE_VERBOSE); BCE_LOCK(sc); - bce_ifmedia_upd_locked(ifp); + error = bce_ifmedia_upd_locked(ifp); BCE_UNLOCK(sc); DBEXIT(BCE_VERBOSE); - return (0); + return (error); } @@ -5807,14 +5808,16 @@ bce_ifmedia_upd(struct ifnet *ifp) /* Returns: */ /* Nothing. */ /****************************************************************************/ -static void +static int bce_ifmedia_upd_locked(struct ifnet *ifp) { struct bce_softc *sc = ifp->if_softc; struct mii_data *mii; + int error; DBENTER(BCE_VERBOSE_PHY); + error = 0; BCE_LOCK_ASSERT(sc); mii = device_get_softc(sc->bce_miibus); @@ -5828,10 +5831,11 @@ bce_ifmedia_upd_locked(struct ifnet *ifp LIST_FOREACH(miisc, &mii->mii_phys, mii_list) mii_phy_reset(miisc); } - mii_mediachg(mii); + error = mii_mediachg(mii); } DBEXIT(BCE_VERBOSE_PHY); + return (error); } From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 21:38:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94D9110656AA; Mon, 19 Jul 2010 21:38:15 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6D3498FC20; Mon, 19 Jul 2010 21:38:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JLcFbb090062; Mon, 19 Jul 2010 21:38:15 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JLcFhu090060; Mon, 19 Jul 2010 21:38:15 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201007192138.o6JLcFhu090060@svn.freebsd.org> From: Adrian Chadd Date: Mon, 19 Jul 2010 21:38:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210262 - head/sys/dev/flash X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 21:38:15 -0000 Author: adrian Date: Mon Jul 19 21:38:15 2010 New Revision: 210262 URL: http://svn.freebsd.org/changeset/base/210262 Log: Extend the mx25l flash device support to include a set of per-device flags. Some of these parts will support 4K/32K block erases rather than a sector erase. This includes (at least) the MX25L128. Modified: head/sys/dev/flash/mx25l.c Modified: head/sys/dev/flash/mx25l.c ============================================================================== --- head/sys/dev/flash/mx25l.c Mon Jul 19 21:38:07 2010 (r210261) +++ head/sys/dev/flash/mx25l.c Mon Jul 19 21:38:15 2010 (r210262) @@ -45,6 +45,10 @@ __FBSDID("$FreeBSD$"); #include +#define FL_NONE 0x00 +#define FL_ERASE_4K 0x01 +#define FL_ERASE_32K 0x02 + struct mx25l_flash_ident { const char *name; @@ -52,6 +56,7 @@ struct mx25l_flash_ident uint16_t device_id; unsigned int sectorsize; unsigned int sectorcount; + unsigned int flags; }; struct mx25l_softc @@ -64,6 +69,7 @@ struct mx25l_softc struct disk *sc_disk; struct proc *sc_p; struct bio_queue_head sc_bio_queue; + unsigned int flags; }; #define M25PXX_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) @@ -83,10 +89,10 @@ static void mx25l_strategy(struct bio *b static void mx25l_task(void *arg); struct mx25l_flash_ident flash_devices[] = { - { "mx25ll32", 0xc2, 0x2016, 64 * 1024, 64 }, - { "mx25ll64", 0xc2, 0x2017, 64 * 1024, 128 }, - { "mx25ll128", 0xc2, 0x2018, 64 * 1024, 256 }, - { "s25fl128", 0x01, 0x2018, 64 * 1024, 256 }, + { "mx25ll32", 0xc2, 0x2016, 64 * 1024, 64, FL_NONE }, + { "mx25ll64", 0xc2, 0x2017, 64 * 1024, 128, FL_NONE }, + { "mx25ll128", 0xc2, 0x2018, 64 * 1024, 256, FL_ERASE_4K | FL_ERASE_32K }, + { "s25fl128", 0x01, 0x2018, 64 * 1024, 256, FL_NONE }, }; static uint8_t @@ -369,6 +375,7 @@ mx25l_attach(device_t dev) sc->sc_disk->d_dump = NULL; /* NB: no dumps */ /* Sectorsize for erase operations */ sc->sc_sectorsize = ident->sectorsize; + sc->flags = ident->flags; /* NB: use stripesize to hold the erase/region size for RedBoot */ sc->sc_disk->d_stripesize = ident->sectorsize; From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 21:41:54 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DC0971065674; Mon, 19 Jul 2010 21:41:54 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CDF0B8FC16; Mon, 19 Jul 2010 21:41:54 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JLfsak090973; Mon, 19 Jul 2010 21:41:54 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JLfsr3090971; Mon, 19 Jul 2010 21:41:54 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007192141.o6JLfsr3090971@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Jul 2010 21:41:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210263 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 21:41:55 -0000 Author: yongari Date: Mon Jul 19 21:41:54 2010 New Revision: 210263 URL: http://svn.freebsd.org/changeset/base/210263 Log: Do not report current link state if interface is not UP. Reviewed by: davidch Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Jul 19 21:38:15 2010 (r210262) +++ head/sys/dev/bce/if_bce.c Mon Jul 19 21:41:54 2010 (r210263) @@ -5855,6 +5855,10 @@ bce_ifmedia_sts(struct ifnet *ifp, struc BCE_LOCK(sc); + if ((ifp->if_flags & IFF_UP) == 0) { + BCE_UNLOCK(sc); + return; + } mii = device_get_softc(sc->bce_miibus); mii_pollstat(mii); From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 21:46:40 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF7D2106566B; Mon, 19 Jul 2010 21:46:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A180C8FC19; Mon, 19 Jul 2010 21:46:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JLkeeX092051; Mon, 19 Jul 2010 21:46:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JLken5092049; Mon, 19 Jul 2010 21:46:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201007192146.o6JLken5092049@svn.freebsd.org> From: Adrian Chadd Date: Mon, 19 Jul 2010 21:46:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210264 - head/sys/dev/flash X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 21:46:40 -0000 Author: adrian Date: Mon Jul 19 21:46:40 2010 New Revision: 210264 URL: http://svn.freebsd.org/changeset/base/210264 Log: Extend the mx25l erase function to support different erase commands. Modified: head/sys/dev/flash/mx25l.c Modified: head/sys/dev/flash/mx25l.c ============================================================================== --- head/sys/dev/flash/mx25l.c Mon Jul 19 21:41:54 2010 (r210263) +++ head/sys/dev/flash/mx25l.c Mon Jul 19 21:46:40 2010 (r210264) @@ -184,7 +184,7 @@ mx25l_set_writable(device_t dev, int wri } static void -mx25l_erase_sector(device_t dev, off_t sector) +mx25l_erase_cmd(device_t dev, off_t sector, uint8_t ecmd) { uint8_t txBuf[4], rxBuf[4]; struct spi_command cmd; @@ -197,7 +197,7 @@ mx25l_erase_sector(device_t dev, off_t s memset(txBuf, 0, sizeof(txBuf)); memset(rxBuf, 0, sizeof(rxBuf)); - txBuf[0] = CMD_SECTOR_ERASE; + txBuf[0] = ecmd; cmd.tx_cmd = txBuf; cmd.rx_cmd = rxBuf; cmd.rx_cmd_sz = 4; @@ -258,7 +258,7 @@ mx25l_write(device_t dev, off_t offset, * If we crossed sector boundary - erase next sector */ if (((offset + bytes_writen) % sc->sc_sectorsize) == 0) - mx25l_erase_sector(dev, offset + bytes_writen); + mx25l_erase_cmd(dev, offset + bytes_writen, CMD_SECTOR_ERASE); txBuf[0] = CMD_PAGE_PROGRAM; txBuf[1] = ((write_offset >> 16) & 0xff); From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 21:50:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 44AB31065674; Mon, 19 Jul 2010 21:50:44 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 36DE48FC16; Mon, 19 Jul 2010 21:50:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JLoitE092974; Mon, 19 Jul 2010 21:50:44 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JLoi9h092972; Mon, 19 Jul 2010 21:50:44 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201007192150.o6JLoi9h092972@svn.freebsd.org> From: Adrian Chadd Date: Mon, 19 Jul 2010 21:50:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210265 - head/sys/dev/flash X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 21:50:44 -0000 Author: adrian Date: Mon Jul 19 21:50:43 2010 New Revision: 210265 URL: http://svn.freebsd.org/changeset/base/210265 Log: Fix naming to be consistent. Modified: head/sys/dev/flash/mx25l.c Modified: head/sys/dev/flash/mx25l.c ============================================================================== --- head/sys/dev/flash/mx25l.c Mon Jul 19 21:46:40 2010 (r210264) +++ head/sys/dev/flash/mx25l.c Mon Jul 19 21:50:43 2010 (r210265) @@ -69,7 +69,7 @@ struct mx25l_softc struct disk *sc_disk; struct proc *sc_p; struct bio_queue_head sc_bio_queue; - unsigned int flags; + unsigned int sc_flags; }; #define M25PXX_LOCK(_sc) mtx_lock(&(_sc)->sc_mtx) @@ -375,7 +375,7 @@ mx25l_attach(device_t dev) sc->sc_disk->d_dump = NULL; /* NB: no dumps */ /* Sectorsize for erase operations */ sc->sc_sectorsize = ident->sectorsize; - sc->flags = ident->flags; + sc->sc_flags = ident->flags; /* NB: use stripesize to hold the erase/region size for RedBoot */ sc->sc_disk->d_stripesize = ident->sectorsize; From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 23:25:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C0500106566B; Mon, 19 Jul 2010 23:25:19 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B2F8B8FC12; Mon, 19 Jul 2010 23:25:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JNPJVL015303; Mon, 19 Jul 2010 23:25:19 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JNPJIE015301; Mon, 19 Jul 2010 23:25:19 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007192325.o6JNPJIE015301@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Jul 2010 23:25:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210267 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 23:25:19 -0000 Author: yongari Date: Mon Jul 19 23:25:19 2010 New Revision: 210267 URL: http://svn.freebsd.org/changeset/base/210267 Log: Add KASSERT to check number of returned DMA segments. Reviewed by: davidch Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Jul 19 22:28:07 2010 (r210266) +++ head/sys/dev/bce/if_bce.c Mon Jul 19 23:25:19 2010 (r210267) @@ -3088,6 +3088,8 @@ bce_dma_map_addr(void *arg, bus_dma_segm { bus_addr_t *busaddr = arg; + KASSERT(nseg == 1, ("%s(): Too many segments returned (%d)!", + __FUNCTION__, nseg)); /* Simulate a mapping failure. */ DBRUNIF(DB_RANDOMTRUE(dma_map_addr_failed_sim_control), error = ENOMEM); From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 23:33:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14AF51065670; Mon, 19 Jul 2010 23:33:43 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0716D8FC0A; Mon, 19 Jul 2010 23:33:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JNXgZ1017318; Mon, 19 Jul 2010 23:33:42 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JNXg3F017316; Mon, 19 Jul 2010 23:33:42 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007192333.o6JNXg3F017316@svn.freebsd.org> From: Rick Macklem Date: Mon, 19 Jul 2010 23:33:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210268 - head/sys/fs/nfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 23:33:43 -0000 Author: rmacklem Date: Mon Jul 19 23:33:42 2010 New Revision: 210268 URL: http://svn.freebsd.org/changeset/base/210268 Log: For the experimental NFSv4 server's dumplocks operation, add the MPSAFE flag to cn_flags so that it doesn't panic. The panics weren't seen since nfsdumpstate(8) is broken for the "-l" case, so this was never done. I'll do a separate commit to fix nfsdumpstate(8). Submitted by: zack.kirsch at isilon.com MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonport.c Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Mon Jul 19 23:25:19 2010 (r210267) +++ head/sys/fs/nfs/nfs_commonport.c Mon Jul 19 23:33:42 2010 (r210268) @@ -210,7 +210,8 @@ nfsrv_lookupfilename(struct nameidata *n { int error; - NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF, UIO_USERSPACE, fname, p); + NDINIT(ndp, LOOKUP, FOLLOW | LOCKLEAF | MPSAFE, UIO_USERSPACE, fname, + p); error = namei(ndp); if (!error) { NDFREE(ndp, NDF_ONLY_PNBUF); From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 23:35:43 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B49BF106566B; Mon, 19 Jul 2010 23:35:43 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A44B58FC18; Mon, 19 Jul 2010 23:35:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JNZhWg017798; Mon, 19 Jul 2010 23:35:43 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JNZhkp017796; Mon, 19 Jul 2010 23:35:43 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007192335.o6JNZhkp017796@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Jul 2010 23:35:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210269 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 23:35:43 -0000 Author: yongari Date: Mon Jul 19 23:35:43 2010 New Revision: 210269 URL: http://svn.freebsd.org/changeset/base/210269 Log: Use bus_get_dma_tag() to get parent tag. Also use BUS_SPACE_MAXSIZE_32BIT to specify sum of all segment lengths. Previously it used MAXBSIZE which was wrong. Reviewed by: davidch Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Jul 19 23:33:42 2010 (r210268) +++ head/sys/dev/bce/if_bce.c Mon Jul 19 23:35:43 2010 (r210269) @@ -3146,10 +3146,10 @@ bce_dma_alloc(device_t dev) /* * Allocate the parent bus DMA tag appropriate for PCI. */ - if (bus_dma_tag_create(NULL, 1, BCE_DMA_BOUNDARY, + if (bus_dma_tag_create(bus_get_dma_tag(dev), 1, BCE_DMA_BOUNDARY, sc->max_bus_addr, BUS_SPACE_MAXADDR, NULL, NULL, - MAXBSIZE, BUS_SPACE_UNRESTRICTED, BUS_SPACE_MAXSIZE_32BIT, - 0, NULL, NULL, &sc->parent_tag)) { + BUS_SPACE_MAXSIZE_32BIT, 0, BUS_SPACE_MAXSIZE_32BIT, 0, NULL, NULL, + &sc->parent_tag)) { BCE_PRINTF("%s(%d): Could not allocate parent DMA tag!\n", __FILE__, __LINE__); rc = ENOMEM; From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 23:41:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F097106566B; Mon, 19 Jul 2010 23:41:46 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 466478FC0A; Mon, 19 Jul 2010 23:41:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JNfkTJ019183; Mon, 19 Jul 2010 23:41:46 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JNfk0K019181; Mon, 19 Jul 2010 23:41:46 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007192341.o6JNfk0K019181@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Jul 2010 23:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210270 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 23:41:46 -0000 Author: yongari Date: Mon Jul 19 23:41:45 2010 New Revision: 210270 URL: http://svn.freebsd.org/changeset/base/210270 Log: Specify BUS_DMA_ZERO flag to bus_dmamem_alloc(9) and remove bzero() calls. Also add BUS_DMA_COHERENT flag to bus_dmamem_alloc(9) to take advantage of efficient synchronization for architectures that support that feature. Reviewed by: davidch Modified: head/sys/dev/bce/if_bce.c Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Jul 19 23:35:43 2010 (r210269) +++ head/sys/dev/bce/if_bce.c Mon Jul 19 23:41:45 2010 (r210270) @@ -3172,15 +3172,14 @@ bce_dma_alloc(device_t dev) } if(bus_dmamem_alloc(sc->status_tag, (void **)&sc->status_block, - BUS_DMA_NOWAIT, &sc->status_map)) { + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, + &sc->status_map)) { BCE_PRINTF("%s(%d): Could not allocate status block " "DMA memory!\n", __FILE__, __LINE__); rc = ENOMEM; goto bce_dma_alloc_exit; } - bzero((char *)sc->status_block, BCE_STATUS_BLK_SZ); - error = bus_dmamap_load(sc->status_tag, sc->status_map, sc->status_block, BCE_STATUS_BLK_SZ, bce_dma_map_addr, &sc->status_block_paddr, BUS_DMA_NOWAIT); @@ -3211,15 +3210,13 @@ bce_dma_alloc(device_t dev) } if (bus_dmamem_alloc(sc->stats_tag, (void **)&sc->stats_block, - BUS_DMA_NOWAIT, &sc->stats_map)) { + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, &sc->stats_map)) { BCE_PRINTF("%s(%d): Could not allocate statistics block " "DMA memory!\n", __FILE__, __LINE__); rc = ENOMEM; goto bce_dma_alloc_exit; } - bzero((char *)sc->stats_block, BCE_STATS_BLK_SZ); - error = bus_dmamap_load(sc->stats_tag, sc->stats_map, sc->stats_block, BCE_STATS_BLK_SZ, bce_dma_map_addr, &sc->stats_block_paddr, BUS_DMA_NOWAIT); @@ -3265,7 +3262,7 @@ bce_dma_alloc(device_t dev) if(bus_dmamem_alloc(sc->ctx_tag, (void **)&sc->ctx_block[i], - BUS_DMA_NOWAIT, + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, &sc->ctx_map[i])) { BCE_PRINTF("%s(%d): Could not allocate CTX " "DMA memory!\n", __FILE__, __LINE__); @@ -3273,8 +3270,6 @@ bce_dma_alloc(device_t dev) goto bce_dma_alloc_exit; } - bzero((char *)sc->ctx_block[i], BCM_PAGE_SIZE); - error = bus_dmamap_load(sc->ctx_tag, sc->ctx_map[i], sc->ctx_block[i], BCM_PAGE_SIZE, bce_dma_map_addr, &sc->ctx_paddr[i], BUS_DMA_NOWAIT); @@ -3310,7 +3305,8 @@ bce_dma_alloc(device_t dev) for (i = 0; i < TX_PAGES; i++) { if(bus_dmamem_alloc(sc->tx_bd_chain_tag, - (void **)&sc->tx_bd_chain[i], BUS_DMA_NOWAIT, + (void **)&sc->tx_bd_chain[i], + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, &sc->tx_bd_chain_map[i])) { BCE_PRINTF("%s(%d): Could not allocate TX descriptor " "chain DMA memory!\n", __FILE__, __LINE__); @@ -3386,7 +3382,8 @@ bce_dma_alloc(device_t dev) for (i = 0; i < RX_PAGES; i++) { if (bus_dmamem_alloc(sc->rx_bd_chain_tag, - (void **)&sc->rx_bd_chain[i], BUS_DMA_NOWAIT, + (void **)&sc->rx_bd_chain[i], + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, &sc->rx_bd_chain_map[i])) { BCE_PRINTF("%s(%d): Could not allocate RX descriptor " "chain DMA memory!\n", __FILE__, __LINE__); @@ -3394,8 +3391,6 @@ bce_dma_alloc(device_t dev) goto bce_dma_alloc_exit; } - bzero((char *)sc->rx_bd_chain[i], BCE_RX_CHAIN_PAGE_SZ); - error = bus_dmamap_load(sc->rx_bd_chain_tag, sc->rx_bd_chain_map[i], sc->rx_bd_chain[i], BCE_RX_CHAIN_PAGE_SZ, bce_dma_map_addr, @@ -3429,9 +3424,10 @@ bce_dma_alloc(device_t dev) "size = 0x%jX)\n", __FUNCTION__, (uintmax_t) max_size, max_segments, (uintmax_t) max_seg_size); - if (bus_dma_tag_create(sc->parent_tag, 1, BCE_DMA_BOUNDARY, - sc->max_bus_addr, BUS_SPACE_MAXADDR, NULL, NULL, max_size, - max_segments, max_seg_size, 0, NULL, NULL, &sc->rx_mbuf_tag)) { + if (bus_dma_tag_create(sc->parent_tag, 1, + BCE_DMA_BOUNDARY, sc->max_bus_addr, BUS_SPACE_MAXADDR, NULL, NULL, + max_size, max_segments, max_seg_size, 0, NULL, NULL, + &sc->rx_mbuf_tag)) { BCE_PRINTF("%s(%d): Could not allocate RX mbuf DMA tag!\n", __FILE__, __LINE__); rc = ENOMEM; @@ -3468,7 +3464,8 @@ bce_dma_alloc(device_t dev) for (i = 0; i < PG_PAGES; i++) { if (bus_dmamem_alloc(sc->pg_bd_chain_tag, - (void **)&sc->pg_bd_chain[i], BUS_DMA_NOWAIT, + (void **)&sc->pg_bd_chain[i], + BUS_DMA_NOWAIT | BUS_DMA_ZERO | BUS_DMA_COHERENT, &sc->pg_bd_chain_map[i])) { BCE_PRINTF("%s(%d): Could not allocate page " "descriptor chain DMA memory!\n", @@ -3477,8 +3474,6 @@ bce_dma_alloc(device_t dev) goto bce_dma_alloc_exit; } - bzero((char *)sc->pg_bd_chain[i], BCE_PG_CHAIN_PAGE_SZ); - error = bus_dmamap_load(sc->pg_bd_chain_tag, sc->pg_bd_chain_map[i], sc->pg_bd_chain[i], BCE_PG_CHAIN_PAGE_SZ, bce_dma_map_addr, From owner-svn-src-all@FreeBSD.ORG Mon Jul 19 23:48:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7BDDF106566C; Mon, 19 Jul 2010 23:48:03 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6B6F98FC13; Mon, 19 Jul 2010 23:48:03 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6JNm3lL021547; Mon, 19 Jul 2010 23:48:03 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6JNm3Kd021543; Mon, 19 Jul 2010 23:48:03 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201007192348.o6JNm3Kd021543@svn.freebsd.org> From: Pyun YongHyeon Date: Mon, 19 Jul 2010 23:48:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210271 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jul 2010 23:48:03 -0000 Author: yongari Date: Mon Jul 19 23:48:03 2010 New Revision: 210271 URL: http://svn.freebsd.org/changeset/base/210271 Log: Specify BCE_RX_BUF_ALIGN alignment for RX buffers. All bce(4) controllers require RX buffers aligned on BCE_RX_BUF_ALIGN bytes. Reviewed by: davidch Modified: head/sys/dev/bce/if_bce.c head/sys/dev/bce/if_bcereg.h Modified: head/sys/dev/bce/if_bce.c ============================================================================== --- head/sys/dev/bce/if_bce.c Mon Jul 19 23:41:45 2010 (r210270) +++ head/sys/dev/bce/if_bce.c Mon Jul 19 23:48:03 2010 (r210271) @@ -3424,7 +3424,7 @@ bce_dma_alloc(device_t dev) "size = 0x%jX)\n", __FUNCTION__, (uintmax_t) max_size, max_segments, (uintmax_t) max_seg_size); - if (bus_dma_tag_create(sc->parent_tag, 1, + if (bus_dma_tag_create(sc->parent_tag, BCE_RX_BUF_ALIGN, BCE_DMA_BOUNDARY, sc->max_bus_addr, BUS_SPACE_MAXADDR, NULL, NULL, max_size, max_segments, max_seg_size, 0, NULL, NULL, &sc->rx_mbuf_tag)) { Modified: head/sys/dev/bce/if_bcereg.h ============================================================================== --- head/sys/dev/bce/if_bcereg.h Mon Jul 19 23:41:45 2010 (r210270) +++ head/sys/dev/bce/if_bcereg.h Mon Jul 19 23:48:03 2010 (r210271) @@ -6316,6 +6316,7 @@ struct fw_info { #define BCE_DMA_ALIGN 8 #define BCE_DMA_BOUNDARY 0 +#define BCE_RX_BUF_ALIGN 16 #define BCE_MAX_CONTEXT 4 From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 00:32:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B36791065672; Tue, 20 Jul 2010 00:32:11 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A51048FC0A; Tue, 20 Jul 2010 00:32:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K0WBPW031702; Tue, 20 Jul 2010 00:32:11 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K0WBm6031700; Tue, 20 Jul 2010 00:32:11 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007200032.o6K0WBm6031700@svn.freebsd.org> From: Rick Macklem Date: Tue, 20 Jul 2010 00:32:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210272 - head/usr.sbin/nfsdumpstate X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 00:32:11 -0000 Author: rmacklem Date: Tue Jul 20 00:32:11 2010 New Revision: 210272 URL: http://svn.freebsd.org/changeset/base/210272 Log: Fix handling of the "-l" argument for nfsdumpstate(8). Submitted by: zack.kirsch at isilon.com MFC after: 2 weeks Modified: head/usr.sbin/nfsdumpstate/nfsdumpstate.c Modified: head/usr.sbin/nfsdumpstate/nfsdumpstate.c ============================================================================== --- head/usr.sbin/nfsdumpstate/nfsdumpstate.c Mon Jul 19 23:48:03 2010 (r210271) +++ head/usr.sbin/nfsdumpstate/nfsdumpstate.c Tue Jul 20 00:32:11 2010 (r210272) @@ -76,7 +76,7 @@ main(int argc, char **argv) errx(1, "nfsd not loaded - self terminating"); openstate = 0; lockfile = NULL; - while ((ch = getopt(argc, argv, "ol")) != -1) + while ((ch = getopt(argc, argv, "ol:")) != -1) switch (ch) { case 'o': openstate = 1; From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 00:46:19 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2FBED106566C; Tue, 20 Jul 2010 00:46:19 +0000 (UTC) (envelope-from lstewart@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 204948FC0C; Tue, 20 Jul 2010 00:46:19 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K0kJHY034903; Tue, 20 Jul 2010 00:46:19 GMT (envelope-from lstewart@svn.freebsd.org) Received: (from lstewart@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K0kJOo034901; Tue, 20 Jul 2010 00:46:19 GMT (envelope-from lstewart@svn.freebsd.org) Message-Id: <201007200046.o6K0kJOo034901@svn.freebsd.org> From: Lawrence Stewart Date: Tue, 20 Jul 2010 00:46:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210273 - stable/8/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 00:46:19 -0000 Author: lstewart Date: Tue Jul 20 00:46:18 2010 New Revision: 210273 URL: http://svn.freebsd.org/changeset/base/210273 Log: MFC r209978,209981,209987,210184: - Rename DPCPU_SUM to DPCPU_VARSUM to better reflect the fact it operates on member variables of a DPCPU struct (r209978). - Add DPCPU_SUM which sums a DPCPU variable (r209978,209987,210184). - Macro to simplify zeroing DPCPU variables (r209981,209987). Sponsored by: FreeBSD Foundation Modified: stable/8/sys/sys/pcpu.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/sys/pcpu.h ============================================================================== --- stable/8/sys/sys/pcpu.h Tue Jul 20 00:32:11 2010 (r210272) +++ stable/8/sys/sys/pcpu.h Tue Jul 20 00:46:18 2010 (r210273) @@ -112,7 +112,19 @@ extern uintptr_t dpcpu_off[]; /* * Utility macros. */ -#define DPCPU_SUM(n, var) __extension__ \ +#define DPCPU_SUM(n) __extension__ \ +({ \ + u_int _i; \ + __typeof(*DPCPU_PTR(n)) sum; \ + \ + sum = 0; \ + CPU_FOREACH(_i) { \ + sum += *DPCPU_ID_PTR(_i, n); \ + } \ + sum; \ +}) + +#define DPCPU_VARSUM(n, var) __extension__ \ ({ \ u_int _i; \ __typeof((DPCPU_PTR(n))->var) sum; \ @@ -124,6 +136,14 @@ extern uintptr_t dpcpu_off[]; sum; \ }) +#define DPCPU_ZERO(n) do { \ + u_int _i; \ + \ + CPU_FOREACH(_i) { \ + bzero(DPCPU_ID_PTR(_i, n), sizeof(*DPCPU_PTR(n))); \ + } \ +} while(0) + /* * XXXUPS remove as soon as we have per cpu variable * linker sets and can define rm_queue in _rm_lock.h From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 02:23:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7252106566B; Tue, 20 Jul 2010 02:23:12 +0000 (UTC) (envelope-from davidxu@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D66EB8FC12; Tue, 20 Jul 2010 02:23:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K2NCBQ056526; Tue, 20 Jul 2010 02:23:12 GMT (envelope-from davidxu@svn.freebsd.org) Received: (from davidxu@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K2NCAi056524; Tue, 20 Jul 2010 02:23:12 GMT (envelope-from davidxu@svn.freebsd.org) Message-Id: <201007200223.o6K2NCAi056524@svn.freebsd.org> From: David Xu Date: Tue, 20 Jul 2010 02:23:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210274 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 02:23:13 -0000 Author: davidxu Date: Tue Jul 20 02:23:12 2010 New Revision: 210274 URL: http://svn.freebsd.org/changeset/base/210274 Log: Fix function name in error messages. Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Tue Jul 20 00:46:18 2010 (r210273) +++ head/sys/kern/kern_sig.c Tue Jul 20 02:23:12 2010 (r210274) @@ -2029,9 +2029,9 @@ tdsendsignal(struct proc *p, struct thre PROC_LOCK_ASSERT(p, MA_OWNED); if (!_SIG_VALID(sig)) - panic("tdsignal(): invalid signal %d", sig); + panic("%s(): invalid signal %d", __func__, sig); - KASSERT(ksi == NULL || !KSI_ONQ(ksi), ("tdsignal: ksi on queue")); + KASSERT(ksi == NULL || !KSI_ONQ(ksi), ("%s: ksi on queue", __func__)); /* * IEEE Std 1003.1-2001: return success when killing a zombie. From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 03:10:22 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 917AF106566B; Tue, 20 Jul 2010 03:10:22 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DE028FC17; Tue, 20 Jul 2010 03:10:22 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K3AMuo067022; Tue, 20 Jul 2010 03:10:22 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K3AMLe067018; Tue, 20 Jul 2010 03:10:22 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201007200310.o6K3AMLe067018@svn.freebsd.org> From: Andrew Thompson Date: Tue, 20 Jul 2010 03:10:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210275 - in head: share/man/man4 sys/dev/usb sys/dev/usb/net X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 03:10:22 -0000 Author: thompsa Date: Tue Jul 20 03:10:22 2010 New Revision: 210275 URL: http://svn.freebsd.org/changeset/base/210275 Log: - Support for Globetrotter iCON 452. - Fixed the interface probe routine to only attach to USB interfaces the driver actually supports. This allows other drivers to attach to things like MicroSD slots etc. - Fixed network interface enumeration to be globally sequential instead of relying on the USB interface numbers. This make sure the first network interface always is at uhso0 and the second at usho1 and so on. - Added a radio kill switch; exposed through sysctl. - Updated the manual page to be verbose about the number of serial ports and include iCON 452 in the set of tested hardware. Submitted by: Fredrik Lindberg Modified: head/share/man/man4/uhso.4 head/sys/dev/usb/net/uhso.c head/sys/dev/usb/usbdevs Modified: head/share/man/man4/uhso.4 ============================================================================== --- head/share/man/man4/uhso.4 Tue Jul 20 02:23:12 2010 (r210274) +++ head/share/man/man4/uhso.4 Tue Jul 20 03:10:22 2010 (r210275) @@ -43,8 +43,9 @@ based on their packet interface. Each device has a set of serial ports and a raw IP packet interface. The serial ports of the device are accessed through the .Xr ucom 4 -driver which makes them behave like a -.Xr tty 4 . +driver which makes them behave like +.Xr tty 4 +devices. The packet interface is exposed as a network interface. .Pp Establishing a connection on the packet interface is achieved by using the @@ -60,10 +61,19 @@ these calls. Each device usually have at least two or more serial ports, their individual purpose can be identified through .Xr sysctl 8 . +Ports identified as +.Dq Modem +features a normal modem interface that can be used with PPP. +Ports identified as +.Dq Diagnostic +uses a proprietary binary interface used for firmware upgrades, this port does not +have a AT command interface and can not be used to control the device. +Other ports features an AT command interface that can be used for normal device control. .Sh HARDWARE The .Nm -driver supports at least the following cards +driver should work with most devices from Option. +The following devices have been verified to work .Pp .Bl -bullet -compact .It @@ -71,6 +81,8 @@ Option GlobeSurfer iCON 7.2 (new firmwar .It Option iCON 225 .It +Option iCON 452 +.It Option iCON 505 .El .Pp @@ -92,7 +104,8 @@ to 0 using .It Pa /dev/cuaU?.? .El .Sh EXAMPLES -Establishing a packet interface connection +Establishing a packet interface connection using the AT command interface available +at one of the serial ports .Bd -literal -offset indent AT+CGDCONT=1,,"apn.provider" AT_OWANCALL=1,1,1 Modified: head/sys/dev/usb/net/uhso.c ============================================================================== --- head/sys/dev/usb/net/uhso.c Tue Jul 20 02:23:12 2010 (r210274) +++ head/sys/dev/usb/net/uhso.c Tue Jul 20 03:10:22 2010 (r210275) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2009 Fredrik Lindberg + * Copyright (c) 2010 Fredrik Lindberg * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,6 +42,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -81,6 +82,7 @@ struct uhso_softc { struct usb_device *sc_udev; struct mtx sc_mtx; uint32_t sc_type; /* Interface definition */ + int sc_radio; struct usb_xfer *sc_xfer[3]; uint8_t sc_iface_no; @@ -155,6 +157,7 @@ struct uhso_softc { * Note that these definitions are arbitrary and do not match the values * returned by the auto config descriptor. */ +#define UHSO_PORT_TYPE_UNKNOWN 0x00 #define UHSO_PORT_TYPE_CTL 0x01 #define UHSO_PORT_TYPE_APP 0x02 #define UHSO_PORT_TYPE_APP2 0x03 @@ -185,7 +188,7 @@ static char *uhso_port[] = { * descriptor values. */ static unsigned char uhso_port_map[] = { - 0, + UHSO_PORT_TYPE_UNKNOWN, UHSO_PORT_TYPE_DIAG, UHSO_PORT_TYPE_GPS, UHSO_PORT_TYPE_GPSCTL, @@ -243,6 +246,9 @@ static char *uhso_port_type_sysctl[] = { #define UHSO_STATIC_IFACE 0x01 #define UHSO_AUTO_IFACE 0x02 +/* ifnet device unit allocations */ +static struct unrhdr *uhso_ifnet_unit = NULL; + static const struct usb_device_id uhso_devs[] = { #define UHSO_DEV(v,p,i) { USB_VPI(USB_VENDOR_##v, USB_PRODUCT_##v##_##p, i) } /* Option GlobeSurfer iCON 7.2 */ @@ -272,6 +278,8 @@ static const struct usb_device_id uhso_d UHSO_DEV(OPTION, GTICON322, UHSO_STATIC_IFACE), /* Option iCON 505 */ UHSO_DEV(OPTION, ICON505, UHSO_AUTO_IFACE), + /* Option iCON 452 */ + UHSO_DEV(OPTION, ICON505, UHSO_AUTO_IFACE), #undef UHSO_DEV }; @@ -432,9 +440,9 @@ static const struct usb_config uhso_bs_c }; static int uhso_probe_iface(struct uhso_softc *, int, - int (*probe)(struct uhso_softc *, int)); -static int uhso_probe_iface_auto(struct uhso_softc *, int); -static int uhso_probe_iface_static(struct uhso_softc *, int); + int (*probe)(struct usb_device *, int)); +static int uhso_probe_iface_auto(struct usb_device *, int); +static int uhso_probe_iface_static(struct usb_device *, int); static int uhso_attach_muxserial(struct uhso_softc *, struct usb_interface *, int type); static int uhso_attach_bulkserial(struct uhso_softc *, struct usb_interface *, @@ -444,6 +452,8 @@ static int uhso_attach_ifnet(struct uhs static void uhso_test_autoinst(void *, struct usb_device *, struct usb_attach_arg *); static int uhso_driver_loaded(struct module *, int, void *); +static int uhso_radio_sysctl(SYSCTL_HANDLER_ARGS); +static int uhso_radio_ctrl(struct uhso_softc *, int); static void uhso_ucom_start_read(struct ucom_softc *); static void uhso_ucom_stop_read(struct ucom_softc *); @@ -497,6 +507,7 @@ static int uhso_probe(device_t self) { struct usb_attach_arg *uaa = device_get_ivars(self); + int error; if (uaa->usb_mode != USB_MODE_HOST) return (ENXIO); @@ -505,7 +516,20 @@ uhso_probe(device_t self) if (uaa->device->ddesc.bDeviceClass != 0xff) return (ENXIO); - return (usbd_lookup_id_by_uaa(uhso_devs, sizeof(uhso_devs), uaa)); + error = usbd_lookup_id_by_uaa(uhso_devs, sizeof(uhso_devs), uaa); + if (error != 0) + return (error); + + /* + * Probe device to see if we are able to attach + * to this interface or not. + */ + if (USB_GET_DRIVER_INFO(uaa) == UHSO_AUTO_IFACE) { + if (uhso_probe_iface_auto(uaa->device, + uaa->info.bIfaceNum) == 0) + return (ENXIO); + } + return (error); } static int @@ -517,7 +541,7 @@ uhso_attach(device_t self) struct usb_interface_descriptor *id; struct sysctl_ctx_list *sctx; struct sysctl_oid *soid; - struct sysctl_oid *tree, *tty_node; + struct sysctl_oid *tree = NULL, *tty_node; struct ucom_softc *ucom; struct uhso_tty *ht; int i, error, port; @@ -531,6 +555,7 @@ uhso_attach(device_t self) sc->sc_ucom = NULL; sc->sc_ttys = 0; + sc->sc_radio = 1; cd = usbd_get_config_descriptor(uaa->device); id = usbd_get_interface_descriptor(uaa->iface); @@ -566,6 +591,8 @@ uhso_attach(device_t self) SYSCTL_ADD_STRING(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "type", CTLFLAG_RD, uhso_port[UHSO_IFACE_PORT(sc->sc_type)], 0, "Port available at this interface"); + SYSCTL_ADD_PROC(sctx, SYSCTL_CHILDREN(soid), OID_AUTO, "radio", + CTLTYPE_INT | CTLFLAG_RW, sc, 0, uhso_radio_sysctl, "I", "Enable radio"); /* * The default interface description on most Option devices isn't @@ -655,6 +682,7 @@ uhso_detach(device_t self) if (sc->sc_ifp != NULL) { callout_drain(&sc->sc_c); + free_unr(uhso_ifnet_unit, sc->sc_ifp->if_dunit); mtx_lock(&sc->sc_mtx); uhso_if_stop(sc); bpfdetach(sc->sc_ifp); @@ -701,9 +729,12 @@ uhso_driver_loaded(struct module *mod, i /* register our autoinstall handler */ uhso_etag = EVENTHANDLER_REGISTER(usb_dev_configured, uhso_test_autoinst, NULL, EVENTHANDLER_PRI_ANY); + /* create our unit allocator for inet devs */ + uhso_ifnet_unit = new_unrhdr(0, INT_MAX, NULL); break; case MOD_UNLOAD: EVENTHANDLER_DEREGISTER(usb_dev_configured, uhso_etag); + delete_unrhdr(uhso_ifnet_unit); break; default: return (EOPNOTSUPP); @@ -717,7 +748,7 @@ uhso_driver_loaded(struct module *mod, i * Returns a bit mask with the interface capabilities. */ static int -uhso_probe_iface_auto(struct uhso_softc *sc, int index) +uhso_probe_iface_auto(struct usb_device *udev, int index) { struct usb_device_request req; usb_error_t uerr; @@ -731,11 +762,11 @@ uhso_probe_iface_auto(struct uhso_softc USETW(req.wIndex, 0); USETW(req.wLength, 17); - uerr = usbd_do_request_flags(sc->sc_udev, NULL, &req, buf, + uerr = usbd_do_request_flags(udev, NULL, &req, buf, 0, &actlen, USB_MS_HZ); if (uerr != 0) { - device_printf(sc->sc_dev, "usbd_do_request_flags failed: %s\n", - usbd_errstr(uerr)); + printf("%s: usbd_do_request_flags failed, %s\n", + __func__, usbd_errstr(uerr)); return (0); } @@ -759,23 +790,35 @@ uhso_probe_iface_auto(struct uhso_softc case UHSO_PORT_TYPE_NETWORK: return (UHSO_IFACE_SPEC(UHSO_IF_NET | UHSO_IF_MUX, UHSO_PORT_SERIAL | UHSO_PORT_NETWORK, port)); - case UHSO_PORT_TYPE_VOICE: - /* Don't claim 'voice' ports */ - return (0); - default: + case UHSO_PORT_TYPE_DIAG: + case UHSO_PORT_TYPE_DIAG2: + case UHSO_PORT_TYPE_CTL: + case UHSO_PORT_TYPE_APP: + case UHSO_PORT_TYPE_APP2: + case UHSO_PORT_TYPE_MODEM: return (UHSO_IFACE_SPEC(UHSO_IF_BULK, UHSO_PORT_SERIAL, port)); + case UHSO_PORT_TYPE_MSD: + return (0); + case UHSO_PORT_TYPE_UNKNOWN: + default: + return (0); } return (0); } +/* + * Returns the capabilities of interfaces for devices that don't + * support the automatic query. + * Returns a bit mask with the interface capabilities. + */ static int -uhso_probe_iface_static(struct uhso_softc *sc, int index) +uhso_probe_iface_static(struct usb_device *udev, int index) { struct usb_config_descriptor *cd; - cd = usbd_get_config_descriptor(sc->sc_udev); + cd = usbd_get_config_descriptor(udev); if (cd->bNumInterface <= 3) { /* Cards with 3 or less interfaces */ switch (index) { @@ -817,14 +860,14 @@ uhso_probe_iface_static(struct uhso_soft */ static int uhso_probe_iface(struct uhso_softc *sc, int index, - int (*probe)(struct uhso_softc *, int)) + int (*probe)(struct usb_device *, int)) { struct usb_interface *iface; int type, error; UHSO_DPRINTF(1, "Probing for interface %d, probe_func=%p\n", index, probe); - type = probe(sc, index); + type = probe(sc->sc_udev, index); UHSO_DPRINTF(1, "Probe result %x\n", type); if (type <= 0) return (ENXIO); @@ -888,6 +931,47 @@ uhso_probe_iface(struct uhso_softc *sc, return (0); } +static int +uhso_radio_ctrl(struct uhso_softc *sc, int onoff) +{ + struct usb_device_request req; + usb_error_t uerr; + + req.bmRequestType = UT_VENDOR; + req.bRequest = onoff ? 0x82 : 0x81; + USETW(req.wValue, 0); + USETW(req.wIndex, 0); + USETW(req.wLength, 0); + + uerr = usbd_do_request(sc->sc_udev, NULL, &req, NULL); + if (uerr != 0) { + device_printf(sc->sc_dev, "usbd_do_request_flags failed: %s\n", + usbd_errstr(uerr)); + return (-1); + } + return (onoff); +} + +static int +uhso_radio_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct uhso_softc *sc = arg1; + int error, radio; + + radio = sc->sc_radio; + error = sysctl_handle_int(oidp, &radio, 0, req); + if (error) + return (error); + if (radio != sc->sc_radio) { + radio = radio != 0 ? 1 : 0; + error = uhso_radio_ctrl(sc, radio); + if (error != -1) + sc->sc_radio = radio; + + } + return (0); +} + /* * Expands allocated memory to fit an additional TTY. * Two arrays are kept with matching indexes, one for ucom and one @@ -1435,13 +1519,14 @@ uhso_ucom_stop_write(struct ucom_softc * } } -static int uhso_attach_ifnet(struct uhso_softc *sc, struct usb_interface *iface, - int type) +static int +uhso_attach_ifnet(struct uhso_softc *sc, struct usb_interface *iface, int type) { struct ifnet *ifp; usb_error_t uerr; struct sysctl_ctx_list *sctx; struct sysctl_oid *soid; + unsigned int devunit; uerr = usbd_transfer_setup(sc->sc_udev, &iface->idesc->bInterfaceNumber, sc->sc_if_xfer, @@ -1463,7 +1548,14 @@ static int uhso_attach_ifnet(struct uhso callout_reset(&sc->sc_c, 1, uhso_if_rxflush, sc); mtx_unlock(&sc->sc_mtx); - if_initname(ifp, device_get_name(sc->sc_dev), device_get_unit(sc->sc_dev)); + /* + * We create our own unit numbers for ifnet devices because the + * USB interface unit numbers can be at arbitrary positions yielding + * odd looking device names. + */ + devunit = alloc_unr(uhso_ifnet_unit); + + if_initname(ifp, device_get_name(sc->sc_dev), devunit); ifp->if_mtu = UHSO_MAX_MTU; ifp->if_ioctl = uhso_if_ioctl; ifp->if_init = uhso_if_init; Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Tue Jul 20 02:23:12 2010 (r210274) +++ head/sys/dev/usb/usbdevs Tue Jul 20 03:10:22 2010 (r210275) @@ -2301,6 +2301,7 @@ product OPTION ICONEDGE 0xc031 GlobeSur product OPTION MODHSXPA 0xd013 Globetrotter HSUPA product OPTION ICON321 0xd031 Globetrotter HSUPA product OPTION ICON505 0xd055 Globetrotter iCON 505 +product OPTION_ICON452 0x7901 Globetrotter iCON 452 /* OvisLink product */ product OVISLINK RT3072 0x3072 RT3072 From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 03:11:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AFD4F106567B; Tue, 20 Jul 2010 03:11:26 +0000 (UTC) (envelope-from thompsa@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9C2E58FC1E; Tue, 20 Jul 2010 03:11:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K3BQni067448; Tue, 20 Jul 2010 03:11:26 GMT (envelope-from thompsa@svn.freebsd.org) Received: (from thompsa@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K3BQWj067446; Tue, 20 Jul 2010 03:11:26 GMT (envelope-from thompsa@svn.freebsd.org) Message-Id: <201007200311.o6K3BQWj067446@svn.freebsd.org> From: Andrew Thompson Date: Tue, 20 Jul 2010 03:11:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210276 - head/usr.sbin/uhsoctl X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 03:11:26 -0000 Author: thompsa Date: Tue Jul 20 03:11:26 2010 New Revision: 210276 URL: http://svn.freebsd.org/changeset/base/210276 Log: - Fixed automatic detection of the control serial port. - Fixed segmentation fault when an invalid network interface was given. - More helpful message in case of wrong PIN number. Submitted by: Fredrik Lindberg Modified: head/usr.sbin/uhsoctl/uhsoctl.c Modified: head/usr.sbin/uhsoctl/uhsoctl.c ============================================================================== --- head/usr.sbin/uhsoctl/uhsoctl.c Tue Jul 20 03:10:22 2010 (r210275) +++ head/usr.sbin/uhsoctl/uhsoctl.c Tue Jul 20 03:11:26 2010 (r210276) @@ -66,6 +66,7 @@ #define TTY_NAME "/dev/%s" #define SYSCTL_TEST "dev.uhso.%d.%%driver" +#define SYSCTL_LOCATION "dev.uhso.%d.%%location" #define SYSCTL_PORTS "dev.uhso.%d.ports" #define SYSCTL_NETIF "dev.uhso.%d.netif" #define SYSCTL_NAME_TTY "dev.uhso.%d.port.%s.tty" @@ -207,9 +208,6 @@ tmr_run(struct timers *tmrs) while (te->timeout <= 0) { te2 = TAILQ_NEXT(te, next); TAILQ_REMOVE(&tmrs->head, te, next); - if (te2 != NULL) - te2->timeout -= tmrs->res; - te->func(te->id, te->arg); free(te); te = te2; @@ -579,12 +577,13 @@ readline(int fd, char *buf, size_t bufsz static int at_cmd(struct ctx *ctx, const char *resp, resp_cb cb, resp_arg *ra, const char *cf, ...) { + char buf[512]; + char cmd[64]; size_t l; int n, error, retval = 0; va_list ap; fd_set set; - char buf[512]; - char cmd[64]; + char *p; va_start(ap, cf); vsnprintf(cmd, sizeof(cmd), cf, ap); @@ -614,12 +613,12 @@ at_cmd(struct ctx *ctx, const char *resp do { FD_SET(ctx->fd, &set); error = select(ctx->fd + 1, &set, NULL, NULL, NULL); - if (error < 0 && errno == EINTR && ctx->flags & FLG_WDEXP) { + if (ctx->flags & FLG_WDEXP) { watchdog_disable(ctx); - retval = -2; - break; + return (-2); } } while (error <= 0 && errno == EINTR); + watchdog_disable(ctx); if (error <= 0) { retval = -2; @@ -635,24 +634,30 @@ at_cmd(struct ctx *ctx, const char *resp if (strcmp(buf, "\r\n") == 0 || strcmp(buf, "\n") == 0) continue; + if ((p = strchr(buf, '\r')) != NULL) + *p = '\0'; + else if ((p = strchr(buf, '\n')) != NULL) + *p = '\0'; #ifdef DEBUG - fprintf(stderr, "SYNC_RESP: %s", buf); + fprintf(stderr, "SYNC_RESP: %s\n", buf); #endif + /* Skip local echo */ + if (strncasecmp(cmd, buf, strlen(buf)) == 0) + continue; + + if (cb != NULL) + cb(ra, cmd, buf); + if (strncmp(buf, "OK", 2) == 0) { + retval = retval ? retval : 0; break; - } - else if (strncmp(buf, "ERROR", 5) == 0) { + } else if (strstr(buf, "ERROR") != NULL) { retval = -1; break; } - - if (resp != NULL) { - retval = strncmp(resp, buf, l); - if (retval == 0 && cb != NULL) { - cb(ra, cmd, buf); - } - } + if (resp != NULL) + retval = strncmp(buf, resp, l); } #ifdef DEBUG fprintf(stderr, "SYNC_RETVAL=%d\n", retval); @@ -684,6 +689,10 @@ saveresp(resp_arg *ra, const char *cmd, char **buf; int i = ra->val[1].int32; +#ifdef DEBUG + fprintf(stderr, "Save '%s'\n", resp); +#endif + buf = realloc(ra->val[0].ptr, sizeof(char *) * (i + 1)); if (buf == NULL) return; @@ -695,6 +704,19 @@ saveresp(resp_arg *ra, const char *cmd, } static void +freeresp(resp_arg *ra) +{ + char **buf; + int i; + + buf = ra->val[0].ptr; + for (i = 0; i < ra->val[1].int32; i++) { + free(buf[i]); + } + free(buf); +} + +static void at_async_creg(void *arg, const char *resp) { struct ctx *ctx = arg; @@ -992,129 +1014,119 @@ static const char *port_type_list[] = { /* * Attempts to find a list of control tty for the interface - * FreeBSD attaches USb devices per interface so we have to go through + * FreeBSD attaches USB devices per interface so we have to go through * hoops to find which ttys that belong to our network interface. */ static char ** get_tty(struct ctx *ctx) { - char buf[64]; - char data[128]; - size_t len; - int error; - unsigned int i; + char buf[64], data[128]; + int error, i, usbport, usbport0, list_size = 0; char **list = NULL; - int list_size = 0; - const char **p; + size_t len; + const char **p, *q; + /* + * Look for the network interface first + */ for (i = 0; ; i++) { - /* Basic test to check if we're even in the right ballpark */ + /* Check if we still have uhso nodes to check */ snprintf(buf, 64, SYSCTL_TEST, i); len = 127; error = sysctlbyname(buf, data, &len, NULL, 0); + data[len] = '\0'; #ifdef DEBUG fprintf(stderr, "sysctl %s returned(%d): %s\n", buf, error, error == 0 ? data : "FAILED"); #endif - if (error < 0) - return NULL; - if (strcasecmp(data, "uhso") != 0) + if (error < 0 || strcasecmp(data, "uhso") != 0) return NULL; - /* Check for interface */ + /* Check if this node contains the network interface we want */ snprintf(buf, 64, SYSCTL_NETIF, i); len = 127; error = sysctlbyname(buf, data, &len, NULL, 0); + data[len] = '\0'; #ifdef DEBUG fprintf(stderr, "sysctl %s returned(%d): %s\n", buf, error, error == 0 ? data : "FAILED"); #endif - if (error < 0) - continue; + if (error == 0 && strcasecmp(data, ctx->ifnam) == 0) + break; + } - if (strcasecmp(data, ctx->ifnam) != 0) - continue; + /* Figure out the USB port location */ + snprintf(buf, 64, SYSCTL_LOCATION, i); + len = 127; + error = sysctlbyname(buf, data, &len, NULL, 0); + data[len] = '\0'; #ifdef DEBUG - fprintf(stderr, "Found %s at %s\n", ctx->ifnam, buf); + fprintf(stderr, "sysctl %s returned(%d): %s\n", + buf, error, error == 0 ? data : "FAILED"); #endif - break; - } + if (error != 0) + return (NULL); - /* Add multiplexed ports */ - for (p = port_type_list; *p != NULL; p++) { - snprintf(buf, 64, SYSCTL_NAME_TTY, i, *p); - len = 127; - error = sysctlbyname(buf, data, &len, NULL, 0); + q = strstr(data, "port="); + if (q != NULL) { + error = sscanf(q, " port=%d", &usbport); + if (error != 1) { #ifdef DEBUG - fprintf(stderr, "sysctl %s returned(%d): %s\n", - buf, error, error == 0 ? data : "FAILED"); + fprintf(stderr, "failed to read usb port location from '%s'\n", data); #endif - if (error == 0) { - list = realloc(list, (list_size + 1) * sizeof(char *)); - list[list_size] = malloc(strlen(data) + strlen(TTY_NAME)); - sprintf(list[list_size], TTY_NAME, data); - list_size++; + return (NULL); } + } else { +#ifdef DEBUG + fprintf(stderr, "failed to parse location '%s'\n", data); +#endif + return (NULL); } - - /* - * We can return directly if we found multiplexed serial ports because - * devices with these ports only have additional diagnostic ports (useless) - * and modem ports (for used with pppd). - */ - if (list_size > 0) { - list = realloc(list, (list_size + 1) * sizeof(char *)); - list[list_size] = NULL; - return list; - } +#ifdef DEBUG + fprintf(stderr, "USB port location=%d\n", usbport); +#endif /* - * The network port is on a high numbered interface so we walk backwards until - * we hit anything other than application/control. + * Now go through it all again but only look at those matching the + * usb port location we found. */ - - for (--i; i >= 0; i--) { - /* Basic test to check if we're even in the right ballpark */ - snprintf(buf, 64, SYSCTL_TEST, i); + for (i = 0; ; i++) { + snprintf(buf, 64, SYSCTL_LOCATION, i); len = 127; + memset(&data, 0, sizeof(data)); error = sysctlbyname(buf, data, &len, NULL, 0); -#ifdef DEBUG - fprintf(stderr, "sysctl %s returned(%d): %s\n", - buf, error, error == 0 ? data : "FAILED"); -#endif - if (error < 0) - break; - if (strcasecmp(data, "uhso") != 0) + if (error != 0) break; + data[len] = '\0'; + q = strstr(data, "port="); + if (q == NULL) + continue; + sscanf(q, " port=%d", &usbport0); + if (usbport != usbport0) + continue; - /* Test for useable ports */ + /* Try to add ports */ for (p = port_type_list; *p != NULL; p++) { - snprintf(buf, 64, SYSCTL_NAME_TTY, i, p); + snprintf(buf, 64, SYSCTL_NAME_TTY, i, *p); len = 127; + memset(&data, 0, sizeof(data)); error = sysctlbyname(buf, data, &len, NULL, 0); + data[len] = '\0'; +#ifdef DEBUG + fprintf(stderr, "sysctl %s returned(%d): %s\n", + buf, error, error == 0 ? data : "FAILED"); +#endif if (error == 0) { list = realloc(list, (list_size + 1) * sizeof(char *)); list[list_size] = malloc(strlen(data) + strlen(TTY_NAME)); - sprintf(list[list_size], TTY_NAME, data); - list_size++; + sprintf(list[list_size], TTY_NAME, data); + list_size++; } } - - /* HACK! first port is a diagnostic port, we abort here */ - snprintf(buf, 64, SYSCTL_NAME_TTY, i, "diagnostic"); - len = 127; - error = sysctlbyname(buf, data, &len, NULL, 0); -#ifdef DEBUG - fprintf(stderr, "sysctl %s returned(%d): %s\n", - buf, error, error == 0 ? data : "FAILED"); -#endif - if (error == 0) - break; } - list = realloc(list, (list_size + 1) * sizeof(char *)); list[list_size] = NULL; - return list; + return (list); } static int @@ -1146,13 +1158,28 @@ do_connect(struct ctx *ctx, const char * error = at_cmd(ctx, NULL, NULL, NULL, "AT\r\n"); if (error == -2) { - warnx("failed to read from device"); + warnx("failed to read from device %s", tty); return (-1); } /* Check for PIN */ error = at_cmd(ctx, "+CPIN: READY", NULL, NULL, "AT+CPIN?\r\n"); if (error != 0) { + ra.val[0].ptr = NULL; + ra.val[1].int32 = 0; + error = at_cmd(ctx, "+CME ERROR", saveresp, &ra, "AT+CPIN?\r\n"); + if (ra.val[1].int32 > 0) { + char *p; + + buf = ra.val[0].ptr; + if (strstr(buf[0], "+CME ERROR:") != NULL) { + buf[0] += 12; + errx(1, buf[0]); + } + freeresp(&ra); + } else + freeresp(&ra); + if (ctx->pin == NULL) { errx(1, "device requires PIN"); } @@ -1445,6 +1472,8 @@ main(int argc, char *argv[]) } else { tty_list = get_tty(&ctx); + if (tty_list == NULL) + errx(1, "%s does not appear to be a uhso device", ifnam); #ifdef DEBUG if (tty_list == NULL) { fprintf(stderr, "get_tty returned empty list\n"); @@ -1507,7 +1536,7 @@ main(int argc, char *argv[]) network_access_type[ctx.con_net_type]); if (ctx.dbm < 0) printf(", signal: %d dBm", ctx.dbm); - printf("\r"); + printf("\t\t\t\r"); fflush(stdout); } } From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 05:14:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3487D1065679; Tue, 20 Jul 2010 05:14:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1F4D48FC1D; Tue, 20 Jul 2010 05:14:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K5EVEL094751; Tue, 20 Jul 2010 05:14:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K5EVE8094749; Tue, 20 Jul 2010 05:14:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007200514.o6K5EVE8094749@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Jul 2010 05:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210280 - stable/8/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 05:14:31 -0000 Author: mav Date: Tue Jul 20 05:14:30 2010 New Revision: 210280 URL: http://svn.freebsd.org/changeset/base/210280 Log: MFC r210165: Improve interrupt setup errors handling. Modified: stable/8/sys/dev/ata/ata-pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-pci.c ============================================================================== --- stable/8/sys/dev/ata/ata-pci.c Tue Jul 20 05:14:27 2010 (r210279) +++ stable/8/sys/dev/ata/ata-pci.c Tue Jul 20 05:14:30 2010 (r210280) @@ -806,17 +806,23 @@ ata_setup_interrupt(device_t dev, void * if (msi && pci_msi_count(dev) > 0 && pci_alloc_msi(dev, &msi) == 0) { ctlr->r_irq_rid = 0x1; } else { + msi = 0; ctlr->r_irq_rid = ATA_IRQ_RID; } if (!(ctlr->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &ctlr->r_irq_rid, RF_SHAREABLE | RF_ACTIVE))) { device_printf(dev, "unable to map interrupt\n"); + if (msi) + pci_release_msi(dev); return ENXIO; } if ((bus_setup_intr(dev, ctlr->r_irq, ATA_INTR_FLAGS, NULL, intr_func, ctlr, &ctlr->handle))) { - /* SOS XXX release r_irq */ device_printf(dev, "unable to setup interrupt\n"); + bus_release_resource(dev, + SYS_RES_IRQ, ctlr->r_irq_rid, ctlr->r_irq); + if (msi) + pci_release_msi(dev); return ENXIO; } } From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 05:16:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 08CDF106567C; Tue, 20 Jul 2010 05:16:11 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8A5D8FC14; Tue, 20 Jul 2010 05:16:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K5GA6a095188; Tue, 20 Jul 2010 05:16:10 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K5GACw095186; Tue, 20 Jul 2010 05:16:10 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007200516.o6K5GACw095186@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Jul 2010 05:16:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210281 - stable/8/sys/dev/ata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 05:16:11 -0000 Author: mav Date: Tue Jul 20 05:16:10 2010 New Revision: 210281 URL: http://svn.freebsd.org/changeset/base/210281 Log: MFC r210168: Make legacy ATA emulation detection more strict. This should fix false positive legacy detection and attach failure/panic for Marvell 88SX6141 controller and potentially some others. PR: kern/145064 Modified: stable/8/sys/dev/ata/ata-pci.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/ata/ata-pci.c ============================================================================== --- stable/8/sys/dev/ata/ata-pci.c Tue Jul 20 05:14:30 2010 (r210280) +++ stable/8/sys/dev/ata/ata-pci.c Tue Jul 20 05:16:10 2010 (r210281) @@ -769,7 +769,8 @@ DRIVER_MODULE(ata, atapci, ata_pcichanne int ata_legacy(device_t dev) { - return (((pci_read_config(dev, PCIR_PROGIF, 1)&PCIP_STORAGE_IDE_MASTERDEV)&& + return (((pci_read_config(dev, PCIR_SUBCLASS, 1) == PCIS_STORAGE_IDE) && + (pci_read_config(dev, PCIR_PROGIF, 1)&PCIP_STORAGE_IDE_MASTERDEV)&& ((pci_read_config(dev, PCIR_PROGIF, 1) & (PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC)) != (PCIP_STORAGE_IDE_MODEPRIM | PCIP_STORAGE_IDE_MODESEC))) || From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 05:22:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66394106564A; Tue, 20 Jul 2010 05:22:14 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 51A008FC15; Tue, 20 Jul 2010 05:22:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K5MEM5096562; Tue, 20 Jul 2010 05:22:14 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K5MEC2096560; Tue, 20 Jul 2010 05:22:14 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201007200522.o6K5MEC2096560@svn.freebsd.org> From: Martin Matuska Date: Tue, 20 Jul 2010 05:22:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210282 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 05:22:14 -0000 Author: mm Date: Tue Jul 20 05:22:14 2010 New Revision: 210282 URL: http://svn.freebsd.org/changeset/base/210282 Log: To improve latency, lower default vfs.zfs.vdev.max_pending from 35 to 10 OpenSolaris onnv changeset (partial): 10801:e0bf032e8673 Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6891731) MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Tue Jul 20 05:16:10 2010 (r210281) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Tue Jul 20 05:22:14 2010 (r210282) @@ -38,7 +38,7 @@ * of i/os pending to each device (before it starts ramping up to * max_pending). */ -int zfs_vdev_max_pending = 35; +int zfs_vdev_max_pending = 10; int zfs_vdev_min_pending = 4; /* deadline = pri + (LBOLT >> time_shift) */ From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 06:38:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0EE31065680; Tue, 20 Jul 2010 06:38:57 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F2028FC18; Tue, 20 Jul 2010 06:38:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K6cvSv013662; Tue, 20 Jul 2010 06:38:57 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K6cvB0013660; Tue, 20 Jul 2010 06:38:57 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007200638.o6K6cvB0013660@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 20 Jul 2010 06:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210283 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 06:38:57 -0000 Author: trasz Date: Tue Jul 20 06:38:57 2010 New Revision: 210283 URL: http://svn.freebsd.org/changeset/base/210283 Log: Add reference to uhsoctl(1). Modified: head/share/man/man4/uhso.4 Modified: head/share/man/man4/uhso.4 ============================================================================== --- head/share/man/man4/uhso.4 Tue Jul 20 05:22:14 2010 (r210282) +++ head/share/man/man4/uhso.4 Tue Jul 20 06:38:57 2010 (r210283) @@ -23,7 +23,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2010 +.Dd July 20, 2010 .Dt UHSO 4 .Os .Sh NAME @@ -130,6 +130,7 @@ The connection can be terminated with AT_OWANCALL=1,0,1 .Ed .Sh SEE ALSO +.Xr uhsoctl 1 , .Xr ucom 4 , .Xr usb 4 .Sh AUTHORS From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 07:11:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 494521065673; Tue, 20 Jul 2010 07:11:20 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 35CC88FC1D; Tue, 20 Jul 2010 07:11:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K7BKdl020892; Tue, 20 Jul 2010 07:11:20 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K7BKB0020885; Tue, 20 Jul 2010 07:11:20 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201007200711.o6K7BKB0020885@svn.freebsd.org> From: Juli Mallett Date: Tue, 20 Jul 2010 07:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210284 - in vendor-sys/octeon-sdk: . dist dist/cvmx-malloc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 07:11:20 -0000 Author: jmallett Date: Tue Jul 20 07:11:19 2010 New Revision: 210284 URL: http://svn.freebsd.org/changeset/base/210284 Log: Initial import of Cavium Networks Octeon Simple Executive, SDK version 1.9.0. Added: vendor-sys/octeon-sdk/ vendor-sys/octeon-sdk/dist/ vendor-sys/octeon-sdk/dist/README.txt vendor-sys/octeon-sdk/dist/cvmip.h vendor-sys/octeon-sdk/dist/cvmx-abi.h vendor-sys/octeon-sdk/dist/cvmx-access-native.h vendor-sys/octeon-sdk/dist/cvmx-access.h vendor-sys/octeon-sdk/dist/cvmx-address.h vendor-sys/octeon-sdk/dist/cvmx-app-init-linux.c vendor-sys/octeon-sdk/dist/cvmx-app-init.c vendor-sys/octeon-sdk/dist/cvmx-app-init.h vendor-sys/octeon-sdk/dist/cvmx-asm.h vendor-sys/octeon-sdk/dist/cvmx-asx.h vendor-sys/octeon-sdk/dist/cvmx-atomic.h vendor-sys/octeon-sdk/dist/cvmx-bootloader.h vendor-sys/octeon-sdk/dist/cvmx-bootmem.c vendor-sys/octeon-sdk/dist/cvmx-bootmem.h vendor-sys/octeon-sdk/dist/cvmx-ciu.h vendor-sys/octeon-sdk/dist/cvmx-cmd-queue.c vendor-sys/octeon-sdk/dist/cvmx-cmd-queue.h vendor-sys/octeon-sdk/dist/cvmx-cn3010-evb-hs5.c vendor-sys/octeon-sdk/dist/cvmx-cn3010-evb-hs5.h vendor-sys/octeon-sdk/dist/cvmx-compactflash.c vendor-sys/octeon-sdk/dist/cvmx-compactflash.h vendor-sys/octeon-sdk/dist/cvmx-core.c vendor-sys/octeon-sdk/dist/cvmx-core.h vendor-sys/octeon-sdk/dist/cvmx-coremask.c vendor-sys/octeon-sdk/dist/cvmx-coremask.h vendor-sys/octeon-sdk/dist/cvmx-csr-addresses.h vendor-sys/octeon-sdk/dist/cvmx-csr-db-support.c vendor-sys/octeon-sdk/dist/cvmx-csr-db.c vendor-sys/octeon-sdk/dist/cvmx-csr-db.h vendor-sys/octeon-sdk/dist/cvmx-csr-enums.h vendor-sys/octeon-sdk/dist/cvmx-csr-typedefs.h vendor-sys/octeon-sdk/dist/cvmx-csr.h vendor-sys/octeon-sdk/dist/cvmx-cvmmem.h vendor-sys/octeon-sdk/dist/cvmx-dfa.c vendor-sys/octeon-sdk/dist/cvmx-dfa.h vendor-sys/octeon-sdk/dist/cvmx-dma-engine.c vendor-sys/octeon-sdk/dist/cvmx-dma-engine.h vendor-sys/octeon-sdk/dist/cvmx-ebt3000.c vendor-sys/octeon-sdk/dist/cvmx-ebt3000.h vendor-sys/octeon-sdk/dist/cvmx-fau.h vendor-sys/octeon-sdk/dist/cvmx-flash.c vendor-sys/octeon-sdk/dist/cvmx-flash.h vendor-sys/octeon-sdk/dist/cvmx-fpa.c vendor-sys/octeon-sdk/dist/cvmx-fpa.h vendor-sys/octeon-sdk/dist/cvmx-gmx.h vendor-sys/octeon-sdk/dist/cvmx-gpio.h vendor-sys/octeon-sdk/dist/cvmx-helper-board.c vendor-sys/octeon-sdk/dist/cvmx-helper-board.h vendor-sys/octeon-sdk/dist/cvmx-helper-check-defines.h vendor-sys/octeon-sdk/dist/cvmx-helper-errata.c vendor-sys/octeon-sdk/dist/cvmx-helper-errata.h vendor-sys/octeon-sdk/dist/cvmx-helper-fpa.c vendor-sys/octeon-sdk/dist/cvmx-helper-fpa.h vendor-sys/octeon-sdk/dist/cvmx-helper-loop.c vendor-sys/octeon-sdk/dist/cvmx-helper-loop.h vendor-sys/octeon-sdk/dist/cvmx-helper-npi.c vendor-sys/octeon-sdk/dist/cvmx-helper-npi.h vendor-sys/octeon-sdk/dist/cvmx-helper-rgmii.c vendor-sys/octeon-sdk/dist/cvmx-helper-rgmii.h vendor-sys/octeon-sdk/dist/cvmx-helper-sgmii.c vendor-sys/octeon-sdk/dist/cvmx-helper-sgmii.h vendor-sys/octeon-sdk/dist/cvmx-helper-spi.c vendor-sys/octeon-sdk/dist/cvmx-helper-spi.h vendor-sys/octeon-sdk/dist/cvmx-helper-util.c vendor-sys/octeon-sdk/dist/cvmx-helper-util.h vendor-sys/octeon-sdk/dist/cvmx-helper-xaui.c vendor-sys/octeon-sdk/dist/cvmx-helper-xaui.h vendor-sys/octeon-sdk/dist/cvmx-helper.c vendor-sys/octeon-sdk/dist/cvmx-helper.h vendor-sys/octeon-sdk/dist/cvmx-higig.h vendor-sys/octeon-sdk/dist/cvmx-interrupt-decodes.c vendor-sys/octeon-sdk/dist/cvmx-interrupt-handler.S vendor-sys/octeon-sdk/dist/cvmx-interrupt-rsl.c vendor-sys/octeon-sdk/dist/cvmx-interrupt.c vendor-sys/octeon-sdk/dist/cvmx-interrupt.h vendor-sys/octeon-sdk/dist/cvmx-iob.h vendor-sys/octeon-sdk/dist/cvmx-ipd.h vendor-sys/octeon-sdk/dist/cvmx-key.h vendor-sys/octeon-sdk/dist/cvmx-l2c.c vendor-sys/octeon-sdk/dist/cvmx-l2c.h vendor-sys/octeon-sdk/dist/cvmx-llm.c vendor-sys/octeon-sdk/dist/cvmx-llm.h vendor-sys/octeon-sdk/dist/cvmx-lmc.h vendor-sys/octeon-sdk/dist/cvmx-log-arc.S vendor-sys/octeon-sdk/dist/cvmx-log.c vendor-sys/octeon-sdk/dist/cvmx-log.h vendor-sys/octeon-sdk/dist/cvmx-malloc/ vendor-sys/octeon-sdk/dist/cvmx-malloc.h vendor-sys/octeon-sdk/dist/cvmx-malloc/README-malloc vendor-sys/octeon-sdk/dist/cvmx-malloc/arena.c vendor-sys/octeon-sdk/dist/cvmx-malloc/malloc.c vendor-sys/octeon-sdk/dist/cvmx-malloc/malloc.h vendor-sys/octeon-sdk/dist/cvmx-malloc/thread-m.h vendor-sys/octeon-sdk/dist/cvmx-mdio.h vendor-sys/octeon-sdk/dist/cvmx-mgmt-port.c vendor-sys/octeon-sdk/dist/cvmx-mgmt-port.h vendor-sys/octeon-sdk/dist/cvmx-mio.h vendor-sys/octeon-sdk/dist/cvmx-nand.c vendor-sys/octeon-sdk/dist/cvmx-nand.h vendor-sys/octeon-sdk/dist/cvmx-npi.h vendor-sys/octeon-sdk/dist/cvmx-packet.h vendor-sys/octeon-sdk/dist/cvmx-pci.h vendor-sys/octeon-sdk/dist/cvmx-pcie.c vendor-sys/octeon-sdk/dist/cvmx-pcie.h vendor-sys/octeon-sdk/dist/cvmx-pip.h vendor-sys/octeon-sdk/dist/cvmx-pko.c vendor-sys/octeon-sdk/dist/cvmx-pko.h vendor-sys/octeon-sdk/dist/cvmx-platform.h vendor-sys/octeon-sdk/dist/cvmx-pow.c vendor-sys/octeon-sdk/dist/cvmx-pow.h vendor-sys/octeon-sdk/dist/cvmx-raid.c vendor-sys/octeon-sdk/dist/cvmx-raid.h vendor-sys/octeon-sdk/dist/cvmx-resources.config vendor-sys/octeon-sdk/dist/cvmx-rng.h vendor-sys/octeon-sdk/dist/cvmx-rtc.h vendor-sys/octeon-sdk/dist/cvmx-rwlock.h vendor-sys/octeon-sdk/dist/cvmx-scratch.h vendor-sys/octeon-sdk/dist/cvmx-shared-linux-n32.ld vendor-sys/octeon-sdk/dist/cvmx-shared-linux-o32.ld vendor-sys/octeon-sdk/dist/cvmx-shared-linux.ld vendor-sys/octeon-sdk/dist/cvmx-spi.c vendor-sys/octeon-sdk/dist/cvmx-spi.h vendor-sys/octeon-sdk/dist/cvmx-spi4000.c vendor-sys/octeon-sdk/dist/cvmx-spinlock.h vendor-sys/octeon-sdk/dist/cvmx-swap.h vendor-sys/octeon-sdk/dist/cvmx-sysinfo.c vendor-sys/octeon-sdk/dist/cvmx-sysinfo.h vendor-sys/octeon-sdk/dist/cvmx-thunder.c vendor-sys/octeon-sdk/dist/cvmx-thunder.h vendor-sys/octeon-sdk/dist/cvmx-tim.c vendor-sys/octeon-sdk/dist/cvmx-tim.h vendor-sys/octeon-sdk/dist/cvmx-tra.c vendor-sys/octeon-sdk/dist/cvmx-tra.h vendor-sys/octeon-sdk/dist/cvmx-twsi-raw.c vendor-sys/octeon-sdk/dist/cvmx-twsi-raw.h vendor-sys/octeon-sdk/dist/cvmx-twsi.c vendor-sys/octeon-sdk/dist/cvmx-twsi.h vendor-sys/octeon-sdk/dist/cvmx-uart.h vendor-sys/octeon-sdk/dist/cvmx-usb.c vendor-sys/octeon-sdk/dist/cvmx-usb.h vendor-sys/octeon-sdk/dist/cvmx-utils.h vendor-sys/octeon-sdk/dist/cvmx-version.h vendor-sys/octeon-sdk/dist/cvmx-warn.c vendor-sys/octeon-sdk/dist/cvmx-warn.h vendor-sys/octeon-sdk/dist/cvmx-wqe.h vendor-sys/octeon-sdk/dist/cvmx-zip.c vendor-sys/octeon-sdk/dist/cvmx-zip.h vendor-sys/octeon-sdk/dist/cvmx-zone.c vendor-sys/octeon-sdk/dist/cvmx.h vendor-sys/octeon-sdk/dist/cvmx.mk vendor-sys/octeon-sdk/dist/executive-config.h.template vendor-sys/octeon-sdk/dist/octeon-feature.h vendor-sys/octeon-sdk/dist/octeon-model.c vendor-sys/octeon-sdk/dist/octeon-model.h vendor-sys/octeon-sdk/dist/octeon-pci-console.c vendor-sys/octeon-sdk/dist/octeon-pci-console.h vendor-sys/octeon-sdk/dist/perfzilla_screen.png (contents, props changed) Added: vendor-sys/octeon-sdk/dist/README.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/octeon-sdk/dist/README.txt Tue Jul 20 07:11:19 2010 (r210284) @@ -0,0 +1,43 @@ +Readme for the Octeon Executive Library + + +The Octeon Executive Library provides runtime support and hardware +abstraction for the Octeon processor. The executive is composed of the +libcvmx.a library as well as header files that provide +functionality with inline functions. + + +Usage: + +The libcvmx.a library is built for every application as part of the +application build. (Please refer to the 'related pages' section of the +HTML documentation for more information on the build system.) +Applications using the executive should include the header files from +$OCTEON_ROOT/target/include and link against the library that is built in +the local obj directory. Each file using the executive +should include the following two header files in order: + +#include "cvmx-config.h" +#include "cvmx.h" + +The cvmx-config.h file contains configuration information for the +executive and is generated by the cvmx-config script from an +'executive-config.h' file. A sample version of this file is provided +in the executive directory as 'executive-config.h.template'. + +Copy this file to 'executive-config.h' into the 'config' subdirectory +of the application directory and customize as required by the application. +Applications that don't use any simple executive functionality can omit +the cvmx-config.h header file. Please refer to the examples for a +demonstration of where to put the executive-config.h file and for an +example of generated cvmx-config.h. + +For file specific information please see the documentation within the +source files or the HTML documentation provided in docs/html/index.html. +The HTML documentation is automatically generated by Doxygen from the +source files. + + + +========================================================================== +Please see the release notes for version specific information. Added: vendor-sys/octeon-sdk/dist/cvmip.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/octeon-sdk/dist/cvmip.h Tue Jul 20 07:11:19 2010 (r210284) @@ -0,0 +1,207 @@ +/***********************license start*************** + * Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights + * reserved. + * + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * 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. + * + * * Neither the name of Cavium Networks nor the names of + * its contributors may be used to endorse or promote products + * derived from this software without specific prior written + * permission. + * + * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" + * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS + * OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH + * RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY + * REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT + * DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES + * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR + * PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET + * POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT + * OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU. + * + * + * For any questions regarding licensing please contact marketing@caviumnetworks.com + * + ***********************license end**************************************/ + + + + + + +/** + * @file + * + * Cavium Networks Internet Protocol (IP) + * + * Definitions for the Internet Protocol (IP) support. + * + *
$Revision: 41586 $
+ * + */ + +#ifndef __CVMIP_H__ +#define __CVMIP_H__ + + +/* + * IP protocol values (1 byte) + * + */ +#define CVMIP_PROTO_ICMP 1 /* Internet Control Message Protocol */ +#define CVMIP_PROTO_TCP 6 /* Transmission Control Protocol */ +#define CVMIP_PROTO_UDP 17 /* User Datagram Protocol */ +#define CVMIP_PROTO_ESP 50 /* Encapsulated Security Payload */ +#define CVMIP_PROTO_AH 51 /* Authentication Header */ + + +/** + * network packet header definitions + * (originally from octane_hw.h) + * + */ + +/** + * UDP Packet header + */ +typedef struct { + union { + int32_t s32 ; + uint32_t u32 ; + struct { + uint16_t src_prt ; + uint16_t dst_prt ; + } s; + } prts; + uint16_t len ; + uint16_t chksum ; +} cvmip_udp_hdr_t; + +/** + * TCP Packet header + */ +typedef struct { + uint16_t src_prt ; + uint16_t dst_prt ; + uint32_t seq ; + uint32_t ack_seq ; + uint32_t hlen :4; + uint32_t rsvd :6; + uint32_t urg :1; + uint32_t ack :1; + uint32_t psh :1; + uint32_t rst :1; + uint32_t syn :1; + uint32_t fin :1; + uint16_t win_sz ; + uint16_t chksum ; + uint16_t urg_ptr ; + uint32_t junk ; +} cvmip_tcp_hdr_t; + +/** + * L4 Packet header + */ +typedef union { + cvmip_udp_hdr_t udphdr; + cvmip_tcp_hdr_t tcphdr; + struct { + union { + int32_t s32 ; + uint32_t u32 ; + struct { + uint16_t src_prt; + uint16_t dst_prt; + } s; + } prts; + uint16_t len ; + uint16_t chksum ; + char dat[48] ; // 48 for IPv6 with no extension hdrs, 64 for IPv4 without options + } udp; + struct { + uint16_t src_prt ; + uint16_t dst_prt ; + uint32_t seq ; + uint32_t ack_seq ; + uint32_t hlen :4; + uint32_t rsvd :6; + uint32_t urg :1; + uint32_t ack :1; + uint32_t psh :1; + uint32_t rst :1; + uint32_t syn :1; + uint32_t fin :1; + uint16_t win_sz ; + uint16_t chksum ; + uint16_t urg_ptr ; + char dat[36] ; // 36 for IPv6 with no extension hdrs, 52 for IPv6 without options + } tcp; +} cvmip_l4_info_t; + +/** + * Special struct to add a pad to IPv4 header + */ +typedef struct { + uint32_t pad; + + uint32_t version : 4; + uint32_t hl : 4; + uint8_t tos ; + uint16_t len ; + + uint16_t id ; + uint32_t mbz : 1; + uint32_t df : 1; + uint32_t mf : 1; + uint32_t off :13; + + uint8_t ttl ; + uint8_t protocol; + uint16_t chksum ; + + union { + uint64_t u64; + struct { + uint32_t src; + uint32_t dst; + } s; + } src_dst; +} cvmip_ipv4_hdr_t; + +/** + * IPv6 Packet header + */ +typedef struct { + + uint32_t version : 4; + uint32_t v6class : 8; + uint32_t flow :20; + + uint16_t len ; // includes extension headers plus payload (add 40 to be equiv to v4 len field) + uint8_t next_hdr; // equivalent to the v4 protocol field + uint8_t hop_lim ; // equivalent to the v4 TTL field + + union { + uint64_t u64[4]; + struct { + uint64_t src[2]; + uint64_t dst[2]; + } s; + } src_dst; + +} cvmip_ipv6_hdr_t; + + +#endif /* __CVMIP_H__ */ Added: vendor-sys/octeon-sdk/dist/cvmx-abi.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/octeon-sdk/dist/cvmx-abi.h Tue Jul 20 07:11:19 2010 (r210284) @@ -0,0 +1,92 @@ +/***********************license start*************** + * Copyright (c) 2003-2008 Cavium Networks (support@cavium.com). All rights + * reserved. + * + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * 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. + * + * * Neither the name of Cavium Networks nor the names of + * its contributors may be used to endorse or promote products + * derived from this software without specific prior written + * permission. + * + * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" + * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS + * OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH + * RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY + * REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT + * DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES + * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR + * PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET + * POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT + * OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU. + * + * + * For any questions regarding licensing please contact marketing@caviumnetworks.com + * + ***********************license end**************************************/ + + + + + + +/** + * @file + * + * This file defines macros for use in determining the current calling ABI. + * + *
$Revision: 41586 $
+*/ + +#ifndef __CVMX_ABI_H__ +#define __CVMX_ABI_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/* Check for N32 ABI, defined for 32-bit Simple Exec applications + and Linux N32 ABI.*/ +#if (defined _ABIN32 && _MIPS_SIM == _ABIN32) +#define CVMX_ABI_N32 +/* Check for N64 ABI, defined for 64-bit Linux toolchain. */ +#elif (defined _ABI64 && _MIPS_SIM == _ABI64) +#define CVMX_ABI_N64 +/* Check for O32 ABI, defined for Linux 032 ABI, not supported yet. */ +#elif (defined _ABIO32 && _MIPS_SIM == _ABIO32) +#define CVMX_ABI_O32 +/* Check for EABI ABI, defined for 64-bit Simple Exec applications. */ +#else +#define CVMX_ABI_EABI +#endif + +#ifndef __BYTE_ORDER + #if defined(__BIG_ENDIAN) && !defined(__LITTLE_ENDIAN) + #define __BYTE_ORDER __BIG_ENDIAN + #elif !defined(__BIG_ENDIAN) && defined(__LITTLE_ENDIAN) + #define __BYTE_ORDER __LITTLE_ENDIAN + #define __BIG_ENDIAN 4321 + #elif !defined(__BIG_ENDIAN) && !defined(__LITTLE_ENDIAN) + #define __BIG_ENDIAN 4321 + #define __BYTE_ORDER __BIG_ENDIAN + #else + #error Unable to determine Endian mode + #endif +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __CVMX_ABI_H__ */ Added: vendor-sys/octeon-sdk/dist/cvmx-access-native.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor-sys/octeon-sdk/dist/cvmx-access-native.h Tue Jul 20 07:11:19 2010 (r210284) @@ -0,0 +1,667 @@ +/***********************license start*************** + * Copyright (c) 2003-2009 Cavium Networks (support@cavium.com). All rights + * reserved. + * + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * * 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. + * + * * Neither the name of Cavium Networks nor the names of + * its contributors may be used to endorse or promote products + * derived from this software without specific prior written + * permission. + * + * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" + * AND WITH ALL FAULTS AND CAVIUM NETWORKS MAKES NO PROMISES, REPRESENTATIONS + * OR WARRANTIES, EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH + * RESPECT TO THE SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY + * REPRESENTATION OR DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT + * DEFECTS, AND CAVIUM SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES + * OF TITLE, MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR + * PURPOSE, LACK OF VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET + * POSSESSION OR CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT + * OF USE OR PERFORMANCE OF THE SOFTWARE LIES WITH YOU. + * + * + * For any questions regarding licensing please contact marketing@caviumnetworks.com + * + ***********************license end**************************************/ + +/** + * @file + * Functions for accessing memory and CSRs on Octeon when we are compiling + * natively. + * + *
$Revision: 38306 $
+*/ +#ifndef __CVMX_ACCESS_NATIVE_H__ +#define __CVMX_ACCESS_NATIVE_H__ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Returns the Octeon processor ID. + * + * @return Octeon processor ID from COP0 + */ +static inline uint32_t cvmx_get_proc_id(void) +{ +#ifdef CVMX_BUILD_FOR_LINUX_USER + extern uint32_t cvmx_app_init_processor_id; + return cvmx_app_init_processor_id; +#else + uint32_t id; + asm ("mfc0 %0, $15,0" : "=r" (id)); + return id; +#endif +} + +/** + * Convert a memory pointer (void*) into a hardware compatable + * memory address (uint64_t). Octeon hardware widgets don't + * understand logical addresses. + * + * @param ptr C style memory pointer + * @return Hardware physical address + */ +static inline uint64_t cvmx_ptr_to_phys(void *ptr) +{ + if (CVMX_ENABLE_PARAMETER_CHECKING) + cvmx_warn_if(ptr==NULL, "cvmx_ptr_to_phys() passed a NULL pointer\n"); + +#ifdef CVMX_BUILD_FOR_UBOOT + /* U-boot is a special case, as it is running in error level, which disables the TLB completely. + ** U-boot may use kseg0 addresses, or may directly use physical addresses already */ + return(CAST64(ptr) & 0x7FFFFFFF); +#endif + +#ifdef __linux__ + if (sizeof(void*) == 8) + { + /* We're running in 64 bit mode. Normally this means that we can use + 40 bits of address space (the hardware limit). Unfortunately there + is one case were we need to limit this to 30 bits, sign extended + 32 bit. Although these are 64 bits wide, only 30 bits can be used */ + if ((CAST64(ptr) >> 62) == 3) + return CAST64(ptr) & cvmx_build_mask(30); + else + return CAST64(ptr) & cvmx_build_mask(40); + } + else + { +#ifdef __KERNEL__ + return (long)(ptr) & 0x1fffffff; +#else + extern uint64_t linux_mem32_offset; + if (cvmx_likely(ptr)) + return CAST64(ptr) - linux_mem32_offset; + else + return 0; +#endif + } +#elif defined(_WRS_KERNEL) + return (long)(ptr) & 0x7fffffff; +#elif defined(VXWORKS_USER_MAPPINGS) + /* This mapping mode is used in vxWorks 5.5 to support 2GB of ram. The + 2nd 256MB is mapped at 0x10000000 and the rest of memory is 1:1 */ + uint64_t address = (long)ptr; + if (address & 0x80000000) + return address & 0x1fffffff; /* KSEG pointers directly map the lower 256MB and bootbus */ + else if ((address >= 0x10000000) && (address < 0x20000000)) + return address + 0x400000000ull; /* 256MB-512MB is a virtual mapping for the 2nd 256MB */ + else + return address; /* Looks to be a 1:1 mapped userspace pointer */ +#else +#if CVMX_USE_1_TO_1_TLB_MAPPINGS + /* We are assumung we're running the Simple Executive standalone. In this + mode the TLB is setup to perform 1:1 mapping and 32 bit sign extended + addresses are never used. Since we know all this, save the masking + cycles and do nothing */ + return CAST64(ptr); +#else + + if (sizeof(void*) == 8) + { + /* We're running in 64 bit mode. Normally this means that we can use + 40 bits of address space (the hardware limit). Unfortunately there + is one case were we need to limit this to 30 bits, sign extended + 32 bit. Although these are 64 bits wide, only 30 bits can be used */ + if ((CAST64(ptr) >> 62) == 3) + return CAST64(ptr) & cvmx_build_mask(30); + else + return CAST64(ptr) & cvmx_build_mask(40); + } + else + return (long)(ptr) & 0x7fffffff; + +#endif +#endif +} + + +/** + * Convert a hardware physical address (uint64_t) into a + * memory pointer (void *). + * + * @param physical_address + * Hardware physical address to memory + * @return Pointer to memory + */ +static inline void *cvmx_phys_to_ptr(uint64_t physical_address) +{ + if (CVMX_ENABLE_PARAMETER_CHECKING) + cvmx_warn_if(physical_address==0, "cvmx_phys_to_ptr() passed a zero address\n"); + +#ifdef CVMX_BUILD_FOR_UBOOT + /* U-boot is a special case, as it is running in error level, which disables the TLB completely. + ** U-boot may use kseg0 addresses, or may directly use physical addresses already */ + if (physical_address >= 0x80000000) + return NULL; + else + return CASTPTR(void, (physical_address & 0x7FFFFFFF)); +#endif + +#ifdef __linux__ + if (sizeof(void*) == 8) + { + /* Just set the top bit, avoiding any TLB uglyness */ + return CASTPTR(void, CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS, physical_address)); + } + else + { +#ifdef __KERNEL__ + return CASTPTR(void, CVMX_ADD_SEG32(CVMX_MIPS32_SPACE_KSEG0, physical_address)); +#else + extern uint64_t linux_mem32_offset; + if (cvmx_likely(physical_address)) + return CASTPTR(void, physical_address + linux_mem32_offset); + else + return NULL; +#endif + } +#elif defined(_WRS_KERNEL) + return CASTPTR(void, CVMX_ADD_SEG32(CVMX_MIPS32_SPACE_KSEG0, physical_address)); +#elif defined(VXWORKS_USER_MAPPINGS) + /* This mapping mode is used in vxWorks 5.5 to support 2GB of ram. The + 2nd 256MB is mapped at 0x10000000 and the rest of memory is 1:1 */ + if ((physical_address >= 0x10000000) && (physical_address < 0x20000000)) + return CASTPTR(void, CVMX_ADD_SEG32(CVMX_MIPS32_SPACE_KSEG0, physical_address)); + else if ((physical_address >= 0x410000000ull) && (physical_address < 0x420000000ull)) + return CASTPTR(void, physical_address - 0x400000000ull); + else + return CASTPTR(void, physical_address); +#else + +#if CVMX_USE_1_TO_1_TLB_MAPPINGS + /* We are assumung we're running the Simple Executive standalone. In this + mode the TLB is setup to perform 1:1 mapping and 32 bit sign extended + addresses are never used. Since we know all this, save bit insert + cycles and do nothing */ + return CASTPTR(void, physical_address); +#else + /* Set the XKPHYS/KSEG0 bit as appropriate based on ABI */ + if (sizeof(void*) == 8) + return CASTPTR(void, CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS, physical_address)); + else + return CASTPTR(void, CVMX_ADD_SEG32(CVMX_MIPS32_SPACE_KSEG0, physical_address)); + +#endif + +#endif +} + + +/* The following #if controls the definition of the macro + CVMX_BUILD_WRITE64. This macro is used to build a store operation to + a full 64bit address. With a 64bit ABI, this can be done with a simple + pointer access. 32bit ABIs require more complicated assembly */ +#if defined(CVMX_ABI_N64) || defined(CVMX_ABI_EABI) + +/* We have a full 64bit ABI. Writing to a 64bit address can be done with + a simple volatile pointer */ +#define CVMX_BUILD_WRITE64(TYPE, ST) \ +static inline void cvmx_write64_##TYPE(uint64_t addr, TYPE##_t val) \ +{ \ + *CASTPTR(volatile TYPE##_t, addr) = val; \ +} + +#elif defined(CVMX_ABI_N32) + +/* The N32 ABI passes all 64bit quantities in a single register, so it is + possible to use the arguments directly. We have to use inline assembly + for the actual store since a pointer would truncate the address */ +#define CVMX_BUILD_WRITE64(TYPE, ST) \ +static inline void cvmx_write64_##TYPE(uint64_t addr, TYPE##_t val) \ +{ \ + asm volatile (ST " %[v], 0(%[c])" ::[v] "r" (val), [c] "r" (addr)); \ +} + +#elif defined(CVMX_ABI_O32) + +#ifdef __KERNEL__ +#define CVMX_BUILD_WRITE64(TYPE, LT) extern void cvmx_write64_##TYPE(uint64_t csr_addr, TYPE##_t val); +#else + +/* Ok, now the ugly stuff starts. O32 splits 64bit quantities into two + separate registers. Assembly must be used to put them back together + before they're used. What should be a simple store becomes a + convoluted mess of shifts and ors */ +#define CVMX_BUILD_WRITE64(TYPE, ST) \ +static inline void cvmx_write64_##TYPE(uint64_t csr_addr, TYPE##_t val) \ +{ \ + if (sizeof(TYPE##_t) == 8) \ + { \ + uint32_t csr_addrh = csr_addr>>32; \ + uint32_t csr_addrl = csr_addr; \ + uint32_t valh = (uint64_t)val>>32; \ + uint32_t vall = val; \ + uint32_t tmp1; \ + uint32_t tmp2; \ + uint32_t tmp3; \ + \ + asm volatile ( \ + ".set push\n" \ + ".set mips64\n" \ + "dsll %[tmp1], %[valh], 32\n" \ + "dsll %[tmp2], %[csrh], 32\n" \ + "dsll %[tmp3], %[vall], 32\n" \ + "dsrl %[tmp3], %[tmp3], 32\n" \ + "or %[tmp1], %[tmp1], %[tmp3]\n" \ + "dsll %[tmp3], %[csrl], 32\n" \ + "dsrl %[tmp3], %[tmp3], 32\n" \ + "or %[tmp2], %[tmp2], %[tmp3]\n" \ + ST " %[tmp1], 0(%[tmp2])\n" \ + ".set pop\n" \ + : [tmp1] "=&r" (tmp1), [tmp2] "=&r" (tmp2), [tmp3] "=&r" (tmp3)\ + : [valh] "r" (valh), [vall] "r" (vall), \ + [csrh] "r" (csr_addrh), [csrl] "r" (csr_addrl) \ + ); \ + } \ + else \ + { \ + uint32_t csr_addrh = csr_addr>>32; \ + uint32_t csr_addrl = csr_addr; \ + uint32_t tmp1; \ + uint32_t tmp2; \ + \ + asm volatile ( \ + ".set push\n" \ + ".set mips64\n" \ + "dsll %[tmp1], %[csrh], 32\n" \ + "dsll %[tmp2], %[csrl], 32\n" \ + "dsrl %[tmp2], %[tmp2], 32\n" \ + "or %[tmp1], %[tmp1], %[tmp2]\n" \ + ST " %[val], 0(%[tmp1])\n" \ + ".set pop\n" \ + : [tmp1] "=&r" (tmp1), [tmp2] "=&r" (tmp2) \ + : [val] "r" (val), [csrh] "r" (csr_addrh), \ + [csrl] "r" (csr_addrl) \ + ); \ + } \ +} + +#endif + +#else + +/* cvmx-abi.h didn't recognize the ABI. Force the compile to fail. */ +#error: Unsupported ABI + +#endif + +/* The following #if controls the definition of the macro + CVMX_BUILD_READ64. This macro is used to build a load operation from + a full 64bit address. With a 64bit ABI, this can be done with a simple + pointer access. 32bit ABIs require more complicated assembly */ +#if defined(CVMX_ABI_N64) || defined(CVMX_ABI_EABI) + +/* We have a full 64bit ABI. Writing to a 64bit address can be done with + a simple volatile pointer */ +#define CVMX_BUILD_READ64(TYPE, LT) \ +static inline TYPE##_t cvmx_read64_##TYPE(uint64_t addr) \ +{ \ + return *CASTPTR(volatile TYPE##_t, addr); \ +} + +#elif defined(CVMX_ABI_N32) + +/* The N32 ABI passes all 64bit quantities in a single register, so it is + possible to use the arguments directly. We have to use inline assembly + for the actual store since a pointer would truncate the address */ +#define CVMX_BUILD_READ64(TYPE, LT) \ +static inline TYPE##_t cvmx_read64_##TYPE(uint64_t addr) \ +{ \ + TYPE##_t val; \ + asm volatile (LT " %[v], 0(%[c])": [v] "=r" (val) : [c] "r" (addr));\ + return val; \ +} + +#elif defined(CVMX_ABI_O32) + +#ifdef __KERNEL__ +#define CVMX_BUILD_READ64(TYPE, LT) extern TYPE##_t cvmx_read64_##TYPE(uint64_t csr_addr); +#else + +/* Ok, now the ugly stuff starts. O32 splits 64bit quantities into two + separate registers. Assembly must be used to put them back together + before they're used. What should be a simple load becomes a + convoluted mess of shifts and ors */ +#define CVMX_BUILD_READ64(TYPE, LT) \ +static inline TYPE##_t cvmx_read64_##TYPE(uint64_t csr_addr) \ +{ \ + if (sizeof(TYPE##_t) == 8) \ + { \ + uint32_t csr_addrh = csr_addr>>32; \ + uint32_t csr_addrl = csr_addr; \ + uint32_t valh; \ + uint32_t vall; \ + \ + asm volatile ( \ + ".set push\n" \ + ".set mips64\n" \ + "dsll %[valh], %[csrh], 32\n" \ + "dsll %[vall], %[csrl], 32\n" \ + "dsrl %[vall], %[vall], 32\n" \ + "or %[valh], %[valh], %[vall]\n" \ + LT " %[vall], 0(%[valh])\n" \ + "dsrl %[valh], %[vall], 32\n" \ + "sll %[vall], 0\n" \ + "sll %[valh], 0\n" \ + ".set pop\n" \ + : [valh] "=&r" (valh), [vall] "=&r" (vall) \ + : [csrh] "r" (csr_addrh), [csrl] "r" (csr_addrl) \ + ); \ + return ((uint64_t)valh<<32) | vall; \ + } \ + else \ + { \ + uint32_t csr_addrh = csr_addr>>32; \ + uint32_t csr_addrl = csr_addr; \ + TYPE##_t val; \ + uint32_t tmp; \ + \ + asm volatile ( \ + ".set push\n" \ + ".set mips64\n" \ + "dsll %[val], %[csrh], 32\n" \ + "dsll %[tmp], %[csrl], 32\n" \ + "dsrl %[tmp], %[tmp], 32\n" \ + "or %[val], %[val], %[tmp]\n" \ + LT " %[val], 0(%[val])\n" \ + ".set pop\n" \ + : [val] "=&r" (val), [tmp] "=&r" (tmp) \ + : [csrh] "r" (csr_addrh), [csrl] "r" (csr_addrl) \ + ); \ + return val; \ + } \ +} + +#endif /* __KERNEL__ */ + +#else + +/* cvmx-abi.h didn't recognize the ABI. Force the compile to fail. */ +#error: Unsupported ABI + +#endif + +/* The following defines 8 functions for writing to a 64bit address. Each + takes two arguments, the address and the value to write. + cvmx_write64_int64 cvmx_write64_uint64 + cvmx_write64_int32 cvmx_write64_uint32 + cvmx_write64_int16 cvmx_write64_uint16 + cvmx_write64_int8 cvmx_write64_uint8 */ +CVMX_BUILD_WRITE64(int64, "sd"); +CVMX_BUILD_WRITE64(int32, "sw"); +CVMX_BUILD_WRITE64(int16, "sh"); +CVMX_BUILD_WRITE64(int8, "sb"); +CVMX_BUILD_WRITE64(uint64, "sd"); +CVMX_BUILD_WRITE64(uint32, "sw"); +CVMX_BUILD_WRITE64(uint16, "sh"); +CVMX_BUILD_WRITE64(uint8, "sb"); + +/* The following defines 8 functions for reading from a 64bit address. Each + takes the address as the only argument + cvmx_read64_int64 cvmx_read64_uint64 + cvmx_read64_int32 cvmx_read64_uint32 + cvmx_read64_int16 cvmx_read64_uint16 + cvmx_read64_int8 cvmx_read64_uint8 */ +CVMX_BUILD_READ64(int64, "ld"); +CVMX_BUILD_READ64(int32, "lw"); +CVMX_BUILD_READ64(int16, "lh"); +CVMX_BUILD_READ64(int8, "lb"); +CVMX_BUILD_READ64(uint64, "ld"); +CVMX_BUILD_READ64(uint32, "lw"); +CVMX_BUILD_READ64(uint16, "lhu"); +CVMX_BUILD_READ64(uint8, "lbu"); + +static inline void cvmx_write_csr(uint64_t csr_addr, uint64_t val) +{ + cvmx_write64_uint64(csr_addr, val); + + /* Perform an immediate read after every write to an RSL register to force + the write to complete. It doesn't matter what RSL read we do, so we + choose CVMX_MIO_BOOT_BIST_STAT because it is fast and harmless */ + if ((csr_addr >> 40) == (0x800118)) + cvmx_read64_uint64(CVMX_MIO_BOOT_BIST_STAT); +} + +static inline void cvmx_write_io(uint64_t io_addr, uint64_t val) +{ + cvmx_write64_uint64(io_addr, val); +} + +static inline uint64_t cvmx_read_csr(uint64_t csr_addr) +{ + return cvmx_read64_uint64(csr_addr); +} + +static inline void cvmx_send_single(uint64_t data) +{ + const uint64_t CVMX_IOBDMA_SENDSINGLE = 0xffffffffffffa200ull; + cvmx_write64_uint64(CVMX_IOBDMA_SENDSINGLE, data); +} + +static inline void cvmx_read_csr_async(uint64_t scraddr, uint64_t csr_addr) +{ + union + { + uint64_t u64; + struct { + uint64_t scraddr : 8; + uint64_t len : 8; + uint64_t addr :48; + } s; + } addr; + addr.u64 = csr_addr; + addr.s.scraddr = scraddr >> 3; + addr.s.len = 1; + cvmx_send_single(addr.u64); +} + + +/** + * Number of the Core on which the program is currently running. + * + * @return Number of cores + */ +static inline unsigned int cvmx_get_core_num(void) +{ + unsigned int core_num; + CVMX_RDHWRNV(core_num, 0); + return core_num; +} + + +/** + * Returns the number of bits set in the provided value. + * Simple wrapper for POP instruction. + * + * @param val 32 bit value to count set bits in + * + * @return Number of bits set + */ +static inline uint32_t cvmx_pop(uint32_t val) +{ + uint32_t pop; + CVMX_POP(pop, val); + return pop; +} + + +/** + * Returns the number of bits set in the provided value. + * Simple wrapper for DPOP instruction. + * + * @param val 64 bit value to count set bits in + * + * @return Number of bits set + */ +static inline int cvmx_dpop(uint64_t val) +{ + int pop; + CVMX_DPOP(pop, val); + return pop; +} + + +/** + * Provide current cycle counter as a return value + * + * @return current cycle counter + */ +static inline uint64_t cvmx_get_cycle(void) +{ +#if defined(CVMX_ABI_O32) + uint32_t tmp_low, tmp_hi; + + asm volatile ( + " .set push \n" + " .set mips64r2 \n" + " .set noreorder \n" + " rdhwr %[tmpl], $31 \n" + " dsrl %[tmph], %[tmpl], 32 \n" + " sll %[tmpl], 0 \n" + " sll %[tmph], 0 \n" + " .set pop \n" + : [tmpl] "=&r" (tmp_low), [tmph] "=&r" (tmp_hi) : ); + + return(((uint64_t)tmp_hi << 32) + tmp_low); +#else + uint64_t cycle; + CVMX_RDHWR(cycle, 31); + return(cycle); +#endif +} + + +/** + * Reads a chip global cycle counter. This counts CPU cycles since + * chip reset. The counter is 64 bit. + * This register does not exist on CN38XX pass 1 silicion + * + * @return Global chip cycle count since chip reset. + */ +static inline uint64_t cvmx_get_cycle_global(void) +{ + if (OCTEON_IS_MODEL(OCTEON_CN38XX_PASS1)) + return 0; + else + return cvmx_read64_uint64(CVMX_IPD_CLK_COUNT); +} + + +/** + * Wait for the specified number of cycle + * + * @param cycles + */ +static inline void cvmx_wait(uint64_t cycles) +{ + uint64_t done = cvmx_get_cycle() + cycles; + + while (cvmx_get_cycle() < done) + { + /* Spin */ + } +} + + +/** + * Wait for the specified number of micro seconds + * + * @param usec micro seconds to wait + */ +static inline void cvmx_wait_usec(uint64_t usec) +{ + uint64_t done = cvmx_get_cycle() + usec * cvmx_sysinfo_get()->cpu_clock_hz / 1000000; + while (cvmx_get_cycle() < done) + { + /* Spin */ + } +} + + +/** + * Perform a soft reset of Octeon + * + * @return + */ +static inline void cvmx_reset_octeon(void) +{ + cvmx_ciu_soft_rst_t ciu_soft_rst; + ciu_soft_rst.u64 = 0; + ciu_soft_rst.s.soft_rst = 1; + cvmx_write_csr(CVMX_CIU_SOFT_RST, ciu_soft_rst.u64); +} + + +/** + * Read a byte of fuse data + * @param byte_addr address to read + * + * @return fuse value: 0 or 1 + */ +static inline uint8_t cvmx_fuse_read_byte(int byte_addr) +{ + cvmx_mio_fus_rcmd_t read_cmd; + + read_cmd.u64 = 0; + read_cmd.s.addr = byte_addr; + read_cmd.s.pend = 1; + cvmx_write_csr(CVMX_MIO_FUS_RCMD, read_cmd.u64); + while ((read_cmd.u64 = cvmx_read_csr(CVMX_MIO_FUS_RCMD)) && read_cmd.s.pend) + ; + return(read_cmd.s.dat); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 07:12:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6885F1065676; Tue, 20 Jul 2010 07:12:44 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3E4F88FC12; Tue, 20 Jul 2010 07:12:44 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K7Cibr021254; Tue, 20 Jul 2010 07:12:44 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K7CipP021253; Tue, 20 Jul 2010 07:12:44 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201007200712.o6K7CipP021253@svn.freebsd.org> From: Juli Mallett Date: Tue, 20 Jul 2010 07:12:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210285 - vendor-sys/octeon-sdk/1.9.0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 07:12:44 -0000 Author: jmallett Date: Tue Jul 20 07:12:43 2010 New Revision: 210285 URL: http://svn.freebsd.org/changeset/base/210285 Log: Tag version 1.9.0 of Octeon SDK files. Added: vendor-sys/octeon-sdk/1.9.0/ - copied from r210284, vendor-sys/octeon-sdk/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 07:19:44 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10E75106564A; Tue, 20 Jul 2010 07:19:44 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DB3088FC2A; Tue, 20 Jul 2010 07:19:43 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K7Jhtf022825; Tue, 20 Jul 2010 07:19:43 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K7Jhfj022824; Tue, 20 Jul 2010 07:19:43 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201007200719.o6K7Jhfj022824@svn.freebsd.org> From: Juli Mallett Date: Tue, 20 Jul 2010 07:19:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210286 - head/sys/contrib/octeon-sdk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 07:19:44 -0000 Author: jmallett Date: Tue Jul 20 07:19:43 2010 New Revision: 210286 URL: http://svn.freebsd.org/changeset/base/210286 Log: Import the Cavium Simple Executive from the Cavium Octeon SDK. The Simple Executive is a library that can be used by standalone applications and kernels to abstract access to Octeon SoC and board-specific hardware and facilities. The FreeBSD port to Octeon will be updated to use this where possible. Added: head/sys/contrib/octeon-sdk/ - copied from r210285, vendor-sys/octeon-sdk/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 07:27:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E1FA106564A; Tue, 20 Jul 2010 07:27:36 +0000 (UTC) (envelope-from nwhitehorn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7DA248FC1B; Tue, 20 Jul 2010 07:27:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6K7RaWj024632; Tue, 20 Jul 2010 07:27:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6K7Ra6f024630; Tue, 20 Jul 2010 07:27:36 GMT (envelope-from nwhitehorn@svn.freebsd.org) Message-Id: <201007200727.o6K7Ra6f024630@svn.freebsd.org> From: Nathan Whitehorn Date: Tue, 20 Jul 2010 07:27:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210287 - head/usr.sbin X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 07:27:36 -0000 Author: nwhitehorn Date: Tue Jul 20 07:27:36 2010 New Revision: 210287 URL: http://svn.freebsd.org/changeset/base/210287 Log: Build some powerpc-specific utilities on powerpc64 as well. Submitted by: Andreas Tobler Modified: head/usr.sbin/Makefile Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Tue Jul 20 07:19:43 2010 (r210286) +++ head/usr.sbin/Makefile Tue Jul 20 07:27:36 2010 (r210287) @@ -512,7 +512,7 @@ _mount_smbfs= mount_smbfs _zzz= zzz .endif -.if ${MACHINE_ARCH} == "powerpc" +.if ${MACHINE_CPUARCH} == "powerpc" _mount_smbfs= mount_smbfs _nvram= nvram _ofwdump= ofwdump From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 10:15:07 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55EEA1065672; Tue, 20 Jul 2010 10:15:07 +0000 (UTC) (envelope-from bzeeb-lists@lists.zabbadoz.net) Received: from mail.cksoft.de (mail.cksoft.de [IPv6:2001:4068:10::3]) by mx1.freebsd.org (Postfix) with ESMTP id DB7D58FC1E; Tue, 20 Jul 2010 10:15:06 +0000 (UTC) Received: from localhost (amavis.fra.cksoft.de [192.168.74.71]) by mail.cksoft.de (Postfix) with ESMTP id E270141C759; Tue, 20 Jul 2010 12:15:05 +0200 (CEST) X-Virus-Scanned: amavisd-new at cksoft.de Received: from mail.cksoft.de ([192.168.74.103]) by localhost (amavis.fra.cksoft.de [192.168.74.71]) (amavisd-new, port 10024) with ESMTP id BiMAl1xa7rq9; Tue, 20 Jul 2010 12:15:05 +0200 (CEST) Received: by mail.cksoft.de (Postfix, from userid 66) id 5C2AF41C752; Tue, 20 Jul 2010 12:15:05 +0200 (CEST) Received: from maildrop.int.zabbadoz.net (maildrop.int.zabbadoz.net [10.111.66.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.int.zabbadoz.net (Postfix) with ESMTP id 728A44448F3; Tue, 20 Jul 2010 10:13:03 +0000 (UTC) Date: Tue, 20 Jul 2010 10:13:03 +0000 (UTC) From: "Bjoern A. Zeeb" X-X-Sender: bz@maildrop.int.zabbadoz.net To: Pyun YongHyeon In-Reply-To: <201007192141.o6JLfsr3090971@svn.freebsd.org> Message-ID: <20100720101118.H57851@maildrop.int.zabbadoz.net> References: <201007192141.o6JLfsr3090971@svn.freebsd.org> X-OpenPGP-Key: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210263 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 10:15:07 -0000 On Mon, 19 Jul 2010, Pyun YongHyeon wrote: > Author: yongari > Date: Mon Jul 19 21:41:54 2010 > New Revision: 210263 > URL: http://svn.freebsd.org/changeset/base/210263 > > Log: > Do not report current link state if interface is not UP. Hmm, not sure what exactly the code change does but by your description I think I would like to be able to see a porper (updated) result in the media: line of ifconfig no matter if it's UP or not. If this doesn't change that behaviour, just ignore me;) > Reviewed by: davidch > > Modified: > head/sys/dev/bce/if_bce.c > > Modified: head/sys/dev/bce/if_bce.c > ============================================================================== > --- head/sys/dev/bce/if_bce.c Mon Jul 19 21:38:15 2010 (r210262) > +++ head/sys/dev/bce/if_bce.c Mon Jul 19 21:41:54 2010 (r210263) > @@ -5855,6 +5855,10 @@ bce_ifmedia_sts(struct ifnet *ifp, struc > > BCE_LOCK(sc); > > + if ((ifp->if_flags & IFF_UP) == 0) { > + BCE_UNLOCK(sc); > + return; > + } > mii = device_get_softc(sc->bce_miibus); > > mii_pollstat(mii); > -- Bjoern A. Zeeb From August on I will have a life. It's now up to you to do the maths and count to 64. -- Bondorf, Germany, 14th June 2010 From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 10:45:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18356106567A; Tue, 20 Jul 2010 10:45:06 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 083978FC1B; Tue, 20 Jul 2010 10:45:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KAj59D068684; Tue, 20 Jul 2010 10:45:05 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KAj5hn068681; Tue, 20 Jul 2010 10:45:05 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007201045.o6KAj5hn068681@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 20 Jul 2010 10:45:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210289 - head/share/man/man4 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 10:45:06 -0000 Author: bschmidt Date: Tue Jul 20 10:45:05 2010 New Revision: 210289 URL: http://svn.freebsd.org/changeset/base/210289 Log: Update manpage to reflect changes regarding the 6050's firmware. MFC after: 3 days Modified: head/share/man/man4/iwn.4 head/share/man/man4/iwnfw.4 Modified: head/share/man/man4/iwn.4 ============================================================================== --- head/share/man/man4/iwn.4 Tue Jul 20 10:00:35 2010 (r210288) +++ head/share/man/man4/iwn.4 Tue Jul 20 10:45:05 2010 (r210289) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2010 +.Dd July 20, 2010 .Dt IWN 4 .Os .Sh NAME @@ -51,6 +51,7 @@ Choose one from: .Cd "device iwn5000fw" .Cd "device iwn5150fw" .Cd "device iwn6000fw" +.Cd "device iwn6050fw" .Ed .Pp Or you can use @@ -70,6 +71,7 @@ iwn1000fw_load="YES" iwn5000fw_load="YES" iwn5150fw_load="YES" iwn6000fw_load="YES" +iwn6050fw_load="YES" .Ed .Sh DESCRIPTION The Modified: head/share/man/man4/iwnfw.4 ============================================================================== --- head/share/man/man4/iwnfw.4 Tue Jul 20 10:00:35 2010 (r210288) +++ head/share/man/man4/iwnfw.4 Tue Jul 20 10:45:05 2010 (r210289) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 7, 2010 +.Dd July 20, 2010 .Dt IWNFW 4 .Os .Sh NAME @@ -45,6 +45,7 @@ of the following: .Cd "device iwn5000fw" .Cd "device iwn5150fw" .Cd "device iwn6000fw" +.Cd "device iwn6050fw" .Ed .Pp Alternatively, to load the driver as a @@ -56,6 +57,7 @@ iwn1000fw_load="YES" iwn5000fw_load="YES" iwn5150fw_load="YES" iwn6000fw_load="YES" +iwn6050fw_load="YES" .Ed .Sh DESCRIPTION This module provides access to firmware sets for the From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 10:58:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C12181065672; Tue, 20 Jul 2010 10:58:56 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AFB478FC13; Tue, 20 Jul 2010 10:58:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KAwuTW073278; Tue, 20 Jul 2010 10:58:56 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KAwuUE073270; Tue, 20 Jul 2010 10:58:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007201058.o6KAwuUE073270@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Jul 2010 10:58:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210290 - in head/sys: dev/acpica kern sys x86/isa x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 10:58:56 -0000 Author: mav Date: Tue Jul 20 10:58:56 2010 New Revision: 210290 URL: http://svn.freebsd.org/changeset/base/210290 Log: Extend timer driver API to report also minimal and maximal supported period lengths. Make MI wrapper code to validate periods in request. Make kernel clock management code to honor these hardware limitations while choosing hz, stathz and profhz values. Modified: head/sys/dev/acpica/acpi_hpet.c head/sys/kern/kern_clocksource.c head/sys/kern/kern_et.c head/sys/sys/timeet.h head/sys/x86/isa/atrtc.c head/sys/x86/isa/clock.c head/sys/x86/x86/local_apic.c Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Tue Jul 20 10:45:05 2010 (r210289) +++ head/sys/dev/acpica/acpi_hpet.c Tue Jul 20 10:58:56 2010 (r210290) @@ -154,15 +154,16 @@ hpet_start(struct eventtimer *et, t->div = (sc->freq * (period->frac >> 32)) >> 32; if (period->sec != 0) t->div += sc->freq * period->sec; - if (first == NULL) - first = period; } else { t->mode = 2; t->div = 0; } - fdiv = (sc->freq * (first->frac >> 32)) >> 32; - if (first->sec != 0) - fdiv += sc->freq * first->sec; + if (first != NULL) { + fdiv = (sc->freq * (first->frac >> 32)) >> 32; + if (first->sec != 0) + fdiv += sc->freq * first->sec; + } else + fdiv = t->div; t->last = bus_read_4(sc->mem_res, HPET_MAIN_COUNTER); if (t->mode == 1 && (t->caps & HPET_TCAP_PER_INT)) { t->caps |= HPET_TCNF_TYPE; @@ -583,6 +584,11 @@ hpet_attach(device_t dev) if ((t->caps & HPET_TCAP_PER_INT) == 0) t->et.et_quality -= 10; t->et.et_frequency = sc->freq; + t->et.et_min_period.sec = 0; + t->et.et_min_period.frac = 0x00004000LL << 32; + t->et.et_max_period.sec = 0xffffffff / sc->freq; + t->et.et_max_period.frac = + ((0xffffffffLL << 32) / sc->freq) << 32; t->et.et_start = hpet_start; t->et.et_stop = hpet_stop; t->et.et_priv = &sc->t[i]; Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Tue Jul 20 10:45:05 2010 (r210289) +++ head/sys/kern/kern_clocksource.c Tue Jul 20 10:58:56 2010 (r210290) @@ -87,11 +87,9 @@ static DPCPU_DEFINE(tc, configtimer); (bt)->sec = 0; \ (bt)->frac = ((uint64_t)0x8000000000000000 / (freq)) << 1; \ } -#define BT2FREQ(bt, freq) \ -{ \ - *(freq) = ((uint64_t)0x8000000000000000 + ((bt)->frac >> 2)) / \ - ((bt)->frac >> 1); \ -} +#define BT2FREQ(bt) \ + (((uint64_t)0x8000000000000000 + ((bt)->frac >> 2)) / \ + ((bt)->frac >> 1)) /* Per-CPU timer1 handler. */ static int @@ -295,6 +293,26 @@ restart: #endif } +static int +round_freq(struct eventtimer *et, int freq) +{ + uint64_t div; + + if (et->et_frequency != 0) { + div = (et->et_frequency + freq / 2) / freq; + if (et->et_flags & ET_FLAGS_POW2DIV) + div = 1 << (flsl(div + div / 2) - 1); + freq = (et->et_frequency + div / 2) / div; + } + if (et->et_min_period.sec > 0) + freq = 0; + else if (et->et_max_period.frac != 0) + freq = min(freq, BT2FREQ(&et->et_min_period)); + if (et->et_max_period.sec == 0 && et->et_max_period.frac != 0) + freq = max(freq, BT2FREQ(&et->et_max_period)); + return (freq); +} + /* * Configure and start event timers. */ @@ -327,21 +345,25 @@ cpu_initclocks_bsp(void) singlemul = 4; } if (timer[1] == NULL) { - base = hz * singlemul; - if (base < 128) + base = round_freq(timer[0], hz * singlemul); + singlemul = max((base + hz / 2) / hz, 1); + hz = (base + singlemul / 2) / singlemul; + if (base <= 128) stathz = base; else { div = base / 128; - if (div % 2 == 0) + if (div >= singlemul && (div % singlemul) == 0) div++; stathz = base / div; } profhz = stathz; - while ((profhz + stathz) <= 8192) + while ((profhz + stathz) <= 128 * 64) profhz += stathz; + profhz = round_freq(timer[0], profhz); } else { - stathz = 128; - profhz = stathz * 64; + hz = round_freq(timer[0], hz); + stathz = round_freq(timer[1], 127); + profhz = round_freq(timer[1], stathz * 64); } ET_LOCK(); cpu_restartclocks(); @@ -385,7 +407,9 @@ cpu_restartclocks(void) } else { timer1hz = hz; timer2hz = profiling_on ? profhz : stathz; + timer2hz = round_freq(timer[1], timer2hz); } + timer1hz = round_freq(timer[0], timer1hz); printf("Starting kernel event timers: %s @ %dHz, %s @ %dHz\n", timer[0]->et_name, timer1hz, timer[1] ? timer[1]->et_name : "NONE", timer2hz); Modified: head/sys/kern/kern_et.c ============================================================================== --- head/sys/kern/kern_et.c Tue Jul 20 10:45:05 2010 (r210289) +++ head/sys/kern/kern_et.c Tue Jul 20 10:58:56 2010 (r210290) @@ -167,6 +167,26 @@ et_start(struct eventtimer *et, if ((et->et_flags & ET_FLAGS_ONESHOT) == 0 && period == NULL) return (ENODEV); + if (first != NULL) { + if (first->sec < et->et_min_period.sec || + (first->sec == et->et_min_period.sec && + first->frac < et->et_min_period.frac)) + first = &et->et_min_period; + if (first->sec > et->et_max_period.sec || + (first->sec == et->et_max_period.sec && + first->frac > et->et_max_period.frac)) + first = &et->et_max_period; + } + if (period != NULL) { + if (period->sec < et->et_min_period.sec || + (period->sec == et->et_min_period.sec && + period->frac < et->et_min_period.frac)) + period = &et->et_min_period; + if (period->sec > et->et_max_period.sec || + (period->sec == et->et_max_period.sec && + period->frac > et->et_max_period.frac)) + period = &et->et_max_period; + } if (et->et_start) return (et->et_start(et, first, period)); return (0); Modified: head/sys/sys/timeet.h ============================================================================== --- head/sys/sys/timeet.h Tue Jul 20 10:45:05 2010 (r210289) +++ head/sys/sys/timeet.h Tue Jul 20 10:58:56 2010 (r210290) @@ -61,6 +61,7 @@ struct eventtimer { #define ET_FLAGS_ONESHOT 2 #define ET_FLAGS_PERCPU 4 #define ET_FLAGS_C3STOP 8 +#define ET_FLAGS_POW2DIV 16 int et_quality; /* * Used to determine if this timecounter is better than @@ -69,6 +70,8 @@ struct eventtimer { int et_active; u_int64_t et_frequency; /* Base frequency in Hz. */ + struct bintime et_min_period; + struct bintime et_max_period; et_start_t *et_start; et_stop_t *et_stop; et_event_cb_t *et_event_cb; Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Tue Jul 20 10:45:05 2010 (r210289) +++ head/sys/x86/isa/atrtc.c Tue Jul 20 10:58:56 2010 (r210290) @@ -276,9 +276,13 @@ atrtc_attach(device_t dev) bus_bind_intr(dev, sc->intr_res, 0); } sc->et.et_name = "RTC"; - sc->et.et_flags = ET_FLAGS_PERIODIC; + sc->et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_POW2DIV; sc->et.et_quality = 0; sc->et.et_frequency = 32768; + sc->et.et_min_period.sec = 0; + sc->et.et_min_period.frac = 0x0008LL << 48; + sc->et.et_max_period.sec = 0; + sc->et.et_max_period.frac = 0x8000LL << 48; sc->et.et_start = rtc_start; sc->et.et_stop = rtc_stop; sc->et.et_priv = dev; Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Tue Jul 20 10:45:05 2010 (r210289) +++ head/sys/x86/isa/clock.c Tue Jul 20 10:58:56 2010 (r210290) @@ -665,6 +665,11 @@ attimer_attach(device_t dev) sc->et.et_flags = ET_FLAGS_PERIODIC; sc->et.et_quality = 100; sc->et.et_frequency = i8254_freq; + sc->et.et_min_period.sec = 0; + sc->et.et_min_period.frac = ((1LL << 62) / i8254_freq) << 2; + sc->et.et_max_period.sec = 0xffff / i8254_freq; + sc->et.et_max_period.frac = + ((0xffffLL << 48) / i8254_freq) << 16; sc->et.et_start = attimer_start; sc->et.et_stop = attimer_stop; sc->et.et_priv = dev; Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Tue Jul 20 10:45:05 2010 (r210289) +++ head/sys/x86/x86/local_apic.c Tue Jul 20 10:58:56 2010 (r210290) @@ -263,6 +263,11 @@ lapic_init(vm_paddr_t addr) lapic_et.et_quality -= 100; } lapic_et.et_frequency = 0; + /* We don't know frequency yet, so trying to guess. */ + lapic_et.et_min_period.sec = 0; + lapic_et.et_min_period.frac = 0x00001000LL << 32; + lapic_et.et_max_period.sec = 1; + lapic_et.et_max_period.frac = 0; lapic_et.et_start = lapic_et_start; lapic_et.et_stop = lapic_et_stop; lapic_et.et_priv = NULL; @@ -493,6 +498,12 @@ lapic_et_start(struct eventtimer *et, printf("lapic: Divisor %lu, Frequency %lu Hz\n", lapic_timer_divisor, value); et->et_frequency = value; + et->et_min_period.sec = 0; + et->et_min_period.frac = + ((1LL << 63) / et->et_frequency) << 1; + et->et_max_period.sec = 0xffffffff / et->et_frequency; + et->et_max_period.frac = + ((0xffffffffLL << 32) / et->et_frequency) << 32; } la = &lapics[lapic_id()]; /* From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 11:08:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D20B1065673; Tue, 20 Jul 2010 11:08:56 +0000 (UTC) (envelope-from bschmidt@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7B0B58FC08; Tue, 20 Jul 2010 11:08:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KB8uVq075535; Tue, 20 Jul 2010 11:08:56 GMT (envelope-from bschmidt@svn.freebsd.org) Received: (from bschmidt@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KB8u25075530; Tue, 20 Jul 2010 11:08:56 GMT (envelope-from bschmidt@svn.freebsd.org) Message-Id: <201007201108.o6KB8u25075530@svn.freebsd.org> From: Bernhard Schmidt Date: Tue, 20 Jul 2010 11:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210291 - in stable/8: share/man/man4 sys/amd64/conf sys/i386/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 11:08:56 -0000 Author: bschmidt Date: Tue Jul 20 11:08:56 2010 New Revision: 210291 URL: http://svn.freebsd.org/changeset/base/210291 Log: MFC r203691: - Update documentation for the iwn and iwnfw drivers: they support the 1000, 5150, 6000 and 6050 devices too, with firmware modules for the - 4965, 1000, 5000, 5150 and 6000. - Add documentation for mwl and all the wireless firmware drivers. Modified: stable/8/share/man/man4/iwn.4 stable/8/share/man/man4/iwnfw.4 stable/8/sys/amd64/conf/NOTES stable/8/sys/i386/conf/NOTES Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/share/man/man4/iwn.4 ============================================================================== --- stable/8/share/man/man4/iwn.4 Tue Jul 20 10:58:56 2010 (r210290) +++ stable/8/share/man/man4/iwn.4 Tue Jul 20 11:08:56 2010 (r210291) @@ -25,12 +25,13 @@ .\" .\" $FreeBSD$ .\" -.Dd October 25, 2009 +.Dd February 8, 2010 .Os .Dt IWN 4 .Sh NAME .Nm iwn -.Nd "Intel Wireless WiFi Link 4965/5000 IEEE 802.11n driver" +.Nd Intel Wireless WiFi Link 4965/1000/5000/5150/5300/6000/6050 +IEEE 802.11n driver .Sh SYNOPSIS To compile this driver into the kernel, include the following lines in your @@ -46,8 +47,10 @@ You also need to select a firmware for y Choose one from: .Bd -ragged -offset indent .Cd "device iwn4965fw" +.Cd "device iwn1000fw" .Cd "device iwn5000fw" -.Cd "device iwn5100fw" +.Cd "device iwn5150fw" +.Cd "device iwn6000fw" .Ed .Pp Or you can use @@ -63,15 +66,18 @@ module at boot time, place the following .Bd -literal -offset indent if_iwn_load="YES" iwn4965fw_load="YES" +iwn1000fw_load="YES" iwn5000fw_load="YES" -iwn5100fw_load="YES" +iwn5150fw_load="YES" +iwn6000fw_load="YES" .Ed .Sh DESCRIPTION The .Nm driver provides support for .Tn Intel -Wireless WiFi Link 4965 and 5000 series of PCI-Express network adapters. +Wireless WiFi Link 4965, 1000, 5000 and 6000 series of +PCI-Express network adapters. .Nm supports .Cm station , Modified: stable/8/share/man/man4/iwnfw.4 ============================================================================== --- stable/8/share/man/man4/iwnfw.4 Tue Jul 20 10:58:56 2010 (r210290) +++ stable/8/share/man/man4/iwnfw.4 Tue Jul 20 11:08:56 2010 (r210291) @@ -22,7 +22,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 25, 2009 +.Dd February 7, 2010 .Dt IWNFW 4 .Os .Sh NAME @@ -41,8 +41,10 @@ If you want to pick only the firmware im of the following: .Bd -ragged -offset indent .Cd "device iwn4965fw" +.Cd "device iwn1000fw" .Cd "device iwn5000fw" -.Cd "device iwn5100fw" +.Cd "device iwn5150fw" +.Cd "device iwn6000fw" .Ed .Pp Alternatively, to load the driver as a @@ -50,12 +52,15 @@ module at boot time, place the following .Xr loader.conf 5 : .Bd -literal -offset indent iwn4965fw_load="YES" +iwn1000fw_load="YES" iwn5000fw_load="YES" -iwn5100fw_load="YES" +iwn5150fw_load="YES" +iwn6000fw_load="YES" .Ed .Sh DESCRIPTION This module provides access to firmware sets for the -Intel Wireless WiFi Link 4965 and 5000 series of IEEE 802.11n adapters. +Intel Wireless WiFi Link 4965, 1000, 5000 and 6000 series of +IEEE 802.11n adapters. It may be statically linked into the kernel, or loaded as a module. .Sh SEE ALSO Modified: stable/8/sys/amd64/conf/NOTES ============================================================================== --- stable/8/sys/amd64/conf/NOTES Tue Jul 20 10:58:56 2010 (r210290) +++ stable/8/sys/amd64/conf/NOTES Tue Jul 20 11:08:56 2010 (r210291) @@ -273,20 +273,27 @@ options DRM_DEBUG # Include debug print # HP PC Lan+, various PC Card devices # (requires miibus) # ipw: Intel PRO/Wireless 2100 IEEE 802.11 adapter +# Requires the ipw firmware module # iwi: Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 adapters -# iwn: Intel Wireless WiFi Link 4965AGN 802.11 network adapters +# Requires the iwi firmware module +# iwn: Intel Wireless WiFi Link 4965/1000/5000/6000 802.11 network adapters +# Requires the iwn firmware module +# mwl: Marvell 88W8363 IEEE 802.11 adapter +# Requires the mwl firmware module # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking # ral: Ralink Technology IEEE 802.11 wireless adapter # wpi: Intel 3945ABG Wireless LAN controller +# Requires the wpi firmware module device ed options ED_3C503 options ED_HPP options ED_SIC +device ipw device iwi device iwn -device ipw +device mwl device nfe device nve device ral @@ -299,6 +306,45 @@ device ath_rate_sample # SampleRate tx #device ath_rate_amrr # AMRR rate control for ath driver #device ath_rate_onoe # Onoe rate control for ath driver +# IEEE 802.11 adapter firmware modules + +# Intel PRO/Wireless 2100 firmware: +# ipwfw: BSS/IBSS/monitor mode firmware +# ipwbssfw: BSS mode firmware +# ipwibssfw: IBSS mode firmware +# ipwmonitorfw: Monitor mode firmware +# Intel PRO/Wireless 2200BG/2225BG/2915ABG firmware: +# iwifw: BSS/IBSS/monitor mode firmware +# iwibssfw: BSS mode firmware +# iwiibssfw: IBSS mode firmware +# iwimonitorfw: Monitor mode firmware +# Intel Wireless WiFi Link 4965/1000/5000/6000 series firmware: +# iwnfw: Single module to support the 4965/1000/5000/5150/6000 +# iwn4965fw: Specific module for the 4965 only +# iwn1000fw: Specific module for the 1000 only +# iwn5000fw: Specific module for the 5000 only +# iwn5150fw: Specific module for the 5150 only +# iwn6000fw: Specific module for the 6000 only +# mwlfw: Marvell 88W8363 firmware +# wpifw: Intel 3945ABG Wireless LAN Controller firmware + +device iwifw +device iwibssfw +device iwiibssfw +device iwimonitorfw +device ipwfw +device ipwbssfw +device ipwibssfw +device ipwmonitorfw +device iwnfw +device iwn4965fw +device iwn1000fw +device iwn5000fw +device iwn5150fw +device iwn6000fw +device mwlfw +device wpifw + # #XXX this stores pointers in a 32bit field that is defined by the hardware #device pst Modified: stable/8/sys/i386/conf/NOTES ============================================================================== --- stable/8/sys/i386/conf/NOTES Tue Jul 20 10:58:56 2010 (r210290) +++ stable/8/sys/i386/conf/NOTES Tue Jul 20 11:08:56 2010 (r210291) @@ -552,13 +552,18 @@ hint.mse.0.irq="5" # Intel EtherExpress # ipw: Intel PRO/Wireless 2100 IEEE 802.11 adapter # iwi: Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 adapters +# Requires the iwi firmware module # iwn: Intel Wireless WiFi Link 4965AGN 802.11 network adapters +# Requires the iwn firmware module +# mwl: Marvell 88W8363 IEEE 802.11 adapter +# Requires the mwl firmware module # nfe: nVidia nForce MCP on-board Ethernet Networking (BSD open source) # nve: nVidia nForce MCP on-board Ethernet Networking # ral: Ralink Technology IEEE 802.11 wireless adapter # sbni: Granch SBNI12-xx ISA and PCI adapters # wl: Lucent Wavelan (ISA card only). # wpi: Intel 3945ABG Wireless LAN controller +# Requires the wpi firmware module # Order for ISA/EISA devices is important here @@ -600,14 +605,15 @@ hint.ie.2.at="isa" hint.ie.2.port="0x300" hint.ie.2.irq="5" hint.ie.2.maddr="0xd0000" +device ipw device iwi device iwn -device ipw # Hint for the i386-only ISA front-end of le(4). hint.le.0.at="isa" hint.le.0.port="0x280" hint.le.0.irq="10" hint.le.0.drq="0" +device mwl device nfe # nVidia nForce MCP on-board Ethernet Networking device nve # nVidia nForce MCP on-board Ethernet Networking device ral @@ -623,6 +629,45 @@ options WLCACHE # enables the signal-s options WLDEBUG # enables verbose debugging output device wpi +# IEEE 802.11 adapter firmware modules + +# Intel PRO/Wireless 2100 firmware: +# ipwfw: BSS/IBSS/monitor mode firmware +# ipwbssfw: BSS mode firmware +# ipwibssfw: IBSS mode firmware +# ipwmonitorfw: Monitor mode firmware +# Intel PRO/Wireless 2200BG/2225BG/2915ABG firmware: +# iwifw: BSS/IBSS/monitor mode firmware +# iwibssfw: BSS mode firmware +# iwiibssfw: IBSS mode firmware +# iwimonitorfw: Monitor mode firmware +# Intel Wireless WiFi Link 4965/1000/5000/6000 series firmware: +# iwnfw: Single module to support the 4965/1000/5000/5150/6000 +# iwn4965fw: Specific module for the 4965 only +# iwn1000fw: Specific module for the 1000 only +# iwn5000fw: Specific module for the 5000 only +# iwn5150fw: Specific module for the 5150 only +# iwn6000fw: Specific module for the 6000 only +# mwlfw: Marvell 88W8363 firmware +# wpifw: Intel 3945ABG Wireless LAN Controller firmware + +device iwifw +device iwibssfw +device iwiibssfw +device iwimonitorfw +device ipwfw +device ipwbssfw +device ipwibssfw +device ipwmonitorfw +device iwnfw +device iwn4965fw +device iwn1000fw +device iwn5000fw +device iwn5150fw +device iwn6000fw +device mwlfw +device wpifw + # # ATA raid adapters # From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 11:19:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7275210656DD; Tue, 20 Jul 2010 11:19:49 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 370638FC27; Tue, 20 Jul 2010 11:19:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.3/8.14.1) with ESMTP id o6KBIfIi057368; Tue, 20 Jul 2010 05:18:41 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Tue, 20 Jul 2010 05:19:09 -0600 (MDT) Message-Id: <20100720.051909.123717654796701540.imp@bsdimp.com> To: jmallett@freebsd.org From: "M. Warner Losh" In-Reply-To: <201007200719.o6K7Jhfj022824@svn.freebsd.org> References: <201007200719.o6K7Jhfj022824@svn.freebsd.org> X-Mailer: Mew version 6.3 on Emacs 22.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210286 - head/sys/contrib/octeon-sdk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 11:19:49 -0000 In message: <201007200719.o6K7Jhfj022824@svn.freebsd.org> Juli Mallett writes: : Author: jmallett : Date: Tue Jul 20 07:19:43 2010 : New Revision: 210286 : URL: http://svn.freebsd.org/changeset/base/210286 : : Log: : Import the Cavium Simple Executive from the Cavium Octeon SDK. The Simple : Executive is a library that can be used by standalone applications and kernels : to abstract access to Octeon SoC and board-specific hardware and facilities. : The FreeBSD port to Octeon will be updated to use this where possible. It should be noted that this is from the Cavium User's site and has basically a BSD license with a special disclaimer of liability/warranty. Cavium documents this as being compatible with the closed-source version that Cavium makes available under NDA. Warner From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 11:20:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D435C1065675; Tue, 20 Jul 2010 11:20:45 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C49348FC13; Tue, 20 Jul 2010 11:20:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KBKjFt078211; Tue, 20 Jul 2010 11:20:45 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KBKjuD078209; Tue, 20 Jul 2010 11:20:45 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201007201120.o6KBKjuD078209@svn.freebsd.org> From: Rui Paulo Date: Tue, 20 Jul 2010 11:20:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210292 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 11:20:45 -0000 Author: rpaulo Date: Tue Jul 20 11:20:45 2010 New Revision: 210292 URL: http://svn.freebsd.org/changeset/base/210292 Log: Fix typo in comment. Modified: head/sys/sys/priv.h Modified: head/sys/sys/priv.h ============================================================================== --- head/sys/sys/priv.h Tue Jul 20 11:08:56 2010 (r210291) +++ head/sys/sys/priv.h Tue Jul 20 11:20:45 2010 (r210292) @@ -497,7 +497,7 @@ #ifdef _KERNEL /* - * Privilege check interfaces, modeled after historic suser() interfacs, but + * Privilege check interfaces, modeled after historic suser() interfaces, but * with the addition of a specific privilege name. No flags are currently * defined for the API. Historically, flags specified using the real uid * instead of the effective uid, and whether or not the check should be From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 11:46:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 60BD21065674; Tue, 20 Jul 2010 11:46:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5029F8FC13; Tue, 20 Jul 2010 11:46:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KBkjAc083934; Tue, 20 Jul 2010 11:46:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KBkj3j083931; Tue, 20 Jul 2010 11:46:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007201146.o6KBkj3j083931@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Jul 2010 11:46:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210293 - head/sys/arm/mv X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 11:46:45 -0000 Author: mav Date: Tue Jul 20 11:46:45 2010 New Revision: 210293 URL: http://svn.freebsd.org/changeset/base/210293 Log: Refactor Marvell ARM SoC timer driver to the new timer infrastructure. Modified: head/sys/arm/mv/files.mv head/sys/arm/mv/timer.c Modified: head/sys/arm/mv/files.mv ============================================================================== --- head/sys/arm/mv/files.mv Tue Jul 20 11:20:45 2010 (r210292) +++ head/sys/arm/mv/files.mv Tue Jul 20 11:46:45 2010 (r210293) @@ -32,3 +32,5 @@ dev/mge/if_mge.c optional mge dev/mvs/mvs_soc.c optional mvs dev/uart/uart_dev_ns8250.c optional uart dev/usb/controller/ehci_mv.c optional ehci + +kern/kern_clocksource.c standard Modified: head/sys/arm/mv/timer.c ============================================================================== --- head/sys/arm/mv/timer.c Tue Jul 20 11:20:45 2010 (r210292) +++ head/sys/arm/mv/timer.c Tue Jul 20 11:46:45 2010 (r210293) @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -51,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define MV_TIMER_TICK (get_tclk() / hz) #define INITIAL_TIMECOUNTER (0xffffffff) #define MAX_WATCHDOG_TICKS (0xffffffff) @@ -60,6 +60,7 @@ struct mv_timer_softc { bus_space_tag_t timer_bst; bus_space_handle_t timer_bsh; struct mtx timer_mtx; + struct eventtimer et; }; static struct resource_spec mv_timer_spec[] = { @@ -85,12 +86,14 @@ static void mv_set_timer_rel(uint32_t, u static void mv_watchdog_enable(void); static void mv_watchdog_disable(void); static void mv_watchdog_event(void *, unsigned int, int *); -static void mv_setup_timer(void); -static void mv_setup_timercount(void); +static int mv_timer_start(struct eventtimer *et, + struct bintime *first, struct bintime *period); +static int mv_timer_stop(struct eventtimer *et); +static void mv_setup_timers(void); static struct timecounter mv_timer_timecounter = { .tc_get_timecount = mv_timer_get_timecount, - .tc_name = "CPU Timer", + .tc_name = "CPUTimer1", .tc_frequency = 0, /* This is assigned on the fly in the init sequence */ .tc_counter_mask = ~0u, .tc_quality = 1000, @@ -113,6 +116,7 @@ mv_timer_attach(device_t dev) int error; void *ihl; struct mv_timer_softc *sc; + uint32_t irq_cause, irq_mask; if (timer_softc != NULL) return (ENXIO); @@ -134,14 +138,36 @@ mv_timer_attach(device_t dev) EVENTHANDLER_REGISTER(watchdog_list, mv_watchdog_event, sc, 0); if (bus_setup_intr(dev, sc->timer_res[1], INTR_TYPE_CLK, - mv_hardclock, NULL, NULL, &ihl) != 0) { + mv_hardclock, NULL, sc, &ihl) != 0) { bus_release_resources(dev, mv_timer_spec, sc->timer_res); - device_printf(dev, "could not setup hardclock interrupt\n"); + device_printf(dev, "Could not setup interrupt.\n"); return (ENXIO); } - mv_setup_timercount(); - timers_initialized = 1; + mv_setup_timers(); + irq_cause = read_cpu_ctrl(BRIDGE_IRQ_CAUSE); + irq_cause &= ~(IRQ_TIMER0); + write_cpu_ctrl(BRIDGE_IRQ_CAUSE, irq_cause); + irq_mask = read_cpu_ctrl(BRIDGE_IRQ_MASK); + irq_mask |= IRQ_TIMER0_MASK; + write_cpu_ctrl(BRIDGE_IRQ_MASK, irq_mask); + + sc->et.et_name = "CPUTimer0"; + sc->et.et_flags = ET_FLAGS_PERIODIC | ET_FLAGS_ONESHOT; + sc->et.et_quality = 1000; + sc->et.et_frequency = get_tclk(); + sc->et.et_min_period.sec = 0; + sc->et.et_min_period.frac = + ((0xfLL << 60) / sc->et.et_frequency) << 4; + sc->et.et_max_period.sec = 0xfffffff0 / sc->et.et_frequency; + sc->et.et_max_period.frac = + ((0xfffffff0LL << 32) / sc->et.et_frequency) << 32; + sc->et.et_start = mv_timer_start; + sc->et.et_stop = mv_timer_stop; + sc->et.et_priv = sc; + et_register(&sc->et); + mv_timer_timecounter.tc_frequency = get_tclk(); + tc_init(&mv_timer_timecounter); return (0); } @@ -149,11 +175,12 @@ mv_timer_attach(device_t dev) static int mv_hardclock(void *arg) { + struct mv_timer_softc *sc; uint32_t irq_cause; - struct trapframe *frame; - frame = (struct trapframe *)arg; - hardclock(TRAPF_USERMODE(frame), TRAPF_PC(frame)); + sc = (struct mv_timer_softc *)arg; + if (sc->et.et_active) + sc->et.et_event_cb(&sc->et, sc->et.et_arg); irq_cause = read_cpu_ctrl(BRIDGE_IRQ_CAUSE); irq_cause &= ~(IRQ_TIMER0); @@ -189,32 +216,8 @@ mv_timer_get_timecount(struct timecounte void cpu_initclocks(void) { - uint32_t irq_cause, irq_mask; - - mv_setup_timer(); - - irq_cause = read_cpu_ctrl(BRIDGE_IRQ_CAUSE); - irq_cause &= ~(IRQ_TIMER0); - write_cpu_ctrl(BRIDGE_IRQ_CAUSE, irq_cause); - - irq_mask = read_cpu_ctrl(BRIDGE_IRQ_MASK); - irq_mask |= IRQ_TIMER0_MASK; - write_cpu_ctrl(BRIDGE_IRQ_MASK, irq_mask); - - mv_timer_timecounter.tc_frequency = get_tclk(); - tc_init(&mv_timer_timecounter); -} - -void -cpu_startprofclock(void) -{ - -} - -void -cpu_stopprofclock(void) -{ + cpu_initclocks_bsp(); } void @@ -362,26 +365,60 @@ mv_watchdog_event(void *arg, unsigned in mtx_unlock(&timer_softc->timer_mtx); } -static void -mv_setup_timer(void) +static int +mv_timer_start(struct eventtimer *et, + struct bintime *first, struct bintime *period) +{ + struct mv_timer_softc *sc; + uint32_t val, val1; + + /* Calculate dividers. */ + sc = (struct mv_timer_softc *)et->et_priv; + if (period != NULL) { + val = (sc->et.et_frequency * (period->frac >> 32)) >> 32; + if (period->sec != 0) + val += sc->et.et_frequency * period->sec; + } else + val = 0; + if (first != NULL) { + val1 = (sc->et.et_frequency * (first->frac >> 32)) >> 32; + if (first->sec != 0) + val1 += sc->et.et_frequency * first->sec; + } else + val1 = val; + + /* Apply configuration. */ + mv_set_timer_rel(0, val); + mv_set_timer(0, val1); + val = mv_get_timer_control(); + val |= CPU_TIMER0_EN; + if (period != NULL) + val |= CPU_TIMER0_AUTO; + mv_set_timer_control(val); + return (0); +} + +static int +mv_timer_stop(struct eventtimer *et) { uint32_t val; - mv_set_timer_rel(0, MV_TIMER_TICK); - mv_set_timer(0, MV_TIMER_TICK); val = mv_get_timer_control(); - val |= CPU_TIMER0_EN | CPU_TIMER0_AUTO; + val &= ~(CPU_TIMER0_EN | CPU_TIMER0_AUTO); mv_set_timer_control(val); + return (0); } static void -mv_setup_timercount(void) +mv_setup_timers(void) { uint32_t val; mv_set_timer_rel(1, INITIAL_TIMECOUNTER); mv_set_timer(1, INITIAL_TIMECOUNTER); val = mv_get_timer_control(); + val &= ~(CPU_TIMER0_EN | CPU_TIMER0_AUTO); val |= CPU_TIMER1_EN | CPU_TIMER1_AUTO; mv_set_timer_control(val); + timers_initialized = 1; } From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 12:36:36 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0BA9106566B; Tue, 20 Jul 2010 12:36:36 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A72938FC13; Tue, 20 Jul 2010 12:36:36 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KCaaxS095032; Tue, 20 Jul 2010 12:36:36 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KCaaRx095029; Tue, 20 Jul 2010 12:36:36 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201007201236.o6KCaaRx095029@svn.freebsd.org> From: Tijl Coosemans Date: Tue, 20 Jul 2010 12:36:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210294 - in head/sys: i386/i386 pc98/pc98 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 12:36:36 -0000 Author: tijl Date: Tue Jul 20 12:36:36 2010 New Revision: 210294 URL: http://svn.freebsd.org/changeset/base/210294 Log: Store fsbase and gsbase in the right fields of the mcontext. They were switched. PR: i386/148344 Approved by: kib (mentor) MFC after: 1 week Modified: head/sys/i386/i386/machdep.c head/sys/pc98/pc98/machdep.c Modified: head/sys/i386/i386/machdep.c ============================================================================== --- head/sys/i386/i386/machdep.c Tue Jul 20 11:46:45 2010 (r210293) +++ head/sys/i386/i386/machdep.c Tue Jul 20 12:36:36 2010 (r210294) @@ -645,10 +645,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* * Unconditionally fill the fsbase and gsbase into the mcontext. */ - sdp = &td->td_pcb->pcb_gsd; + sdp = &td->td_pcb->pcb_fsd; sf.sf_uc.uc_mcontext.mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; - sdp = &td->td_pcb->pcb_fsd; + sdp = &td->td_pcb->pcb_gsd; sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; @@ -3255,9 +3255,9 @@ get_mcontext(struct thread *td, mcontext * mcontext after mc_fpstate. */ get_fpcontext(td, mcp); - sdp = &td->td_pcb->pcb_gsd; - mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; sdp = &td->td_pcb->pcb_fsd; + mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; + sdp = &td->td_pcb->pcb_gsd; mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; return (0); Modified: head/sys/pc98/pc98/machdep.c ============================================================================== --- head/sys/pc98/pc98/machdep.c Tue Jul 20 11:46:45 2010 (r210293) +++ head/sys/pc98/pc98/machdep.c Tue Jul 20 12:36:36 2010 (r210294) @@ -580,10 +580,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, /* * Unconditionally fill the fsbase and gsbase into the mcontext. */ - sdp = &td->td_pcb->pcb_gsd; + sdp = &td->td_pcb->pcb_fsd; sf.sf_uc.uc_mcontext.mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; - sdp = &td->td_pcb->pcb_fsd; + sdp = &td->td_pcb->pcb_gsd; sf.sf_uc.uc_mcontext.mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; @@ -2583,9 +2583,9 @@ get_mcontext(struct thread *td, mcontext * mcontext after mc_fpstate. */ get_fpcontext(td, mcp); - sdp = &td->td_pcb->pcb_gsd; - mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; sdp = &td->td_pcb->pcb_fsd; + mcp->mc_fsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; + sdp = &td->td_pcb->pcb_gsd; mcp->mc_gsbase = sdp->sd_hibase << 24 | sdp->sd_lobase; return (0); From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 12:58:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E13C1065670; Tue, 20 Jul 2010 12:58:48 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay04.stack.nl [IPv6:2001:610:1108:5010::107]) by mx1.freebsd.org (Postfix) with ESMTP id 1B2E18FC08; Tue, 20 Jul 2010 12:58:48 +0000 (UTC) Received: from turtle.stack.nl (turtle.stack.nl [IPv6:2001:610:1108:5010::132]) by mx1.stack.nl (Postfix) with ESMTP id 063F31DD686; Tue, 20 Jul 2010 14:58:47 +0200 (CEST) Received: by turtle.stack.nl (Postfix, from userid 1677) id E797F17225; Tue, 20 Jul 2010 14:58:46 +0200 (CEST) Date: Tue, 20 Jul 2010 14:58:46 +0200 From: Jilles Tjoelker To: Gabor Kovesdan Message-ID: <20100720125846.GA17638@stack.nl> References: <201007192019.o6JKJEg5072065@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201007192019.o6JKJEg5072065@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210254 - in head/etc: defaults periodic/security X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 12:58:48 -0000 On Mon, Jul 19, 2010 at 08:19:14PM +0000, Gabor Kovesdan wrote: > Author: gabor > Date: Mon Jul 19 20:19:14 2010 > New Revision: 210254 > URL: http://svn.freebsd.org/changeset/base/210254 > Log: > - Add a periodic script, which can be used to find installed ports' files with > mismatched checksum > PR: conf/124641 > Submitted by: Alex Kozlov > Approved by: delphij (mentor) This seems useful, although not primarily from a security perspective (if they can overwrite /usr/local/bin/foo, they can probably also modify /var/db/pkg/foo/+CONTENTS accordingly), but to detect misbehaved things that modify or delete files belonging to packages. [snip] > Added: head/etc/periodic/security/460.chkportsum > ============================================================================== > --- /dev/null 00:00:00 1970 (empty, because file is newly added) > +++ head/etc/periodic/security/460.chkportsum Mon Jul 19 20:19:14 2010 (r210254) > @@ -0,0 +1,68 @@ > +#!/bin/sh - > +# > +# Copyright (c) 2010 The FreeBSD Project > +# 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$ > +# > + > +if [ -r /etc/defaults/periodic.conf ] > +then > + . /etc/defaults/periodic.conf > + source_periodic_confs > +fi > + > +. /etc/periodic/security/security.functions > + > +rc=0 > + > +echo "" > +echo 'Checking for ports with mismatched checksums:' > + > +case "${daily_status_security_chkportsum_enable}" in > + [Yy][Ee][Ss]) > + pkg_info -ga 2>/dev/null | \ The stderr output is also interesting, as it contains error messages about files that are in a package but do not exist. Unfortunately, pkg_info -ga 2>&1 | ... will mix the stderr with the stdout in an unusable way. I suppose pkg_info -g should be modified so the missing files are in the stdout. > + while read one two three; do > + case ${one} in > + Information) > + case ${two} in > + for) name=${three%%:} ;; > + *) name='??' ;; The indentation seems wrong here. > + esac > + ;; > + Mismatched|'') ;; > + *) > + if [ -n ${name} ]; then Note that this is true if name is empty or not set. You probably want [ -n "${name}" ] > + echo ${name}: ${one} This handles pathnames with spaces incorrectly. Consider reading lines with IFS= read -r line This also collapses the nested case statements to one, for 'Information for'*, Mismatched*, '' and /*. The variables in the echo commands should be quoted to avoid word splitting and pathname generation. > + fi > + ;; > + esac > + done > + ;; > + *) > + rc=0 > + ;; > +esac > + > +exit $rc -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 13:03:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E63D3106567A; Tue, 20 Jul 2010 13:03:35 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B71FA8FC23; Tue, 20 Jul 2010 13:03:35 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 4C96846B52; Tue, 20 Jul 2010 09:03:35 -0400 (EDT) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id EE8548A03C; Tue, 20 Jul 2010 09:03:33 -0400 (EDT) From: John Baldwin To: Ivan Voras Date: Mon, 19 Jul 2010 08:29:21 -0400 User-Agent: KMail/1.13.5 (FreeBSD/7.3-CBSD-20100217; KDE/4.4.5; amd64; ; ) References: <201007181015.o6IAFXvK018739@svn.freebsd.org> In-Reply-To: <201007181015.o6IAFXvK018739@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201007190829.21995.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Tue, 20 Jul 2010 09:03:33 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.0 required=4.2 tests=AWL,BAYES_00, DATE_IN_PAST_24_48 autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210217 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 13:03:36 -0000 On Sunday, July 18, 2010 6:15:33 am Ivan Voras wrote: > Author: ivoras > Date: Sun Jul 18 10:15:33 2010 > New Revision: 210217 > URL: http://svn.freebsd.org/changeset/base/210217 > > Log: > In keeping with the Age-of-the-fruitbat theme, scale up hirunningspace on > machines which can clearly afford the memory. > > This is a somewhat conservative version of the patch - more fine tuning may be > necessary. > > Idea from: Thread on hackers@ > Discussed with: alc > > Modified: > head/sys/kern/vfs_bio.c > > Modified: head/sys/kern/vfs_bio.c > ============================================================================== > --- head/sys/kern/vfs_bio.c Sun Jul 18 08:54:31 2010 (r210216) > +++ head/sys/kern/vfs_bio.c Sun Jul 18 10:15:33 2010 (r210217) > @@ -621,7 +621,9 @@ bufinit(void) > lobufspace = hibufspace - MAXBSIZE; > > lorunningspace = 512 * 1024; > - hirunningspace = 1024 * 1024; > + hirunningspace = lmin(roundup(hibufspace/64, MAXBSIZE), 16*1024*1024); > + if (hirunningspace < 1024 * 1024) > + hirunningspace = 1024 * 1024; Presumably you could use 'lmax(lmin(..., 16 * 1024 * 1024), 1024 * 1024))'? Also, the common style throughout the kernel is to provide spaces around operators like '/' and '*'. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 13:59:51 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7F1721065675; Tue, 20 Jul 2010 13:59:51 +0000 (UTC) (envelope-from ivoras@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6EE9B8FC14; Tue, 20 Jul 2010 13:59:51 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KDxpX8013559; Tue, 20 Jul 2010 13:59:51 GMT (envelope-from ivoras@svn.freebsd.org) Received: (from ivoras@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KDxptc013557; Tue, 20 Jul 2010 13:59:51 GMT (envelope-from ivoras@svn.freebsd.org) Message-Id: <201007201359.o6KDxptc013557@svn.freebsd.org> From: Ivan Voras Date: Tue, 20 Jul 2010 13:59:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210295 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 13:59:51 -0000 Author: ivoras Date: Tue Jul 20 13:59:51 2010 New Revision: 210295 URL: http://svn.freebsd.org/changeset/base/210295 Log: Fix expression style. Prodded by: jhb Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Tue Jul 20 12:36:36 2010 (r210294) +++ head/sys/kern/vfs_bio.c Tue Jul 20 13:59:51 2010 (r210295) @@ -621,9 +621,8 @@ bufinit(void) lobufspace = hibufspace - MAXBSIZE; lorunningspace = 512 * 1024; - hirunningspace = lmin(roundup(hibufspace/64, MAXBSIZE), 16*1024*1024); - if (hirunningspace < 1024 * 1024) - hirunningspace = 1024 * 1024; + hirunningspace = lmax(lmin(roundup(hibufspace / 64, MAXBSIZE), + 16 * 1024 * 1024), 1024 * 1024); /* * Limit the amount of malloc memory since it is wired permanently into From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 14:27:09 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5CE92106566C; Tue, 20 Jul 2010 14:27:09 +0000 (UTC) (envelope-from roberto@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4C57C8FC2B; Tue, 20 Jul 2010 14:27:09 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KER9jd019723; Tue, 20 Jul 2010 14:27:09 GMT (envelope-from roberto@svn.freebsd.org) Received: (from roberto@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KER9Q8019720; Tue, 20 Jul 2010 14:27:09 GMT (envelope-from roberto@svn.freebsd.org) Message-Id: <201007201427.o6KER9Q8019720@svn.freebsd.org> From: Ollivier Robert Date: Tue, 20 Jul 2010 14:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210296 - head/share/timedef X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 14:27:09 -0000 Author: roberto Date: Tue Jul 20 14:27:09 2010 New Revision: 210296 URL: http://svn.freebsd.org/changeset/base/210296 Log: Week days are all lowercase in French. cf. http://www.academie-francaise.fr/langue/questions.html#jourdelasemaine (FR) PR: misc/148792 Submitted by: Mathieu MFC after: 1 weeks Modified: head/share/timedef/fr_FR.ISO8859-1.src head/share/timedef/fr_FR.UTF-8.src Modified: head/share/timedef/fr_FR.ISO8859-1.src ============================================================================== --- head/share/timedef/fr_FR.ISO8859-1.src Tue Jul 20 13:59:51 2010 (r210295) +++ head/share/timedef/fr_FR.ISO8859-1.src Tue Jul 20 14:27:09 2010 (r210296) @@ -35,23 +35,23 @@ décembre # # Short weekday names # -Dim -Lun -Mar -Mer -Jeu -Ven -Sam +dim +lun +mar +mer +jeu +ven +sam # # Long weekday names # -Dimanche -Lundi -Mardi -Mercredi -Jeudi -Vendredi -Samedi +dimanche +lundi +mardi +mercredi +jeudi +vendredi +samedi # # X_fmt # Modified: head/share/timedef/fr_FR.UTF-8.src ============================================================================== --- head/share/timedef/fr_FR.UTF-8.src Tue Jul 20 13:59:51 2010 (r210295) +++ head/share/timedef/fr_FR.UTF-8.src Tue Jul 20 14:27:09 2010 (r210296) @@ -35,23 +35,23 @@ décembre # # Short weekday names # -Dim -Lun -Mar -Mer -Jeu -Ven -Sam +dim +lun +mar +mer +jeu +ven +sam # # Long weekday names # -Dimanche -Lundi -Mardi -Mercredi -Jeudi -Vendredi -Samedi +dimanche +lundi +mardi +mercredi +jeudi +vendredi +samedi # # X_fmt # From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 15:34:27 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87161106567C; Tue, 20 Jul 2010 15:34:27 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 757438FC16; Tue, 20 Jul 2010 15:34:27 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KFYRI2034800; Tue, 20 Jul 2010 15:34:27 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KFYRCg034799; Tue, 20 Jul 2010 15:34:27 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007201534.o6KFYRCg034799@svn.freebsd.org> From: Benedict Reuschling Date: Tue, 20 Jul 2010 15:34:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210297 - stable/8/gnu/usr.bin/dialog X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 15:34:27 -0000 Author: bcr (doc committer) Date: Tue Jul 20 15:34:27 2010 New Revision: 210297 URL: http://svn.freebsd.org/changeset/base/210297 Log: MFC r209738: Mention the radiolist option in the man page. It is being listed when dialog(1) is run without arguments and works as expected. Therefore, it should be part of the manual as well. Note: dialog(1) has not been updated for many years and is not actively maintained at the moment. PR: docs/139682 Submitted by: manolis@ Discussed with: jkim@ Modified: stable/8/gnu/usr.bin/dialog/dialog.1 Directory Properties: stable/8/gnu/usr.bin/dialog/ (props changed) Modified: stable/8/gnu/usr.bin/dialog/dialog.1 ============================================================================== --- stable/8/gnu/usr.bin/dialog/dialog.1 Tue Jul 20 14:27:09 2010 (r210296) +++ stable/8/gnu/usr.bin/dialog/dialog.1 Tue Jul 20 15:34:27 2010 (r210297) @@ -30,6 +30,7 @@ types of dialog objects are currently su .BR yes/no " box," " menu" " box," " input" " box," .BR message " box," " text" " box," " info" " box," .BR checklist " box," " program" " box," +.BR radiolist " box," .BR ftree " and " tree " boxes." .SH OPTIONS .TP @@ -172,6 +173,15 @@ On exit, a list of the .I tag strings of those entries that are turned on will be printed on .IR stderr "." +.IP "\fB\-\-radiolist \fItext height width list-height \fR[ \fItag item status \fR] \fI..." +.RB "A " radiolist " box is similar to a " checklist " but it only allows" +a single entry to be selected. One entry may initially be turned on as +specified by +.IR status "." +On exit, the +.I tag +string of the entry that is turned on will be printed on +.IR stderr "." .IP "\fB\-\-ftree \fIfile FS text height width menu-height" .B ftree box is a dialog box showing the tree described by the data from the file From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 15:48:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7999106566B; Tue, 20 Jul 2010 15:48:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D59E48FC13; Tue, 20 Jul 2010 15:48:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KFmT2R037969; Tue, 20 Jul 2010 15:48:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KFmTLO037962; Tue, 20 Jul 2010 15:48:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007201548.o6KFmTLO037962@svn.freebsd.org> From: Alexander Motin Date: Tue, 20 Jul 2010 15:48:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210298 - in head/sys: arm/mv dev/acpica kern x86/isa x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 15:48:30 -0000 Author: mav Date: Tue Jul 20 15:48:29 2010 New Revision: 210298 URL: http://svn.freebsd.org/changeset/base/210298 Log: Fix several un-/signedness bugs of r210290 and r210293. Add one more check. Modified: head/sys/arm/mv/timer.c head/sys/dev/acpica/acpi_hpet.c head/sys/kern/kern_clocksource.c head/sys/x86/isa/atrtc.c head/sys/x86/isa/clock.c head/sys/x86/x86/local_apic.c Modified: head/sys/arm/mv/timer.c ============================================================================== --- head/sys/arm/mv/timer.c Tue Jul 20 15:34:27 2010 (r210297) +++ head/sys/arm/mv/timer.c Tue Jul 20 15:48:29 2010 (r210298) @@ -158,10 +158,10 @@ mv_timer_attach(device_t dev) sc->et.et_frequency = get_tclk(); sc->et.et_min_period.sec = 0; sc->et.et_min_period.frac = - ((0xfLL << 60) / sc->et.et_frequency) << 4; - sc->et.et_max_period.sec = 0xfffffff0 / sc->et.et_frequency; + ((0x00000002LLU << 32) / sc->et.et_frequency) << 32; + sc->et.et_max_period.sec = 0xfffffff0U / sc->et.et_frequency; sc->et.et_max_period.frac = - ((0xfffffff0LL << 32) / sc->et.et_frequency) << 32; + ((0xfffffffeLLU << 32) / sc->et.et_frequency) << 32; sc->et.et_start = mv_timer_start; sc->et.et_stop = mv_timer_stop; sc->et.et_priv = sc; Modified: head/sys/dev/acpica/acpi_hpet.c ============================================================================== --- head/sys/dev/acpica/acpi_hpet.c Tue Jul 20 15:34:27 2010 (r210297) +++ head/sys/dev/acpica/acpi_hpet.c Tue Jul 20 15:48:29 2010 (r210298) @@ -585,10 +585,10 @@ hpet_attach(device_t dev) t->et.et_quality -= 10; t->et.et_frequency = sc->freq; t->et.et_min_period.sec = 0; - t->et.et_min_period.frac = 0x00004000LL << 32; - t->et.et_max_period.sec = 0xffffffff / sc->freq; + t->et.et_min_period.frac = 0x00004000LLU << 32; + t->et.et_max_period.sec = 0xfffffffeLLU / sc->freq; t->et.et_max_period.frac = - ((0xffffffffLL << 32) / sc->freq) << 32; + ((0xfffffffeLLU << 32) / sc->freq) << 32; t->et.et_start = hpet_start; t->et.et_stop = hpet_stop; t->et.et_priv = &sc->t[i]; Modified: head/sys/kern/kern_clocksource.c ============================================================================== --- head/sys/kern/kern_clocksource.c Tue Jul 20 15:34:27 2010 (r210297) +++ head/sys/kern/kern_clocksource.c Tue Jul 20 15:48:29 2010 (r210298) @@ -299,14 +299,14 @@ round_freq(struct eventtimer *et, int fr uint64_t div; if (et->et_frequency != 0) { - div = (et->et_frequency + freq / 2) / freq; + div = lmax((et->et_frequency + freq / 2) / freq, 1); if (et->et_flags & ET_FLAGS_POW2DIV) div = 1 << (flsl(div + div / 2) - 1); freq = (et->et_frequency + div / 2) / div; } if (et->et_min_period.sec > 0) freq = 0; - else if (et->et_max_period.frac != 0) + else if (et->et_min_period.frac != 0) freq = min(freq, BT2FREQ(&et->et_min_period)); if (et->et_max_period.sec == 0 && et->et_max_period.frac != 0) freq = max(freq, BT2FREQ(&et->et_max_period)); @@ -365,6 +365,7 @@ cpu_initclocks_bsp(void) stathz = round_freq(timer[1], 127); profhz = round_freq(timer[1], stathz * 64); } + tick = 1000000 / hz; ET_LOCK(); cpu_restartclocks(); ET_UNLOCK(); Modified: head/sys/x86/isa/atrtc.c ============================================================================== --- head/sys/x86/isa/atrtc.c Tue Jul 20 15:34:27 2010 (r210297) +++ head/sys/x86/isa/atrtc.c Tue Jul 20 15:48:29 2010 (r210298) @@ -280,9 +280,9 @@ atrtc_attach(device_t dev) sc->et.et_quality = 0; sc->et.et_frequency = 32768; sc->et.et_min_period.sec = 0; - sc->et.et_min_period.frac = 0x0008LL << 48; + sc->et.et_min_period.frac = 0x0008LLU << 48; sc->et.et_max_period.sec = 0; - sc->et.et_max_period.frac = 0x8000LL << 48; + sc->et.et_max_period.frac = 0x8000LLU << 48; sc->et.et_start = rtc_start; sc->et.et_stop = rtc_stop; sc->et.et_priv = dev; Modified: head/sys/x86/isa/clock.c ============================================================================== --- head/sys/x86/isa/clock.c Tue Jul 20 15:34:27 2010 (r210297) +++ head/sys/x86/isa/clock.c Tue Jul 20 15:48:29 2010 (r210298) @@ -666,10 +666,11 @@ attimer_attach(device_t dev) sc->et.et_quality = 100; sc->et.et_frequency = i8254_freq; sc->et.et_min_period.sec = 0; - sc->et.et_min_period.frac = ((1LL << 62) / i8254_freq) << 2; + sc->et.et_min_period.frac = + ((0x0002LLU << 48) / i8254_freq) << 16; sc->et.et_max_period.sec = 0xffff / i8254_freq; sc->et.et_max_period.frac = - ((0xffffLL << 48) / i8254_freq) << 16; + ((0xfffeLLU << 48) / i8254_freq) << 16; sc->et.et_start = attimer_start; sc->et.et_stop = attimer_stop; sc->et.et_priv = dev; Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Tue Jul 20 15:34:27 2010 (r210297) +++ head/sys/x86/x86/local_apic.c Tue Jul 20 15:48:29 2010 (r210298) @@ -500,10 +500,10 @@ lapic_et_start(struct eventtimer *et, et->et_frequency = value; et->et_min_period.sec = 0; et->et_min_period.frac = - ((1LL << 63) / et->et_frequency) << 1; - et->et_max_period.sec = 0xffffffff / et->et_frequency; + ((0x00000002LLU << 32) / et->et_frequency) << 32; + et->et_max_period.sec = 0xfffffffeLLU / et->et_frequency; et->et_max_period.frac = - ((0xffffffffLL << 32) / et->et_frequency) << 32; + ((0xfffffffeLLU << 32) / et->et_frequency) << 32; } la = &lapics[lapic_id()]; /* From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 16:57:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0B43106568B; Tue, 20 Jul 2010 16:57:35 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pv0-f182.google.com (mail-pv0-f182.google.com [74.125.83.182]) by mx1.freebsd.org (Postfix) with ESMTP id 7EF448FC12; Tue, 20 Jul 2010 16:57:35 +0000 (UTC) Received: by pvh1 with SMTP id 1so2581830pvh.13 for ; Tue, 20 Jul 2010 09:57:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=Mhkkym+9p5yoGKk4B7w7XHu0FQ6z2htrzdxeOD4hGX0=; b=HmeWOnAnJaJH7uNoOvEMfKZnmDFAi/djgkFVxr9luqLsHGHJC/G8W116bxHjuBzrmp vkcWHh0RfX/cKZYSxlySNyoCBg+rddp5BBbQW7CZ+t+Z9oyREM6s28X7Xsugo785q/G0 Z0xhMax4/8CGeW2RL8qHzwOpPbwajE0A+Kc8E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=yEdvPyIdsHRGgovDeDGEDOQTs+HZ1m2mIs2IOO8hgf9iYZ3B27JaXN/WsGMUDf7sTF dAxjN4hC2ORn2N9AJMazCLzaV7G4qNoJvsMybpdp3w5hF4suvJUjH4X2Qn2wQ1Zkev1w yUy3Wh+Xl7BlHwulBIGlH+D06DjHH1DGEnXIc= Received: by 10.142.140.20 with SMTP id n20mr9665808wfd.334.1279645044098; Tue, 20 Jul 2010 09:57:24 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id n2sm7961000wfl.1.2010.07.20.09.57.22 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 20 Jul 2010 09:57:22 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Tue, 20 Jul 2010 09:56:32 -0700 From: Pyun YongHyeon Date: Tue, 20 Jul 2010 09:56:32 -0700 To: "Bjoern A. Zeeb" Message-ID: <20100720165632.GA6631@michelle.cdnetworks.com> References: <201007192141.o6JLfsr3090971@svn.freebsd.org> <20100720101118.H57851@maildrop.int.zabbadoz.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100720101118.H57851@maildrop.int.zabbadoz.net> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Pyun YongHyeon Subject: Re: svn commit: r210263 - head/sys/dev/bce X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 16:57:35 -0000 On Tue, Jul 20, 2010 at 10:13:03AM +0000, Bjoern A. Zeeb wrote: > On Mon, 19 Jul 2010, Pyun YongHyeon wrote: > > >Author: yongari > >Date: Mon Jul 19 21:41:54 2010 > >New Revision: 210263 > >URL: http://svn.freebsd.org/changeset/base/210263 > > > >Log: > > Do not report current link state if interface is not UP. > > > Hmm, not sure what exactly the code change does but by your > description I think I would like to be able to see a porper (updated) > result in the media: line of ifconfig no matter if it's UP or not. > > If this doesn't change that behaviour, just ignore me;) > I'm afraid this change will effectively disable that feature. Why you need to know current link state if interface is DOWN? Note, the reported link state, when interface is in DOWN, could be wrong because driver will restart auto-negotiation. With this change it will just say current media. BEFORE this change: bce3: flags=8802 metric 0 mtu 1500 options=c01bb ether 00:10:18:3e:13:3e media: Ethernet autoselect (none) status: no carrier OR if it manage to establish link: bce3: flags=8802 metric 0 mtu 1500 options=c01bb ether 00:10:18:3e:13:3e media: Ethernet autoselect (1000baseT ) status: active AFTER this change: bce3: flags=8802 metric 0 mtu 1500 options=c01bb ether 00:10:18:3e:13:3e media: Ethernet autoselect From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 17:16:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF6481065690; Tue, 20 Jul 2010 17:16:58 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D87C18FC0A; Tue, 20 Jul 2010 17:16:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KHGwX1057696; Tue, 20 Jul 2010 17:16:58 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KHGwPG057676; Tue, 20 Jul 2010 17:16:58 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201007201716.o6KHGwPG057676@svn.freebsd.org> From: Ed Schouten Date: Tue, 20 Jul 2010 17:16:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210299 - in head: . contrib/llvm contrib/llvm/autoconf contrib/llvm/autoconf/m4 contrib/llvm/bindings/ada/llvm contrib/llvm/include/llvm contrib/llvm/include/llvm-c contrib/llvm/includ... X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 17:16:59 -0000 Author: ed Date: Tue Jul 20 17:16:57 2010 New Revision: 210299 URL: http://svn.freebsd.org/changeset/base/210299 Log: Upgrade our Clang in base to r108428. This commit merges the latest LLVM sources from the vendor space. It also updates the build glue to match the new sources. Clang's version number is changed to match LLVM's, which means /usr/include/clang/2.0 has been renamed to /usr/include/clang/2.8. Obtained from: projects/clangbsd Added: head/contrib/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h - copied unchanged from r210288, vendor/llvm/dist/include/llvm/ADT/DAGDeltaAlgorithm.h head/contrib/llvm/include/llvm/Analysis/CodeMetrics.h - copied unchanged from r210288, vendor/llvm/dist/include/llvm/Analysis/CodeMetrics.h head/contrib/llvm/include/llvm/Analysis/Loads.h - copied unchanged from r210288, vendor/llvm/dist/include/llvm/Analysis/Loads.h head/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h - copied unchanged from r210288, vendor/llvm/dist/include/llvm/CodeGen/FunctionLoweringInfo.h head/contrib/llvm/include/llvm/CodeGen/PostRAHazardRecognizer.h - copied unchanged from r210288, vendor/llvm/dist/include/llvm/CodeGen/PostRAHazardRecognizer.h head/contrib/llvm/include/llvm/MC/MCObjectStreamer.h - copied unchanged from r210288, vendor/llvm/dist/include/llvm/MC/MCObjectStreamer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParserExtension.h - copied unchanged from r210288, vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParserExtension.h head/contrib/llvm/include/llvm/Support/COFF.h - copied unchanged from r210288, vendor/llvm/dist/include/llvm/Support/COFF.h head/contrib/llvm/include/llvm/Target/TargetCallingConv.h - copied unchanged from r210288, vendor/llvm/dist/include/llvm/Target/TargetCallingConv.h head/contrib/llvm/lib/Analysis/Loads.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/Analysis/Loads.cpp head/contrib/llvm/lib/CodeGen/CallingConvLower.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/CodeGen/CallingConvLower.cpp head/contrib/llvm/lib/CodeGen/InlineSpiller.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/CodeGen/InlineSpiller.cpp head/contrib/llvm/lib/CodeGen/PostRAHazardRecognizer.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/CodeGen/PostRAHazardRecognizer.cpp head/contrib/llvm/lib/MC/MCObjectStreamer.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/MC/MCObjectStreamer.cpp head/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/MC/MCParser/DarwinAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/MC/MCParser/ELFAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/MCAsmParserExtension.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/MC/MCParser/MCAsmParserExtension.cpp head/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp head/contrib/llvm/lib/MC/WinCOFFStreamer.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/MC/WinCOFFStreamer.cpp head/contrib/llvm/lib/Support/DAGDeltaAlgorithm.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/Support/DAGDeltaAlgorithm.cpp head/contrib/llvm/lib/Target/ARM/Thumb2HazardRecognizer.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/Target/ARM/Thumb2HazardRecognizer.cpp head/contrib/llvm/lib/Target/ARM/Thumb2HazardRecognizer.h - copied unchanged from r210288, vendor/llvm/dist/lib/Target/ARM/Thumb2HazardRecognizer.h head/contrib/llvm/lib/Transforms/Hello/Hello.exports - copied unchanged from r210288, vendor/llvm/dist/lib/Transforms/Hello/Hello.exports head/contrib/llvm/tools/clang/include/clang/Basic/Attr.td - copied unchanged from r210288, vendor/clang/dist/include/clang/Basic/Attr.td head/contrib/llvm/tools/clang/include/clang/Basic/AttrKinds.h - copied unchanged from r210288, vendor/clang/dist/include/clang/Basic/AttrKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/DeclNodes.td - copied unchanged from r210288, vendor/clang/dist/include/clang/Basic/DeclNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td - copied unchanged from r210288, vendor/clang/dist/include/clang/Basic/StmtNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/Version.inc.in - copied unchanged from r210288, vendor/clang/dist/include/clang/Basic/Version.inc.in head/contrib/llvm/tools/clang/include/clang/Basic/arm_neon.td - copied unchanged from r210288, vendor/clang/dist/include/clang/Basic/arm_neon.td head/contrib/llvm/tools/clang/include/clang/Checker/AnalysisConsumer.h - copied unchanged from r210288, vendor/clang/dist/include/clang/Checker/AnalysisConsumer.h head/contrib/llvm/tools/clang/include/clang/Checker/FrontendActions.h - copied unchanged from r210288, vendor/clang/dist/include/clang/Checker/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Checker/PathDiagnosticClients.h - copied unchanged from r210288, vendor/clang/dist/include/clang/Checker/PathDiagnosticClients.h head/contrib/llvm/tools/clang/include/clang/CodeGen/BackendUtil.h - copied unchanged from r210288, vendor/clang/dist/include/clang/CodeGen/BackendUtil.h head/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenAction.h - copied unchanged from r210288, vendor/clang/dist/include/clang/CodeGen/CodeGenAction.h head/contrib/llvm/tools/clang/include/clang/Frontend/AnalyzerOptions.h - copied unchanged from r210288, vendor/clang/dist/include/clang/Frontend/AnalyzerOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h - copied unchanged from r210288, vendor/clang/dist/include/clang/Frontend/CodeGenOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/PCHDeserializationListener.h - copied unchanged from r210288, vendor/clang/dist/include/clang/Frontend/PCHDeserializationListener.h head/contrib/llvm/tools/clang/include/clang/Rewrite/ASTConsumers.h - copied unchanged from r210288, vendor/clang/dist/include/clang/Rewrite/ASTConsumers.h head/contrib/llvm/tools/clang/include/clang/Rewrite/FixItRewriter.h - copied unchanged from r210288, vendor/clang/dist/include/clang/Rewrite/FixItRewriter.h head/contrib/llvm/tools/clang/include/clang/Rewrite/FrontendActions.h - copied unchanged from r210288, vendor/clang/dist/include/clang/Rewrite/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Rewriters.h - copied unchanged from r210288, vendor/clang/dist/include/clang/Rewrite/Rewriters.h head/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp - copied unchanged from r210288, vendor/clang/dist/lib/AST/ExprClassification.cpp head/contrib/llvm/tools/clang/lib/Checker/AnalysisConsumer.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Checker/AnalysisConsumer.cpp head/contrib/llvm/tools/clang/lib/Checker/CStringChecker.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Checker/CStringChecker.cpp head/contrib/llvm/tools/clang/lib/Checker/FrontendActions.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Checker/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Checker/HTMLDiagnostics.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Checker/HTMLDiagnostics.cpp head/contrib/llvm/tools/clang/lib/Checker/IdempotentOperationChecker.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Checker/IdempotentOperationChecker.cpp head/contrib/llvm/tools/clang/lib/Checker/PlistDiagnostics.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Checker/PlistDiagnostics.cpp head/contrib/llvm/tools/clang/lib/Checker/StackAddrLeakChecker.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Checker/StackAddrLeakChecker.cpp head/contrib/llvm/tools/clang/lib/Checker/StreamChecker.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Checker/StreamChecker.cpp head/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp - copied unchanged from r210288, vendor/clang/dist/lib/CodeGen/BackendUtil.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGException.h - copied unchanged from r210288, vendor/clang/dist/lib/CodeGen/CGException.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp - copied unchanged from r210288, vendor/clang/dist/lib/CodeGen/CodeGenAction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp - copied unchanged from r210288, vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/Headers/arm_neon.td - copied unchanged from r210288, vendor/clang/dist/lib/Headers/arm_neon.td head/contrib/llvm/tools/clang/lib/Rewrite/FixItRewriter.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Rewrite/FixItRewriter.cpp head/contrib/llvm/tools/clang/lib/Rewrite/FrontendActions.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Rewrite/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Rewrite/HTMLPrint.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Rewrite/HTMLPrint.cpp head/contrib/llvm/tools/clang/lib/Rewrite/RewriteMacros.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Rewrite/RewriteMacros.cpp head/contrib/llvm/tools/clang/lib/Rewrite/RewriteObjC.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Rewrite/RewriteObjC.cpp head/contrib/llvm/tools/clang/lib/Rewrite/RewriteTest.cpp - copied unchanged from r210288, vendor/clang/dist/lib/Rewrite/RewriteTest.cpp head/contrib/llvm/tools/clang/runtime/ - copied from r210288, vendor/clang/dist/runtime/ head/contrib/llvm/tools/clang/utils/FuzzTest - copied unchanged from r210288, vendor/clang/dist/utils/FuzzTest head/contrib/llvm/utils/TableGen/ClangAttrEmitter.cpp - copied unchanged from r210288, vendor/llvm/dist/utils/TableGen/ClangAttrEmitter.cpp head/contrib/llvm/utils/TableGen/ClangAttrEmitter.h - copied unchanged from r210288, vendor/llvm/dist/utils/TableGen/ClangAttrEmitter.h head/contrib/llvm/utils/TableGen/NeonEmitter.cpp - copied unchanged from r210288, vendor/llvm/dist/utils/TableGen/NeonEmitter.cpp head/contrib/llvm/utils/TableGen/NeonEmitter.h - copied unchanged from r210288, vendor/llvm/dist/utils/TableGen/NeonEmitter.h head/contrib/llvm/utils/unittest/googletest/include/gtest/internal/gtest-tuple.h - copied unchanged from r210288, vendor/llvm/dist/utils/unittest/googletest/include/gtest/internal/gtest-tuple.h head/lib/clang/include/clang/AST/Attrs.inc (contents, props changed) head/lib/clang/include/clang/AST/DeclNodes.inc (contents, props changed) head/lib/clang/include/clang/Basic/AttrList.inc (contents, props changed) head/lib/clang/include/clang/Basic/Version.inc (contents, props changed) head/lib/clang/include/clang/Basic/arm_neon.inc (contents, props changed) head/lib/clang/libllvmasmparser/ head/lib/clang/libllvmasmparser/Makefile (contents, props changed) Replaced: head/contrib/llvm/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp - copied unchanged from r210288, vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDebugRegisterer.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JITDebugRegisterer.h - copied unchanged from r210288, vendor/llvm/dist/lib/ExecutionEngine/JIT/JITDebugRegisterer.h Deleted: head/contrib/llvm/lib/CodeGen/ExactHazardRecognizer.cpp head/contrib/llvm/lib/CodeGen/ExactHazardRecognizer.h head/contrib/llvm/lib/CodeGen/RegAllocLocal.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/CallingConvLower.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.h head/contrib/llvm/lib/CodeGen/SimpleHazardRecognizer.h head/contrib/llvm/lib/Target/X86/X86COFF.h head/contrib/llvm/tools/clang/include/clang/AST/StmtNodes.td head/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/AnalysisConsumer.h head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenAction.h head/contrib/llvm/tools/clang/include/clang/Frontend/FixItRewriter.h head/contrib/llvm/tools/clang/include/clang/Frontend/PathDiagnosticClients.h head/contrib/llvm/tools/clang/lib/Checker/ReturnStackAddressChecker.cpp head/contrib/llvm/tools/clang/lib/Frontend/AnalysisConsumer.cpp head/contrib/llvm/tools/clang/lib/Frontend/CodeGenAction.cpp head/contrib/llvm/tools/clang/lib/Frontend/FixItRewriter.cpp head/contrib/llvm/tools/clang/lib/Frontend/HTMLDiagnostics.cpp head/contrib/llvm/tools/clang/lib/Frontend/HTMLPrint.cpp head/contrib/llvm/tools/clang/lib/Frontend/PlistDiagnostics.cpp head/contrib/llvm/tools/clang/lib/Frontend/RewriteMacros.cpp head/contrib/llvm/tools/clang/lib/Frontend/RewriteObjC.cpp head/contrib/llvm/tools/clang/lib/Frontend/RewriteTest.cpp head/contrib/llvm/tools/clang/lib/Runtime/Makefile Modified: head/ObsoleteFiles.inc head/contrib/llvm/CMakeLists.txt head/contrib/llvm/Makefile head/contrib/llvm/Makefile.config.in head/contrib/llvm/Makefile.rules head/contrib/llvm/autoconf/configure.ac head/contrib/llvm/autoconf/m4/link_options.m4 head/contrib/llvm/bindings/ada/llvm/llvm.ads head/contrib/llvm/configure head/contrib/llvm/include/llvm-c/Core.h head/contrib/llvm/include/llvm-c/Target.h head/contrib/llvm/include/llvm-c/lto.h head/contrib/llvm/include/llvm/ADT/APFloat.h head/contrib/llvm/include/llvm/ADT/APInt.h head/contrib/llvm/include/llvm/ADT/DenseMap.h head/contrib/llvm/include/llvm/ADT/EquivalenceClasses.h head/contrib/llvm/include/llvm/ADT/FoldingSet.h head/contrib/llvm/include/llvm/ADT/ImmutableIntervalMap.h head/contrib/llvm/include/llvm/ADT/PostOrderIterator.h head/contrib/llvm/include/llvm/ADT/SetVector.h head/contrib/llvm/include/llvm/ADT/SmallPtrSet.h head/contrib/llvm/include/llvm/ADT/SmallVector.h head/contrib/llvm/include/llvm/ADT/Statistic.h head/contrib/llvm/include/llvm/ADT/Triple.h head/contrib/llvm/include/llvm/ADT/ValueMap.h head/contrib/llvm/include/llvm/ADT/ilist.h head/contrib/llvm/include/llvm/AbstractTypeUser.h head/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/CFGPrinter.h head/contrib/llvm/include/llvm/Analysis/CaptureTracking.h head/contrib/llvm/include/llvm/Analysis/DebugInfo.h head/contrib/llvm/include/llvm/Analysis/DominatorInternals.h head/contrib/llvm/include/llvm/Analysis/Dominators.h head/contrib/llvm/include/llvm/Analysis/InlineCost.h head/contrib/llvm/include/llvm/Analysis/IntervalIterator.h head/contrib/llvm/include/llvm/Analysis/LoopInfo.h head/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h head/contrib/llvm/include/llvm/Analysis/ValueTracking.h head/contrib/llvm/include/llvm/Bitcode/ReaderWriter.h head/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h head/contrib/llvm/include/llvm/CodeGen/FastISel.h head/contrib/llvm/include/llvm/CodeGen/GCMetadata.h head/contrib/llvm/include/llvm/CodeGen/GCMetadataPrinter.h head/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h head/contrib/llvm/include/llvm/CodeGen/LinkAllCodegenComponents.h head/contrib/llvm/include/llvm/CodeGen/LiveInterval.h head/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h head/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h head/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineFunctionPass.h head/contrib/llvm/include/llvm/CodeGen/MachineInstr.h head/contrib/llvm/include/llvm/CodeGen/MachineJumpTableInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineLoopInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineModuleInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineOperand.h head/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h head/contrib/llvm/include/llvm/CodeGen/Passes.h head/contrib/llvm/include/llvm/CodeGen/ProcessImplicitDefs.h head/contrib/llvm/include/llvm/CodeGen/RegisterCoalescer.h head/contrib/llvm/include/llvm/CodeGen/RegisterScavenging.h head/contrib/llvm/include/llvm/CodeGen/RuntimeLibcalls.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h head/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h head/contrib/llvm/include/llvm/Config/config.h.in head/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h head/contrib/llvm/include/llvm/GlobalValue.h head/contrib/llvm/include/llvm/InlineAsm.h head/contrib/llvm/include/llvm/InstrTypes.h head/contrib/llvm/include/llvm/Instructions.h head/contrib/llvm/include/llvm/IntrinsicInst.h head/contrib/llvm/include/llvm/Intrinsics.td head/contrib/llvm/include/llvm/LinkAllPasses.h head/contrib/llvm/include/llvm/MC/MCAssembler.h head/contrib/llvm/include/llvm/MC/MCContext.h head/contrib/llvm/include/llvm/MC/MCDirectives.h head/contrib/llvm/include/llvm/MC/MCObjectWriter.h head/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/AsmParser.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmParser.h head/contrib/llvm/include/llvm/MC/MCSection.h head/contrib/llvm/include/llvm/MC/MCSectionCOFF.h head/contrib/llvm/include/llvm/MC/MCStreamer.h head/contrib/llvm/include/llvm/MC/SectionKind.h head/contrib/llvm/include/llvm/Module.h head/contrib/llvm/include/llvm/Pass.h head/contrib/llvm/include/llvm/PassAnalysisSupport.h head/contrib/llvm/include/llvm/PassManagers.h head/contrib/llvm/include/llvm/PassSupport.h head/contrib/llvm/include/llvm/Support/CFG.h head/contrib/llvm/include/llvm/Support/CallSite.h head/contrib/llvm/include/llvm/Support/Dwarf.h head/contrib/llvm/include/llvm/Support/ELF.h head/contrib/llvm/include/llvm/Support/IRBuilder.h head/contrib/llvm/include/llvm/Support/IRReader.h head/contrib/llvm/include/llvm/Support/MemoryBuffer.h head/contrib/llvm/include/llvm/Support/Regex.h head/contrib/llvm/include/llvm/Support/StringPool.h head/contrib/llvm/include/llvm/Support/Timer.h head/contrib/llvm/include/llvm/Support/raw_ostream.h head/contrib/llvm/include/llvm/SymbolTableListTraits.h head/contrib/llvm/include/llvm/System/DataTypes.h.cmake head/contrib/llvm/include/llvm/System/Path.h head/contrib/llvm/include/llvm/Target/Target.td head/contrib/llvm/include/llvm/Target/TargetAsmParser.h head/contrib/llvm/include/llvm/Target/TargetInstrDesc.h head/contrib/llvm/include/llvm/Target/TargetInstrInfo.h head/contrib/llvm/include/llvm/Target/TargetInstrItineraries.h head/contrib/llvm/include/llvm/Target/TargetLowering.h head/contrib/llvm/include/llvm/Target/TargetOpcodes.h head/contrib/llvm/include/llvm/Target/TargetOptions.h head/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h head/contrib/llvm/include/llvm/Transforms/IPO.h head/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h head/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h head/contrib/llvm/include/llvm/Transforms/Utils/Local.h head/contrib/llvm/include/llvm/Type.h head/contrib/llvm/include/llvm/Use.h head/contrib/llvm/include/llvm/Value.h head/contrib/llvm/lib/Analysis/AliasAnalysis.cpp head/contrib/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp head/contrib/llvm/lib/Analysis/AliasDebugger.cpp head/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/CMakeLists.txt head/contrib/llvm/lib/Analysis/ConstantFolding.cpp head/contrib/llvm/lib/Analysis/DebugInfo.cpp head/contrib/llvm/lib/Analysis/DomPrinter.cpp head/contrib/llvm/lib/Analysis/IPA/CallGraph.cpp head/contrib/llvm/lib/Analysis/IPA/GlobalsModRef.cpp head/contrib/llvm/lib/Analysis/InlineCost.cpp head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp head/contrib/llvm/lib/Analysis/Lint.cpp head/contrib/llvm/lib/Analysis/LoopInfo.cpp head/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp head/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/PostDominators.cpp head/contrib/llvm/lib/Analysis/ProfileInfo.cpp head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp head/contrib/llvm/lib/Analysis/ValueTracking.cpp head/contrib/llvm/lib/Archive/ArchiveWriter.cpp head/contrib/llvm/lib/AsmParser/LLLexer.cpp head/contrib/llvm/lib/AsmParser/LLParser.cpp head/contrib/llvm/lib/AsmParser/LLParser.h head/contrib/llvm/lib/AsmParser/LLToken.h head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h head/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.h head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h head/contrib/llvm/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp head/contrib/llvm/lib/CodeGen/BranchFolding.cpp head/contrib/llvm/lib/CodeGen/BranchFolding.h head/contrib/llvm/lib/CodeGen/CMakeLists.txt head/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp head/contrib/llvm/lib/CodeGen/CodePlacementOpt.cpp head/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.h head/contrib/llvm/lib/CodeGen/DwarfEHPrepare.cpp head/contrib/llvm/lib/CodeGen/ELFCodeEmitter.cpp head/contrib/llvm/lib/CodeGen/GCStrategy.cpp head/contrib/llvm/lib/CodeGen/IfConversion.cpp head/contrib/llvm/lib/CodeGen/IntrinsicLowering.cpp head/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp head/contrib/llvm/lib/CodeGen/LatencyPriorityQueue.cpp head/contrib/llvm/lib/CodeGen/LiveInterval.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp head/contrib/llvm/lib/CodeGen/LiveStackAnalysis.cpp head/contrib/llvm/lib/CodeGen/LiveVariables.cpp head/contrib/llvm/lib/CodeGen/LowerSubregs.cpp head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp head/contrib/llvm/lib/CodeGen/MachineCSE.cpp head/contrib/llvm/lib/CodeGen/MachineDominators.cpp head/contrib/llvm/lib/CodeGen/MachineFunction.cpp head/contrib/llvm/lib/CodeGen/MachineInstr.cpp head/contrib/llvm/lib/CodeGen/MachineLICM.cpp head/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp head/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp head/contrib/llvm/lib/CodeGen/MachineSink.cpp head/contrib/llvm/lib/CodeGen/MachineVerifier.cpp head/contrib/llvm/lib/CodeGen/OptimizeExts.cpp head/contrib/llvm/lib/CodeGen/OptimizePHIs.cpp head/contrib/llvm/lib/CodeGen/PBQP/HeuristicSolver.h head/contrib/llvm/lib/CodeGen/PBQP/Heuristics/Briggs.h head/contrib/llvm/lib/CodeGen/PHIElimination.cpp head/contrib/llvm/lib/CodeGen/Passes.cpp head/contrib/llvm/lib/CodeGen/PostRASchedulerList.cpp head/contrib/llvm/lib/CodeGen/PreAllocSplitting.cpp head/contrib/llvm/lib/CodeGen/ProcessImplicitDefs.cpp head/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp head/contrib/llvm/lib/CodeGen/RegAllocFast.cpp head/contrib/llvm/lib/CodeGen/RegAllocLinearScan.cpp head/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp head/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp head/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAG.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGEmit.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.h head/contrib/llvm/lib/CodeGen/SelectionDAG/CMakeLists.txt head/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGPrinter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp head/contrib/llvm/lib/CodeGen/ShadowStackGC.cpp head/contrib/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp head/contrib/llvm/lib/CodeGen/SimpleRegisterCoalescing.h head/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp head/contrib/llvm/lib/CodeGen/SlotIndexes.cpp head/contrib/llvm/lib/CodeGen/Spiller.cpp head/contrib/llvm/lib/CodeGen/Spiller.h head/contrib/llvm/lib/CodeGen/StackProtector.cpp head/contrib/llvm/lib/CodeGen/StackSlotColoring.cpp head/contrib/llvm/lib/CodeGen/StrongPHIElimination.cpp head/contrib/llvm/lib/CodeGen/TailDuplication.cpp head/contrib/llvm/lib/CodeGen/TargetInstrInfoImpl.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp head/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp head/contrib/llvm/lib/CodeGen/VirtRegRewriter.cpp head/contrib/llvm/lib/CompilerDriver/Tool.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/Execution.cpp head/contrib/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JIT.cpp head/contrib/llvm/lib/ExecutionEngine/JIT/JIT.h head/contrib/llvm/lib/ExecutionEngine/JIT/JITEmitter.cpp head/contrib/llvm/lib/Linker/LinkItems.cpp head/contrib/llvm/lib/MC/CMakeLists.txt head/contrib/llvm/lib/MC/MCAsmStreamer.cpp head/contrib/llvm/lib/MC/MCAssembler.cpp head/contrib/llvm/lib/MC/MCContext.cpp head/contrib/llvm/lib/MC/MCExpr.cpp head/contrib/llvm/lib/MC/MCMachOStreamer.cpp head/contrib/llvm/lib/MC/MCParser/AsmLexer.cpp head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp head/contrib/llvm/lib/MC/MCParser/CMakeLists.txt head/contrib/llvm/lib/MC/MCParser/MCAsmLexer.cpp head/contrib/llvm/lib/MC/MCParser/MCAsmParser.cpp head/contrib/llvm/lib/MC/MCSectionCOFF.cpp head/contrib/llvm/lib/MC/MachObjectWriter.cpp head/contrib/llvm/lib/Support/APFloat.cpp head/contrib/llvm/lib/Support/APInt.cpp head/contrib/llvm/lib/Support/CMakeLists.txt head/contrib/llvm/lib/Support/DeltaAlgorithm.cpp head/contrib/llvm/lib/Support/Dwarf.cpp head/contrib/llvm/lib/Support/FileUtilities.cpp head/contrib/llvm/lib/Support/FoldingSet.cpp head/contrib/llvm/lib/Support/MemoryBuffer.cpp head/contrib/llvm/lib/Support/PrettyStackTrace.cpp head/contrib/llvm/lib/Support/Regex.cpp head/contrib/llvm/lib/Support/SmallPtrSet.cpp head/contrib/llvm/lib/Support/SmallVector.cpp head/contrib/llvm/lib/Support/StringPool.cpp head/contrib/llvm/lib/Support/Timer.cpp head/contrib/llvm/lib/Support/Triple.cpp head/contrib/llvm/lib/Support/raw_ostream.cpp head/contrib/llvm/lib/System/Disassembler.cpp head/contrib/llvm/lib/System/Path.cpp head/contrib/llvm/lib/System/Unix/Path.inc head/contrib/llvm/lib/System/Unix/Program.inc head/contrib/llvm/lib/System/Unix/Signals.inc head/contrib/llvm/lib/System/Win32/Path.inc head/contrib/llvm/lib/System/Win32/Signals.inc head/contrib/llvm/lib/Target/ARM/ARM.h head/contrib/llvm/lib/Target/ARM/ARM.td head/contrib/llvm/lib/Target/ARM/ARMAddressingModes.h head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h head/contrib/llvm/lib/Target/ARM/ARMCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.h head/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.h head/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.h head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td head/contrib/llvm/lib/Target/ARM/ARMInstrNEON.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td head/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td head/contrib/llvm/lib/Target/ARM/ARMJITInfo.h head/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h head/contrib/llvm/lib/Target/ARM/ARMRegisterInfo.td head/contrib/llvm/lib/Target/ARM/ARMScheduleA8.td head/contrib/llvm/lib/Target/ARM/ARMScheduleA9.td head/contrib/llvm/lib/Target/ARM/ARMScheduleV6.td head/contrib/llvm/lib/Target/ARM/ARMSubtarget.h head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp head/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp head/contrib/llvm/lib/Target/ARM/AsmPrinter/ARMAsmPrinter.cpp head/contrib/llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.cpp head/contrib/llvm/lib/Target/ARM/AsmPrinter/ARMInstPrinter.h head/contrib/llvm/lib/Target/ARM/CMakeLists.txt head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassemblerCore.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassemblerCore.h head/contrib/llvm/lib/Target/ARM/Disassembler/ThumbDisassemblerCore.h head/contrib/llvm/lib/Target/ARM/NEONMoveFix.cpp head/contrib/llvm/lib/Target/ARM/NEONPreAllocPass.cpp head/contrib/llvm/lib/Target/ARM/README.txt head/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.h head/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1RegisterInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp head/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp head/contrib/llvm/lib/Target/Alpha/AlphaISelLowering.cpp head/contrib/llvm/lib/Target/Alpha/AlphaISelLowering.h head/contrib/llvm/lib/Target/Alpha/AlphaInstrFormats.td head/contrib/llvm/lib/Target/Alpha/AlphaInstrInfo.cpp head/contrib/llvm/lib/Target/Alpha/AlphaInstrInfo.h head/contrib/llvm/lib/Target/Alpha/AlphaInstrInfo.td head/contrib/llvm/lib/Target/Alpha/AlphaMCAsmInfo.cpp head/contrib/llvm/lib/Target/Alpha/AlphaMCAsmInfo.h head/contrib/llvm/lib/Target/Alpha/AlphaRegisterInfo.cpp head/contrib/llvm/lib/Target/Alpha/AlphaRegisterInfo.h head/contrib/llvm/lib/Target/Blackfin/BlackfinISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinISelLowering.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinISelLowering.h head/contrib/llvm/lib/Target/Blackfin/BlackfinInstrInfo.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinInstrInfo.h head/contrib/llvm/lib/Target/Blackfin/BlackfinInstrInfo.td head/contrib/llvm/lib/Target/Blackfin/BlackfinMCAsmInfo.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinMCAsmInfo.h head/contrib/llvm/lib/Target/Blackfin/BlackfinRegisterInfo.cpp head/contrib/llvm/lib/Target/Blackfin/BlackfinRegisterInfo.h head/contrib/llvm/lib/Target/CBackend/CBackend.cpp head/contrib/llvm/lib/Target/CellSPU/SPUCallingConv.td head/contrib/llvm/lib/Target/CellSPU/SPUFrameInfo.h head/contrib/llvm/lib/Target/CellSPU/SPUISelDAGToDAG.cpp head/contrib/llvm/lib/Target/CellSPU/SPUISelLowering.cpp head/contrib/llvm/lib/Target/CellSPU/SPUISelLowering.h head/contrib/llvm/lib/Target/CellSPU/SPUInstrInfo.cpp head/contrib/llvm/lib/Target/CellSPU/SPUInstrInfo.h head/contrib/llvm/lib/Target/CellSPU/SPUMCAsmInfo.cpp head/contrib/llvm/lib/Target/CellSPU/SPUMCAsmInfo.h head/contrib/llvm/lib/Target/CellSPU/SPUNodes.td head/contrib/llvm/lib/Target/CellSPU/SPURegisterInfo.cpp head/contrib/llvm/lib/Target/CellSPU/SPURegisterInfo.h head/contrib/llvm/lib/Target/CppBackend/CPPBackend.cpp head/contrib/llvm/lib/Target/MBlaze/AsmPrinter/MBlazeAsmPrinter.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeISelLowering.h head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeInstrInfo.h head/contrib/llvm/lib/Target/MBlaze/MBlazeMCAsmInfo.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeMCAsmInfo.h head/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.cpp head/contrib/llvm/lib/Target/MBlaze/MBlazeRegisterInfo.h head/contrib/llvm/lib/Target/MSIL/MSILWriter.cpp head/contrib/llvm/lib/Target/MSIL/MSILWriter.h head/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.h head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.td head/contrib/llvm/lib/Target/MSP430/MSP430MCAsmInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430MCAsmInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430RegisterInfo.h head/contrib/llvm/lib/Target/Mangler.cpp head/contrib/llvm/lib/Target/Mips/AsmPrinter/MipsAsmPrinter.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsMCAsmInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsMCAsmInfo.h head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h head/contrib/llvm/lib/Target/PIC16/PIC16DebugInfo.cpp head/contrib/llvm/lib/Target/PIC16/PIC16ISelLowering.cpp head/contrib/llvm/lib/Target/PIC16/PIC16ISelLowering.h head/contrib/llvm/lib/Target/PIC16/PIC16InstrInfo.cpp head/contrib/llvm/lib/Target/PIC16/PIC16InstrInfo.h head/contrib/llvm/lib/Target/PIC16/PIC16InstrInfo.td head/contrib/llvm/lib/Target/PIC16/PIC16MCAsmInfo.cpp head/contrib/llvm/lib/Target/PIC16/PIC16MCAsmInfo.h head/contrib/llvm/lib/Target/PIC16/PIC16MemSelOpt.cpp head/contrib/llvm/lib/Target/PIC16/PIC16Passes/PIC16Cloner.cpp head/contrib/llvm/lib/Target/PIC16/PIC16Passes/PIC16Cloner.h head/contrib/llvm/lib/Target/PIC16/PIC16RegisterInfo.cpp head/contrib/llvm/lib/Target/PIC16/PIC16RegisterInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h head/contrib/llvm/lib/Target/README.txt head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.h head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td head/contrib/llvm/lib/Target/Sparc/SparcMCAsmInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcMCAsmInfo.h head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.h head/contrib/llvm/lib/Target/SystemZ/AsmPrinter/SystemZAsmPrinter.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.h head/contrib/llvm/lib/Target/SystemZ/SystemZInstrFP.td head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.td head/contrib/llvm/lib/Target/SystemZ/SystemZMCAsmInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZMCAsmInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.td head/contrib/llvm/lib/Target/TargetInstrInfo.cpp head/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp head/contrib/llvm/lib/Target/TargetMachine.cpp head/contrib/llvm/lib/Target/TargetRegisterInfo.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmLexer.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp head/contrib/llvm/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.cpp head/contrib/llvm/lib/Target/X86/AsmPrinter/X86ATTInstPrinter.h head/contrib/llvm/lib/Target/X86/AsmPrinter/X86AsmPrinter.cpp head/contrib/llvm/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.cpp head/contrib/llvm/lib/Target/X86/AsmPrinter/X86IntelInstPrinter.h head/contrib/llvm/lib/Target/X86/AsmPrinter/X86MCInstLower.cpp head/contrib/llvm/lib/Target/X86/Disassembler/CMakeLists.txt head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp head/contrib/llvm/lib/Target/X86/README-SSE.txt head/contrib/llvm/lib/Target/X86/README-X86-64.txt head/contrib/llvm/lib/Target/X86/README.txt head/contrib/llvm/lib/Target/X86/X86.h head/contrib/llvm/lib/Target/X86/X86AsmBackend.cpp head/contrib/llvm/lib/Target/X86/X86CallingConv.td head/contrib/llvm/lib/Target/X86/X86CodeEmitter.cpp head/contrib/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm/lib/Target/X86/X86FixupKinds.h head/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp head/contrib/llvm/lib/Target/X86/X86FloatingPointRegKill.cpp head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.h head/contrib/llvm/lib/Target/X86/X86Instr64bit.td head/contrib/llvm/lib/Target/X86/X86InstrBuilder.h head/contrib/llvm/lib/Target/X86/X86InstrFPStack.td head/contrib/llvm/lib/Target/X86/X86InstrFormats.td head/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp head/contrib/llvm/lib/Target/X86/X86InstrInfo.h head/contrib/llvm/lib/Target/X86/X86InstrInfo.td head/contrib/llvm/lib/Target/X86/X86InstrMMX.td head/contrib/llvm/lib/Target/X86/X86InstrSSE.td head/contrib/llvm/lib/Target/X86/X86MCCodeEmitter.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.h head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp head/contrib/llvm/lib/Target/X86/X86Subtarget.h head/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm/lib/Target/XCore/AsmPrinter/XCoreAsmPrinter.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.h head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.h head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.td head/contrib/llvm/lib/Target/XCore/XCoreMCAsmInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreMCAsmInfo.h head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreRegisterInfo.h head/contrib/llvm/lib/Transforms/Hello/Hello.cpp head/contrib/llvm/lib/Transforms/Hello/Makefile head/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp head/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp head/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp head/contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp head/contrib/llvm/lib/Transforms/IPO/Inliner.cpp head/contrib/llvm/lib/Transforms/IPO/LowerSetJmp.cpp head/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp head/contrib/llvm/lib/Transforms/IPO/PartialInlining.cpp head/contrib/llvm/lib/Transforms/IPO/PartialSpecialization.cpp head/contrib/llvm/lib/Transforms/IPO/StripSymbols.cpp head/contrib/llvm/lib/Transforms/IPO/StructRetPromotion.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombine.h head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp head/contrib/llvm/lib/Transforms/Instrumentation/OptimalEdgeProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/ProfilingUtils.cpp head/contrib/llvm/lib/Transforms/Scalar/ABCD.cpp head/contrib/llvm/lib/Transforms/Scalar/ADCE.cpp head/contrib/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp head/contrib/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp head/contrib/llvm/lib/Transforms/Scalar/GVN.cpp head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopDeletion.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopIndexSplit.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp head/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp head/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp head/contrib/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp head/contrib/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp head/contrib/llvm/lib/Transforms/Scalar/SimplifyLibCalls.cpp head/contrib/llvm/lib/Transforms/Scalar/TailDuplication.cpp head/contrib/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp head/contrib/llvm/lib/Transforms/Utils/AddrModeMatcher.cpp head/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp head/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp head/contrib/llvm/lib/Transforms/Utils/BuildLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp head/contrib/llvm/lib/Transforms/Utils/CloneLoop.cpp head/contrib/llvm/lib/Transforms/Utils/CloneModule.cpp head/contrib/llvm/lib/Transforms/Utils/DemoteRegToStack.cpp head/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp head/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp head/contrib/llvm/lib/Transforms/Utils/Local.cpp head/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp head/contrib/llvm/lib/Transforms/Utils/LowerInvoke.cpp head/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp head/contrib/llvm/lib/Transforms/Utils/ValueMapper.cpp head/contrib/llvm/lib/Transforms/Utils/ValueMapper.h head/contrib/llvm/lib/VMCore/AsmWriter.cpp head/contrib/llvm/lib/VMCore/AutoUpgrade.cpp head/contrib/llvm/lib/VMCore/ConstantFold.cpp head/contrib/llvm/lib/VMCore/Core.cpp head/contrib/llvm/lib/VMCore/Instruction.cpp head/contrib/llvm/lib/VMCore/Instructions.cpp head/contrib/llvm/lib/VMCore/IntrinsicInst.cpp head/contrib/llvm/lib/VMCore/Metadata.cpp head/contrib/llvm/lib/VMCore/Module.cpp head/contrib/llvm/lib/VMCore/Pass.cpp head/contrib/llvm/lib/VMCore/PassManager.cpp head/contrib/llvm/lib/VMCore/Value.cpp head/contrib/llvm/lib/VMCore/Verifier.cpp head/contrib/llvm/tools/Makefile head/contrib/llvm/tools/bugpoint/BugDriver.h head/contrib/llvm/tools/bugpoint/CrashDebugger.cpp head/contrib/llvm/tools/bugpoint/ExtractFunction.cpp head/contrib/llvm/tools/bugpoint/ListReducer.h head/contrib/llvm/tools/bugpoint/Miscompilation.cpp head/contrib/llvm/tools/bugpoint/ToolRunner.h head/contrib/llvm/tools/clang/CMakeLists.txt head/contrib/llvm/tools/clang/Makefile head/contrib/llvm/tools/clang/NOTES.txt head/contrib/llvm/tools/clang/README.txt head/contrib/llvm/tools/clang/include/Makefile head/contrib/llvm/tools/clang/include/clang-c/Index.h head/contrib/llvm/tools/clang/include/clang-c/Makefile head/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h head/contrib/llvm/tools/clang/include/clang/AST/Attr.h head/contrib/llvm/tools/clang/include/clang/AST/CMakeLists.txt head/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h head/contrib/llvm/tools/clang/include/clang/AST/Decl.h head/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h head/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h head/contrib/llvm/tools/clang/include/clang/AST/DeclFriend.h head/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h head/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h head/contrib/llvm/tools/clang/include/clang/AST/DeclVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Expr.h head/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h head/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h head/contrib/llvm/tools/clang/include/clang/AST/Makefile head/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Redeclarable.h head/contrib/llvm/tools/clang/include/clang/AST/Stmt.h head/contrib/llvm/tools/clang/include/clang/AST/StmtIterator.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateName.h head/contrib/llvm/tools/clang/include/clang/AST/Type.h head/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h head/contrib/llvm/tools/clang/include/clang/AST/TypeLocBuilder.h head/contrib/llvm/tools/clang/include/clang/AST/TypeNodes.def head/contrib/llvm/tools/clang/include/clang/AST/UsuallyTinyPtrVector.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/PrintfFormatString.h head/contrib/llvm/tools/clang/include/clang/Analysis/Support/BumpVector.h head/contrib/llvm/tools/clang/include/clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsPPC.def head/contrib/llvm/tools/clang/include/clang/Basic/CMakeLists.txt head/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h head/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/Makefile head/contrib/llvm/tools/clang/include/clang/Basic/PartialDiagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/Version.h head/contrib/llvm/tools/clang/include/clang/Checker/BugReporter/BugReporter.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/Checker.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/CheckerVisitor.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/Environment.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/ExplodedGraph.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/GRCoreEngine.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/GRExprEngine.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/GRState.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/GRSubEngine.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/GRTransferFuncs.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/MemRegion.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/SVals.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/SValuator.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/Store.h head/contrib/llvm/tools/clang/include/clang/Checker/PathSensitive/SymbolManager.h head/contrib/llvm/tools/clang/include/clang/CodeGen/ModuleBuilder.h head/contrib/llvm/tools/clang/include/clang/Driver/Action.h head/contrib/llvm/tools/clang/include/clang/Driver/Arg.h head/contrib/llvm/tools/clang/include/clang/Driver/ArgList.h head/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td head/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h head/contrib/llvm/tools/clang/include/clang/Driver/Driver.h head/contrib/llvm/tools/clang/include/clang/Driver/HostInfo.h head/contrib/llvm/tools/clang/include/clang/Driver/Makefile head/contrib/llvm/tools/clang/include/clang/Driver/OptTable.h head/contrib/llvm/tools/clang/include/clang/Driver/Option.h head/contrib/llvm/tools/clang/include/clang/Driver/Options.td head/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h head/contrib/llvm/tools/clang/include/clang/Driver/Types.def head/contrib/llvm/tools/clang/include/clang/Driver/Types.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTConsumers.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h head/contrib/llvm/tools/clang/include/clang/Frontend/DiagnosticOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendPluginRegistry.h head/contrib/llvm/tools/clang/include/clang/Frontend/PCHBitCodes.h head/contrib/llvm/tools/clang/include/clang/Frontend/PCHReader.h head/contrib/llvm/tools/clang/include/clang/Frontend/PCHWriter.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/TypeXML.def head/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h head/contrib/llvm/tools/clang/include/clang/Index/CallGraph.h head/contrib/llvm/tools/clang/include/clang/Index/Entity.h head/contrib/llvm/tools/clang/include/clang/Index/Indexer.h head/contrib/llvm/tools/clang/include/clang/Index/TranslationUnit.h head/contrib/llvm/tools/clang/include/clang/Lex/PPCallbacks.h head/contrib/llvm/tools/clang/include/clang/Lex/Pragma.h head/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h head/contrib/llvm/tools/clang/include/clang/Lex/Token.h head/contrib/llvm/tools/clang/include/clang/Makefile head/contrib/llvm/tools/clang/include/clang/Parse/Action.h head/contrib/llvm/tools/clang/include/clang/Parse/AttributeList.h head/contrib/llvm/tools/clang/include/clang/Parse/DeclSpec.h head/contrib/llvm/tools/clang/include/clang/Parse/Parser.h head/contrib/llvm/tools/clang/include/clang/Parse/Template.h head/contrib/llvm/tools/clang/include/clang/Rewrite/RewriteRope.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Rewriter.h head/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h head/contrib/llvm/tools/clang/include/clang/Sema/ExternalSemaSource.h head/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp head/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp head/contrib/llvm/tools/clang/lib/AST/AttrImpl.cpp head/contrib/llvm/tools/clang/lib/AST/CMakeLists.txt head/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp head/contrib/llvm/tools/clang/lib/AST/Decl.cpp head/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp head/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp head/contrib/llvm/tools/clang/lib/AST/DeclFriend.cpp head/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp head/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp head/contrib/llvm/tools/clang/lib/AST/Expr.cpp head/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp head/contrib/llvm/tools/clang/lib/AST/Makefile head/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/AST/Stmt.cpp head/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateBase.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateName.cpp head/contrib/llvm/tools/clang/lib/AST/Type.cpp head/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp head/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp head/contrib/llvm/tools/clang/lib/Analysis/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Analysis/LiveVariables.cpp head/contrib/llvm/tools/clang/lib/Analysis/Makefile head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp head/contrib/llvm/tools/clang/lib/Basic/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp head/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp head/contrib/llvm/tools/clang/lib/Basic/Makefile head/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp head/contrib/llvm/tools/clang/lib/Checker/AttrNonNullChecker.cpp head/contrib/llvm/tools/clang/lib/Checker/BasicConstraintManager.cpp head/contrib/llvm/tools/clang/lib/Checker/BasicObjCFoundationChecks.cpp head/contrib/llvm/tools/clang/lib/Checker/BasicObjCFoundationChecks.h head/contrib/llvm/tools/clang/lib/Checker/BasicStore.cpp head/contrib/llvm/tools/clang/lib/Checker/BugReporter.cpp head/contrib/llvm/tools/clang/lib/Checker/BuiltinFunctionChecker.cpp head/contrib/llvm/tools/clang/lib/Checker/CFRefCount.cpp head/contrib/llvm/tools/clang/lib/Checker/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Checker/CallInliner.cpp head/contrib/llvm/tools/clang/lib/Checker/CastSizeChecker.cpp head/contrib/llvm/tools/clang/lib/Checker/CheckSecuritySyntaxOnly.cpp head/contrib/llvm/tools/clang/lib/Checker/Environment.cpp head/contrib/llvm/tools/clang/lib/Checker/FlatStore.cpp head/contrib/llvm/tools/clang/lib/Checker/GRCoreEngine.cpp head/contrib/llvm/tools/clang/lib/Checker/GRExprEngine.cpp head/contrib/llvm/tools/clang/lib/Checker/GRExprEngineExperimentalChecks.cpp head/contrib/llvm/tools/clang/lib/Checker/GRExprEngineExperimentalChecks.h head/contrib/llvm/tools/clang/lib/Checker/GRExprEngineInternalChecks.h head/contrib/llvm/tools/clang/lib/Checker/GRState.cpp head/contrib/llvm/tools/clang/lib/Checker/LLVMConventionsChecker.cpp head/contrib/llvm/tools/clang/lib/Checker/Makefile head/contrib/llvm/tools/clang/lib/Checker/MallocChecker.cpp head/contrib/llvm/tools/clang/lib/Checker/MemRegion.cpp head/contrib/llvm/tools/clang/lib/Checker/OSAtomicChecker.cpp head/contrib/llvm/tools/clang/lib/Checker/PathDiagnostic.cpp head/contrib/llvm/tools/clang/lib/Checker/RangeConstraintManager.cpp head/contrib/llvm/tools/clang/lib/Checker/RegionStore.cpp head/contrib/llvm/tools/clang/lib/Checker/SVals.cpp head/contrib/llvm/tools/clang/lib/Checker/SValuator.cpp head/contrib/llvm/tools/clang/lib/Checker/SimpleConstraintManager.cpp head/contrib/llvm/tools/clang/lib/Checker/SimpleConstraintManager.h head/contrib/llvm/tools/clang/lib/Checker/SimpleSValuator.cpp head/contrib/llvm/tools/clang/lib/Checker/Store.cpp head/contrib/llvm/tools/clang/lib/Checker/SymbolManager.cpp head/contrib/llvm/tools/clang/lib/Checker/VLASizeChecker.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBuilder.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.h head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.h head/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprComplex.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRTTI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGTemporaries.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.h head/contrib/llvm/tools/clang/lib/CodeGen/CMakeLists.txt head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h head/contrib/llvm/tools/clang/lib/CodeGen/GlobalDecl.h head/contrib/llvm/tools/clang/lib/CodeGen/Makefile head/contrib/llvm/tools/clang/lib/CodeGen/Mangle.cpp head/contrib/llvm/tools/clang/lib/CodeGen/Mangle.h head/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Driver/Action.cpp head/contrib/llvm/tools/clang/lib/Driver/Arg.cpp head/contrib/llvm/tools/clang/lib/Driver/ArgList.cpp head/contrib/llvm/tools/clang/lib/Driver/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp head/contrib/llvm/tools/clang/lib/Driver/HostInfo.cpp head/contrib/llvm/tools/clang/lib/Driver/Makefile head/contrib/llvm/tools/clang/lib/Driver/OptTable.cpp head/contrib/llvm/tools/clang/lib/Driver/Option.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp head/contrib/llvm/tools/clang/lib/Driver/Tools.h head/contrib/llvm/tools/clang/lib/Driver/Types.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTMerge.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp head/contrib/llvm/tools/clang/lib/Frontend/BoostConAction.cpp head/contrib/llvm/tools/clang/lib/Frontend/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendOptions.cpp head/contrib/llvm/tools/clang/lib/Frontend/GeneratePCH.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp head/contrib/llvm/tools/clang/lib/Frontend/Makefile head/contrib/llvm/tools/clang/lib/Frontend/PCHReader.cpp head/contrib/llvm/tools/clang/lib/Frontend/PCHReaderDecl.cpp head/contrib/llvm/tools/clang/lib/Frontend/PCHReaderStmt.cpp head/contrib/llvm/tools/clang/lib/Frontend/PCHWriter.cpp head/contrib/llvm/tools/clang/lib/Frontend/PCHWriterDecl.cpp head/contrib/llvm/tools/clang/lib/Frontend/PCHWriterStmt.cpp head/contrib/llvm/tools/clang/lib/Frontend/PrintParserCallbacks.cpp head/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Frontend/Warnings.cpp head/contrib/llvm/tools/clang/lib/Headers/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Headers/Makefile head/contrib/llvm/tools/clang/lib/Headers/altivec.h head/contrib/llvm/tools/clang/lib/Headers/emmintrin.h head/contrib/llvm/tools/clang/lib/Headers/smmintrin.h head/contrib/llvm/tools/clang/lib/Headers/stddef.h head/contrib/llvm/tools/clang/lib/Headers/stdint.h head/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h head/contrib/llvm/tools/clang/lib/Index/CallGraph.cpp head/contrib/llvm/tools/clang/lib/Index/Entity.cpp head/contrib/llvm/tools/clang/lib/Index/EntityImpl.h head/contrib/llvm/tools/clang/lib/Index/Indexer.cpp head/contrib/llvm/tools/clang/lib/Index/Makefile head/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp head/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp head/contrib/llvm/tools/clang/lib/Lex/Makefile head/contrib/llvm/tools/clang/lib/Lex/PPCaching.cpp head/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp head/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp head/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp head/contrib/llvm/tools/clang/lib/Makefile head/contrib/llvm/tools/clang/lib/Parse/AttributeList.cpp head/contrib/llvm/tools/clang/lib/Parse/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Parse/DeclSpec.cpp head/contrib/llvm/tools/clang/lib/Parse/Makefile head/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp head/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp head/contrib/llvm/tools/clang/lib/Parse/ParsePragma.h head/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp head/contrib/llvm/tools/clang/lib/Parse/Parser.cpp head/contrib/llvm/tools/clang/lib/Parse/RAIIObjectsForParser.h head/contrib/llvm/tools/clang/lib/Rewrite/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Rewrite/Makefile head/contrib/llvm/tools/clang/lib/Rewrite/RewriteRope.cpp head/contrib/llvm/tools/clang/lib/Rewrite/Rewriter.cpp head/contrib/llvm/tools/clang/lib/Sema/CMakeLists.txt head/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp head/contrib/llvm/tools/clang/lib/Sema/Lookup.h head/contrib/llvm/tools/clang/lib/Sema/Makefile head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp head/contrib/llvm/tools/clang/lib/Sema/Sema.h head/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCXXCast.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaInit.h head/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.h head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h head/contrib/llvm/tools/clang/tools/Makefile head/contrib/llvm/tools/clang/tools/c-index-test/Makefile head/contrib/llvm/tools/clang/tools/c-index-test/c-index-test.c head/contrib/llvm/tools/clang/tools/driver/CMakeLists.txt head/contrib/llvm/tools/clang/tools/driver/Makefile head/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp head/contrib/llvm/tools/clang/tools/libclang/CIndex.cpp head/contrib/llvm/tools/clang/tools/libclang/CIndexCodeCompletion.cpp head/contrib/llvm/tools/clang/tools/libclang/CIndexer.cpp head/contrib/llvm/tools/clang/tools/libclang/CMakeLists.txt head/contrib/llvm/tools/clang/tools/libclang/CXCursor.cpp head/contrib/llvm/tools/clang/tools/libclang/CXSourceLocation.h head/contrib/llvm/tools/clang/tools/libclang/CXTypes.cpp head/contrib/llvm/tools/clang/tools/libclang/Makefile head/contrib/llvm/tools/clang/tools/libclang/libclang.darwin.exports head/contrib/llvm/tools/clang/tools/libclang/libclang.exports head/contrib/llvm/tools/clang/tools/scan-build/ccc-analyzer head/contrib/llvm/tools/clang/utils/TestUtils/pch-test.pl head/contrib/llvm/tools/edis/EDDisassembler.cpp head/contrib/llvm/tools/edis/Makefile head/contrib/llvm/tools/gold/gold-plugin.cpp head/contrib/llvm/tools/llc/llc.cpp head/contrib/llvm/tools/llvm-extract/llvm-extract.cpp head/contrib/llvm/tools/llvm-link/llvm-link.cpp head/contrib/llvm/tools/llvm-mc/Makefile head/contrib/llvm/tools/llvm-mc/llvm-mc.cpp head/contrib/llvm/tools/llvm-nm/llvm-nm.cpp head/contrib/llvm/tools/llvmc/plugins/Base/Base.td.in head/contrib/llvm/tools/lto/LTOCodeGenerator.cpp head/contrib/llvm/tools/opt/GraphPrinters.cpp head/contrib/llvm/tools/opt/PrintSCC.cpp head/contrib/llvm/tools/opt/opt.cpp head/contrib/llvm/utils/FileUpdate/FileUpdate.cpp head/contrib/llvm/utils/NewNightlyTest.pl head/contrib/llvm/utils/TableGen/ARMDecoderEmitter.cpp head/contrib/llvm/utils/TableGen/ARMDecoderEmitter.h head/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/CMakeLists.txt head/contrib/llvm/utils/TableGen/ClangASTNodesEmitter.cpp head/contrib/llvm/utils/TableGen/ClangASTNodesEmitter.h head/contrib/llvm/utils/TableGen/CodeEmitterGen.cpp head/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp head/contrib/llvm/utils/TableGen/CodeGenTarget.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/EDEmitter.cpp head/contrib/llvm/utils/TableGen/FastISelEmitter.cpp head/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp head/contrib/llvm/utils/TableGen/Record.cpp head/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp head/contrib/llvm/utils/TableGen/TGParser.cpp head/contrib/llvm/utils/TableGen/TGParser.h head/contrib/llvm/utils/TableGen/TableGen.cpp head/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp head/contrib/llvm/utils/TableGen/X86RecognizableInstr.h head/contrib/llvm/utils/buildit/GNUmakefile head/contrib/llvm/utils/buildit/build_llvm head/contrib/llvm/utils/count/count.c head/contrib/llvm/utils/lit/lit/TestRunner.py head/contrib/llvm/utils/unittest/UnitTestMain/Makefile head/contrib/llvm/utils/unittest/googletest/Makefile head/contrib/llvm/utils/unittest/googletest/README.LLVM head/contrib/llvm/utils/unittest/googletest/gtest-death-test.cc head/contrib/llvm/utils/unittest/googletest/gtest-filepath.cc head/contrib/llvm/utils/unittest/googletest/gtest-port.cc head/contrib/llvm/utils/unittest/googletest/gtest-test-part.cc head/contrib/llvm/utils/unittest/googletest/gtest-typed-test.cc head/contrib/llvm/utils/unittest/googletest/gtest.cc head/contrib/llvm/utils/unittest/googletest/include/gtest/gtest-death-test.h head/contrib/llvm/utils/unittest/googletest/include/gtest/gtest-message.h head/contrib/llvm/utils/unittest/googletest/include/gtest/gtest-param-test.h head/contrib/llvm/utils/unittest/googletest/include/gtest/gtest-spi.h head/contrib/llvm/utils/unittest/googletest/include/gtest/gtest-test-part.h head/contrib/llvm/utils/unittest/googletest/include/gtest/gtest-typed-test.h head/contrib/llvm/utils/unittest/googletest/include/gtest/gtest.h head/contrib/llvm/utils/unittest/googletest/include/gtest/internal/gtest-death-test-internal.h head/contrib/llvm/utils/unittest/googletest/include/gtest/internal/gtest-filepath.h head/contrib/llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal-inl.h head/contrib/llvm/utils/unittest/googletest/include/gtest/internal/gtest-internal.h head/contrib/llvm/utils/unittest/googletest/include/gtest/internal/gtest-linked_ptr.h head/contrib/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util-generated.h head/contrib/llvm/utils/unittest/googletest/include/gtest/internal/gtest-param-util.h head/contrib/llvm/utils/unittest/googletest/include/gtest/internal/gtest-port.h head/contrib/llvm/utils/unittest/googletest/include/gtest/internal/gtest-string.h head/contrib/llvm/utils/unittest/googletest/include/gtest/internal/gtest-type-util.h head/etc/mtree/BSD.include.dist head/lib/clang/Makefile head/lib/clang/clang.build.mk head/lib/clang/include/Makefile head/lib/clang/include/llvm/Config/AsmParsers.def head/lib/clang/include/llvm/Config/AsmPrinters.def head/lib/clang/include/llvm/Config/Disassemblers.def head/lib/clang/include/llvm/Config/Targets.def head/lib/clang/libclanganalysis/Makefile head/lib/clang/libclangast/Makefile head/lib/clang/libclangbasic/Makefile head/lib/clang/libclangchecker/Makefile head/lib/clang/libclangcodegen/Makefile head/lib/clang/libclangdriver/Makefile head/lib/clang/libclangfrontend/Makefile head/lib/clang/libclanglex/Makefile head/lib/clang/libclangparse/Makefile head/lib/clang/libclangrewrite/Makefile head/lib/clang/libclangsema/Makefile head/lib/clang/libllvmanalysis/Makefile head/lib/clang/libllvmarmasmparser/Makefile head/lib/clang/libllvmarmasmprinter/Makefile head/lib/clang/libllvmarmcodegen/Makefile head/lib/clang/libllvmarminfo/Makefile head/lib/clang/libllvmasmprinter/Makefile head/lib/clang/libllvmbitreader/Makefile head/lib/clang/libllvmbitwriter/Makefile head/lib/clang/libllvmcodegen/Makefile head/lib/clang/libllvmcore/Makefile head/lib/clang/libllvminstcombine/Makefile head/lib/clang/libllvmipa/Makefile head/lib/clang/libllvmipo/Makefile head/lib/clang/libllvmmc/Makefile head/lib/clang/libllvmmcparser/Makefile head/lib/clang/libllvmmipsasmprinter/Makefile head/lib/clang/libllvmmipscodegen/Makefile head/lib/clang/libllvmmipsinfo/Makefile head/lib/clang/libllvmpowerpcasmprinter/Makefile head/lib/clang/libllvmpowerpccodegen/Makefile head/lib/clang/libllvmpowerpcinfo/Makefile head/lib/clang/libllvmscalaropts/Makefile head/lib/clang/libllvmselectiondag/Makefile head/lib/clang/libllvmsupport/Makefile head/lib/clang/libllvmsystem/Makefile head/lib/clang/libllvmtarget/Makefile head/lib/clang/libllvmtransformutils/Makefile head/lib/clang/libllvmx86asmparser/Makefile head/lib/clang/libllvmx86asmprinter/Makefile head/lib/clang/libllvmx86codegen/Makefile head/lib/clang/libllvmx86info/Makefile head/usr.bin/clang/clang/Makefile head/usr.bin/clang/tblgen/Makefile Directory Properties: head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Tue Jul 20 15:48:29 2010 (r210298) +++ head/ObsoleteFiles.inc Tue Jul 20 17:16:57 2010 (r210299) @@ -14,6 +14,14 @@ # The file is partitioned: OLD_FILES first, then OLD_LIBS and OLD_DIRS last. # +# 20100720: new clang import which bumps version from 2.0 to 2.8 +OLD_FILES+=usr/include/clang/2.0/emmintrin.h +OLD_FILES+=usr/include/clang/2.0/mm_malloc.h +OLD_FILES+=usr/include/clang/2.0/mmintrin.h +OLD_FILES+=usr/include/clang/2.0/pmmintrin.h +OLD_FILES+=usr/include/clang/2.0/tmmintrin.h +OLD_FILES+=usr/include/clang/2.0/xmmintrin.h +OLD_DIRS+=usr/include/clang/2.0 # 20100706: removed pc-sysinstall's detect-vmware.sh OLD_FILES+=usr/share/pc-sysinstall/backend-query/detect-vmware.sh # 20100701: [powerpc] removed Modified: head/contrib/llvm/CMakeLists.txt ============================================================================== --- head/contrib/llvm/CMakeLists.txt Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/CMakeLists.txt Tue Jul 20 17:16:57 2010 (r210299) @@ -4,7 +4,7 @@ project(LLVM) cmake_minimum_required(VERSION 2.6.1) set(PACKAGE_NAME llvm) -set(PACKAGE_VERSION 2.7svn) +set(PACKAGE_VERSION 2.8svn) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "llvmbugs@cs.uiuc.edu") Modified: head/contrib/llvm/Makefile ============================================================================== --- head/contrib/llvm/Makefile Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/Makefile Tue Jul 20 17:16:57 2010 (r210299) @@ -64,7 +64,7 @@ endif ifeq ($(MAKECMDGOALS),install-clang) DIRS := tools/clang/tools/driver tools/clang/lib/Headers \ - tools/clang/lib/Runtime tools/clang/docs + tools/clang/runtime tools/clang/docs OPTIONAL_DIRS := NO_INSTALL = 1 endif @@ -180,8 +180,8 @@ $(FilesToConfigPATH) : $(LLVM_OBJ_ROOT)/ # that it gets executed last. ifneq ($(BUILD_DIRS_ONLY),1) all:: - $(Echo) '*****' Completed $(BuildMode)$(AssertMode) Build -ifeq ($(BuildMode),Debug) + $(Echo) '*****' Completed $(BuildMode) Build +ifneq ($(ENABLE_OPTIMIZED),1) $(Echo) '*****' Note: Debug build can be 10 times slower than an $(Echo) '*****' optimized build. Use 'make ENABLE_OPTIMIZED=1' to $(Echo) '*****' make an optimized build. Alternatively you can Modified: head/contrib/llvm/Makefile.config.in ============================================================================== --- head/contrib/llvm/Makefile.config.in Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/Makefile.config.in Tue Jul 20 17:16:57 2010 (r210299) @@ -222,8 +222,8 @@ RDYNAMIC := @RDYNAMIC@ # When ENABLE_PROFILING is enabled, profile instrumentation is done # and output is put into the "+Profile" directories, where -# is either Debug or Release depending on how other builkd -# flags are set.. Otherwise, output is put in the +# is either Debug or Release depending on how other build +# flags are set. Otherwise, output is put in the # directories. #ENABLE_PROFILING = 1 @ENABLE_PROFILING@ @@ -320,12 +320,6 @@ endif # Location of the plugin header file for gold. BINUTILS_INCDIR := @BINUTILS_INCDIR@ -C_INCLUDE_DIRS := @C_INCLUDE_DIRS@ -CXX_INCLUDE_ROOT := @CXX_INCLUDE_ROOT@ -CXX_INCLUDE_ARCH := @CXX_INCLUDE_ARCH@ -CXX_INCLUDE_32BIT_DIR = @CXX_INCLUDE_32BIT_DIR@ -CXX_INCLUDE_64BIT_DIR = @CXX_INCLUDE_64BIT_DIR@ - # When ENABLE_LLVMC_DYNAMIC is enabled, LLVMC will link libCompilerDriver # dynamically. This is needed to make dynamic plugins work on some targets # (Windows). @@ -344,5 +338,5 @@ NO_MISSING_FIELD_INITIALIZERS = @NO_MISS NO_VARIADIC_MACROS = @NO_VARIADIC_MACROS@ # Flags supported by the linker. -# bfd ld / gold -retain-symbols-file file -HAVE_LINK_RETAIN_SYMBOLS_FILE = @HAVE_LINK_RETAIN_SYMBOLS_FILE@ +# bfd ld / gold --version-script=file +HAVE_LINK_VERSION_SCRIPT = @HAVE_LINK_VERSION_SCRIPT@ Modified: head/contrib/llvm/Makefile.rules ============================================================================== --- head/contrib/llvm/Makefile.rules Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/Makefile.rules Tue Jul 20 17:16:57 2010 (r210299) @@ -42,7 +42,7 @@ VPATH=$(PROJ_SRC_DIR) # Reset the list of suffixes we know how to build. #-------------------------------------------------------------------- .SUFFIXES: -.SUFFIXES: .c .cpp .cc .h .hpp .o .a .bc .td .ps .dot .ll +.SUFFIXES: .c .cpp .cc .h .hpp .o .a .bc .td .ps .dot .ll .m .mm .SUFFIXES: $(SHLIBEXT) $(SUFFIXES) #-------------------------------------------------------------------- @@ -398,12 +398,11 @@ endif # If DISABLE_ASSERTIONS=1 is specified (make command line or configured), # then disable assertions by defining the appropriate preprocessor symbols. -ifdef DISABLE_ASSERTIONS - # Indicate that assertions are turned off using a minus sign - BuildMode := $(BuildMode)-Asserts - CPP.Defines += -DNDEBUG -else +ifndef DISABLE_ASSERTIONS + BuildMode := $(BuildMode)+Asserts CPP.Defines += -D_DEBUG +else + CPP.Defines += -DNDEBUG endif # If ENABLE_EXPENSIVE_CHECKS=1 is specified (make command line or @@ -633,7 +632,12 @@ ifdef TOOLNAME endif endif endif +else +ifneq ($(DARWIN_MAJVERS),4) + LD.Flags += $(RPATH) -Wl,@executable_path/../lib endif +endif + #---------------------------------------------------------- # Options To Invoke Tools @@ -807,7 +811,8 @@ SubDirs += $(DIRS) ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT)) $(RecursiveTargets):: $(Verb) for dir in $(DIRS); do \ - if [ ! -f $$dir/Makefile ]; then \ + if ([ ! -f $$dir/Makefile ] || \ + command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \ $(MKDIR) $$dir; \ $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ fi; \ @@ -829,7 +834,8 @@ endif ifdef EXPERIMENTAL_DIRS $(RecursiveTargets):: $(Verb) for dir in $(EXPERIMENTAL_DIRS); do \ - if [ ! -f $$dir/Makefile ]; then \ + if ([ ! -f $$dir/Makefile ] || \ + command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \ $(MKDIR) $$dir; \ $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ fi; \ @@ -863,7 +869,9 @@ unitcheck:: $(addsuffix /.makeunitcheck, ParallelTargets := $(foreach T,$(RecursiveTargets),%/.make$(T)) $(ParallelTargets) : - $(Verb) if [ ! -f $(@D)/Makefile ]; then \ + $(Verb) if ([ ! -f $(@D)/Makefile ] || \ + command test $(@D)/Makefile -ot \ + $(PROJ_SRC_DIR)/$(@D)/Makefile ); then \ $(MKDIR) $(@D); \ $(CP) $(PROJ_SRC_DIR)/$(@D)/Makefile $(@D)/Makefile; \ fi; \ @@ -882,7 +890,8 @@ ifneq ($(PROJ_SRC_ROOT),$(PROJ_OBJ_ROOT) $(RecursiveTargets):: $(Verb) for dir in $(OPTIONAL_DIRS); do \ if [ -d $(PROJ_SRC_DIR)/$$dir ]; then\ - if [ ! -f $$dir/Makefile ]; then \ + if ([ ! -f $$dir/Makefile ] || \ + command test $$dir/Makefile -ot $(PROJ_SRC_DIR)/$$dir/Makefile ); then \ $(MKDIR) $$dir; \ $(CP) $(PROJ_SRC_DIR)/$$dir/Makefile $$dir/Makefile; \ fi; \ @@ -930,7 +939,7 @@ endif endif ############################################################################### -# Set up variables for building libararies +# Set up variables for building libraries ############################################################################### #--------------------------------------------------------- @@ -986,12 +995,25 @@ ifeq ($(HOST_OS),Darwin) # Darwin convention prefixes symbols with underscores. NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE)).sed $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir - $(Verb) sed -e 's/[[:<:]]/_/' < $< > $@ + $(Verb) sed -e 's/^/_/' < $< > $@ +clean-local:: + -$(Verb) $(RM) -f $(NativeExportsFile) +else +ifeq ($(HAVE_LINK_VERSION_SCRIPT),1) +# Gold and BFD ld require a version script rather than a plain list. +NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE)).map +$(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir + $(Verb) echo "{" > $@ + $(Verb) grep -q "\<" $< && echo " global:" >> $@ || : + $(Verb) sed -e 's/$$/;/' -e 's/^/ /' < $< >> $@ + $(Verb) echo " local: *;" >> $@ + $(Verb) echo "};" >> $@ clean-local:: -$(Verb) $(RM) -f $(NativeExportsFile) else NativeExportsFile := $(EXPORTED_SYMBOL_FILE) endif +endif # Now add the linker command-line options to use the native export file. @@ -1000,8 +1022,8 @@ LLVMLibsOptions += -Wl,-exported_symbols endif # gold, bfd ld, etc. -ifeq ($(HAVE_LINK_RETAIN_SYMBOLS_FILE),1) -LLVMLibsOptions += -Wl,-retain-symbols-file,$(NativeExportsFile) +ifeq ($(HAVE_LINK_VERSION_SCRIPT),1) +LLVMLibsOptions += -Wl,--version-script,$(NativeExportsFile) endif endif @@ -1113,7 +1135,7 @@ $(LibName.SO): $(ObjectsO) $(ProjLibsPat $(ProjLibsOptions) $(LLVMLibsOptions) $(LIBS) else $(LibName.SO): $(ObjectsO) $(LibDir)/.dir - $(Echo) Linking $(BuildMode) Shared Library $(LIBRARYNAME)$(SHLIBEXT) + $(Echo) Linking $(BuildMode) Shared Library $(basename $@) $(Verb) $(Link) $(SharedLinkOptions) -o $@ $(ObjectsO) endif @@ -1425,6 +1447,11 @@ $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BU $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ $(DEPEND_MOVEFILE) +$(ObjDir)/%.o: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_SRC_DIR)/Makefile + $(Echo) "Compiling $*.mm for $(BuildMode) build" $(PIC_FLAG) + $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ + $(DEPEND_MOVEFILE) + $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_SRC_DIR)/Makefile $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG) $(Verb) if $(Compile.CXX) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ @@ -1435,6 +1462,11 @@ $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUIL $(Verb) if $(Compile.C) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ $(DEPEND_MOVEFILE) +$(ObjDir)/%.o: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(PROJ_SRC_DIR)/Makefile + $(Echo) "Compiling $*.m for $(BuildMode) build" $(PIC_FLAG) + $(Verb) if $(Compile.C) $(DEPEND_OPTIONS) $< -o $(ObjDir)/$*.o ; \ + $(DEPEND_MOVEFILE) + #--------------------------------------------------------- # Create .bc files in the ObjDir directory from .cpp .cc and .c files... #--------------------------------------------------------- @@ -1453,6 +1485,12 @@ $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(B $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ $(BC_DEPEND_MOVEFILE) +$(ObjDir)/%.ll: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) + $(Echo) "Compiling $*.mm for $(BuildMode) build (bytecode)" + $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ + $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ + $(BC_DEPEND_MOVEFILE) + $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" $(Verb) if $(BCCompile.CXX) $(BC_DEPEND_OPTIONS) \ @@ -1465,6 +1503,12 @@ $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUI $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ $(BC_DEPEND_MOVEFILE) +$(ObjDir)/%.ll: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) + $(Echo) "Compiling $*.m for $(BuildMode) build (bytecode)" + $(Verb) if $(BCCompile.C) $(BC_DEPEND_OPTIONS) \ + $< -o $(ObjDir)/$*.ll -S -emit-llvm ; \ + $(BC_DEPEND_MOVEFILE) + # Provide alternate rule sets if dependencies are disabled else @@ -1472,6 +1516,10 @@ $(ObjDir)/%.o: %.cpp $(ObjDir)/.dir $(BU $(Echo) "Compiling $*.cpp for $(BuildMode) build" $(PIC_FLAG) $(Compile.CXX) $< -o $@ +$(ObjDir)/%.o: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.mm for $(BuildMode) build" $(PIC_FLAG) + $(Compile.CXX) $< -o $@ + $(ObjDir)/%.o: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(Echo) "Compiling $*.cc for $(BuildMode) build" $(PIC_FLAG) $(Compile.CXX) $< -o $@ @@ -1480,10 +1528,18 @@ $(ObjDir)/%.o: %.c $(ObjDir)/.dir $(BUIL $(Echo) "Compiling $*.c for $(BuildMode) build" $(PIC_FLAG) $(Compile.C) $< -o $@ +$(ObjDir)/%.o: %.m $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.m for $(BuildMode) build" $(PIC_FLAG) + $(Compile.C) $< -o $@ + $(ObjDir)/%.ll: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cpp for $(BuildMode) build (bytecode)" $(BCCompile.CXX) $< -o $@ -S -emit-llvm +$(ObjDir)/%.ll: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) + $(Echo) "Compiling $*.mm for $(BuildMode) build (bytecode)" + $(BCCompile.CXX) $< -o $@ -S -emit-llvm + $(ObjDir)/%.ll: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCXX) $(Echo) "Compiling $*.cc for $(BuildMode) build (bytecode)" $(BCCompile.CXX) $< -o $@ -S -emit-llvm @@ -1492,6 +1548,10 @@ $(ObjDir)/%.ll: %.c $(ObjDir)/.dir $(BUI $(Echo) "Compiling $*.c for $(BuildMode) build (bytecode)" $(BCCompile.C) $< -o $@ -S -emit-llvm +$(ObjDir)/%.ll: %.m $(ObjDir)/.dir $(BUILT_SOURCES) $(LLVMCC) + $(Echo) "Compiling $*.m for $(BuildMode) build (bytecode)" + $(BCCompile.C) $< -o $@ -S -emit-llvm + endif @@ -1500,6 +1560,10 @@ $(BuildMode)/%.ii: %.cpp $(ObjDir)/.dir $(Echo) "Compiling $*.cpp for $(BuildMode) build to .ii file" $(Verb) $(Preprocess.CXX) $< -o $@ +$(BuildMode)/%.ii: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.mm for $(BuildMode) build to .ii file" + $(Verb) $(Preprocess.CXX) $< -o $@ + $(BuildMode)/%.ii: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(Echo) "Compiling $*.cc for $(BuildMode) build to .ii file" $(Verb) $(Preprocess.CXX) $< -o $@ @@ -1508,11 +1572,19 @@ $(BuildMode)/%.i: %.c $(ObjDir)/.dir $(B $(Echo) "Compiling $*.c for $(BuildMode) build to .i file" $(Verb) $(Preprocess.C) $< -o $@ +$(BuildMode)/%.i: %.m $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.m for $(BuildMode) build to .i file" + $(Verb) $(Preprocess.C) $< -o $@ + $(ObjDir)/%.s: %.cpp $(ObjDir)/.dir $(BUILT_SOURCES) $(Echo) "Compiling $*.cpp to asm for $(BuildMode) build" $(PIC_FLAG) $(Compile.CXX) $< -o $@ -S +$(ObjDir)/%.s: %.mm $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.mm to asm for $(BuildMode) build" $(PIC_FLAG) + $(Compile.CXX) $< -o $@ -S + $(ObjDir)/%.s: %.cc $(ObjDir)/.dir $(BUILT_SOURCES) $(Echo) "Compiling $*.cc to asm for $(BuildMode) build" $(PIC_FLAG) $(Compile.CXX) $< -o $@ -S @@ -1521,6 +1593,10 @@ $(ObjDir)/%.s: %.c $(ObjDir)/.dir $(BUIL $(Echo) "Compiling $*.c to asm for $(BuildMode) build" $(PIC_FLAG) $(Compile.C) $< -o $@ -S +$(ObjDir)/%.s: %.m $(ObjDir)/.dir $(BUILT_SOURCES) + $(Echo) "Compiling $*.m to asm for $(BuildMode) build" $(PIC_FLAG) + $(Compile.C) $< -o $@ -S + # make the C and C++ compilers strip debug info out of bytecode libraries. ifdef DEBUG_RUNTIME @@ -1733,7 +1809,7 @@ ifndef DISABLE_AUTO_DEPENDENCIES ifndef IS_CLEANING_TARGET # Get the list of dependency files -DependSourceFiles := $(basename $(filter %.cpp %.c %.cc, $(Sources))) +DependSourceFiles := $(basename $(filter %.cpp %.c %.cc %.m %.mm, $(Sources))) DependFiles := $(DependSourceFiles:%=$(PROJ_OBJ_DIR)/$(BuildMode)/%.d) # Include bitcode dependency files if using bitcode libraries Modified: head/contrib/llvm/autoconf/configure.ac ============================================================================== --- head/contrib/llvm/autoconf/configure.ac Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/autoconf/configure.ac Tue Jul 20 17:16:57 2010 (r210299) @@ -1039,8 +1039,8 @@ AC_LINK_USE_R dnl Determine whether the linker supports the -export-dynamic option. AC_LINK_EXPORT_DYNAMIC -dnl Determine whether the linker supports the -retain-symbols-file option. -AC_LINK_RETAIN_SYMBOLS_FILE +dnl Determine whether the linker supports the --version-script option. +AC_LINK_VERSION_SCRIPT dnl Check for libtool and the library that has dlopen function (which must come dnl before the AC_PROG_LIBTOOL check in order to enable dlopening libraries with @@ -1284,6 +1284,9 @@ if test "$llvm_cv_enable_libffi" = "yes" AC_CHECK_HEADERS([ffi.h ffi/ffi.h]) fi +dnl Try to find Darwin specific crash reporting library. +AC_CHECK_HEADERS([CrashReporterClient.h]) + dnl===-----------------------------------------------------------------------=== dnl=== dnl=== SECTION 7: Check for types and structures Modified: head/contrib/llvm/autoconf/m4/link_options.m4 ============================================================================== --- head/contrib/llvm/autoconf/m4/link_options.m4 Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/autoconf/m4/link_options.m4 Tue Jul 20 17:16:57 2010 (r210299) @@ -40,14 +40,14 @@ if test "$llvm_cv_link_use_export_dynami ]) # -# Determine if the system can handle the -retain-symbols-file option being +# Determine if the system can handle the --version-script option being # passed to the linker. # # This macro is specific to LLVM. # -AC_DEFUN([AC_LINK_RETAIN_SYMBOLS_FILE], -[AC_CACHE_CHECK([for compiler -Wl,-retain-symbols-file option], - [llvm_cv_link_use_retain_symbols_file], +AC_DEFUN([AC_LINK_VERSION_SCRIPT], +[AC_CACHE_CHECK([for compiler -Wl,--version-script option], + [llvm_cv_link_use_version_script], [ AC_LANG_PUSH([C]) oldcflags="$CFLAGS" @@ -67,18 +67,21 @@ AC_DEFUN([AC_LINK_RETAIN_SYMBOLS_FILE], (umask 077 && mkdir "$tmp") } || exit $? - echo "main" > "$tmp/exports" + echo "{" > "$tmp/export.map" + echo " global: main;" >> "$tmp/export.map" + echo " local: *;" >> "$tmp/export.map" + echo "};" >> "$tmp/export.map" - CFLAGS="$CFLAGS -Wl,-retain-symbols-file=$tmp/exports" + CFLAGS="$CFLAGS -Wl,--version-script=$tmp/export.map" AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])], - [llvm_cv_link_use_retain_symbols_file=yes],[llvm_cv_link_use_retain_symbols_file=no]) - rm "$tmp/exports" + [llvm_cv_link_use_version_script=yes],[llvm_cv_link_use_version_script=no]) + rm "$tmp/export.map" rmdir "$tmp" CFLAGS="$oldcflags" AC_LANG_POP([C]) ]) -if test "$llvm_cv_link_use_retain_symbols_file" = yes ; then - AC_SUBST(HAVE_LINK_RETAIN_SYMBOLS_FILE,1) +if test "$llvm_cv_link_use_version_script" = yes ; then + AC_SUBST(HAVE_LINK_VERSION_SCRIPT,1) fi ]) Modified: head/contrib/llvm/bindings/ada/llvm/llvm.ads ============================================================================== --- head/contrib/llvm/bindings/ada/llvm/llvm.ads Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/bindings/ada/llvm/llvm.ads Tue Jul 20 17:16:57 2010 (r210299) @@ -316,7 +316,8 @@ package llvm is LLVMExternalWeakLinkage, LLVMGhostLinkage, LLVMCommonLinkage, - LLVMLinkerPrivateLinkage); + LLVMLinkerPrivateLinkage, + LLVMLinkerPrivateWeakLinkage); for LLVMLinkage use (LLVMExternalLinkage => 0, @@ -333,7 +334,8 @@ package llvm is LLVMExternalWeakLinkage => 11, LLVMGhostLinkage => 12, LLVMCommonLinkage => 13, - LLVMLinkerPrivateLinkage => 14); + LLVMLinkerPrivateLinkage => 14, + LLVMLinkerPrivateWeakLinkage => 15); pragma Convention (C, LLVMLinkage); Modified: head/contrib/llvm/configure ============================================================================== --- head/contrib/llvm/configure Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/configure Tue Jul 20 17:16:57 2010 (r210299) @@ -752,7 +752,7 @@ OCAMLOPT OCAMLDEP OCAMLDOC GAS -HAVE_LINK_RETAIN_SYMBOLS_FILE +HAVE_LINK_VERSION_SCRIPT INSTALL_LTDL_TRUE INSTALL_LTDL_FALSE CONVENIENCE_LTDL_TRUE @@ -8905,9 +8905,9 @@ _ACEOF fi -{ echo "$as_me:$LINENO: checking for compiler -Wl,-retain-symbols-file option" >&5 -echo $ECHO_N "checking for compiler -Wl,-retain-symbols-file option... $ECHO_C" >&6; } -if test "${llvm_cv_link_use_retain_symbols_file+set}" = set; then +{ echo "$as_me:$LINENO: checking for compiler -Wl,--version-script option" >&5 +echo $ECHO_N "checking for compiler -Wl,--version-script option... $ECHO_C" >&6; } +if test "${llvm_cv_link_use_version_script+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c @@ -8934,9 +8934,12 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu (umask 077 && mkdir "$tmp") } || exit $? - echo "main" > "$tmp/exports" + echo "{" > "$tmp/export.map" + echo " global: main;" >> "$tmp/export.map" + echo " local: *;" >> "$tmp/export.map" + echo "};" >> "$tmp/export.map" - CFLAGS="$CFLAGS -Wl,-retain-symbols-file=$tmp/exports" + CFLAGS="$CFLAGS -Wl,--version-script=$tmp/export.map" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF @@ -8986,17 +8989,17 @@ eval "echo \"\$as_me:$LINENO: $ac_try_ec ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then - llvm_cv_link_use_retain_symbols_file=yes + llvm_cv_link_use_version_script=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - llvm_cv_link_use_retain_symbols_file=no + llvm_cv_link_use_version_script=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - rm "$tmp/exports" + rm "$tmp/export.map" rmdir "$tmp" CFLAGS="$oldcflags" ac_ext=c @@ -9007,10 +9010,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu fi -{ echo "$as_me:$LINENO: result: $llvm_cv_link_use_retain_symbols_file" >&5 -echo "${ECHO_T}$llvm_cv_link_use_retain_symbols_file" >&6; } -if test "$llvm_cv_link_use_retain_symbols_file" = yes ; then - HAVE_LINK_RETAIN_SYMBOLS_FILE=1 +{ echo "$as_me:$LINENO: result: $llvm_cv_link_use_version_script" >&5 +echo "${ECHO_T}$llvm_cv_link_use_version_script" >&6; } +if test "$llvm_cv_link_use_version_script" = yes ; then + HAVE_LINK_VERSION_SCRIPT=1 fi @@ -11384,7 +11387,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } +else + # Is the header compilable? +{ echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (ac_try="$ac_compile" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_compile") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_try") 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_compiler=no +fi + +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6; } + +# Is the header present? +{ echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (ac_try="$ac_cpp conftest.$ac_ext" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi + +rm -f conftest.err conftest.$ac_ext +{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( cat <<\_ASBOX +## ----------------------------------- ## +## Report this to llvmbugs@cs.uiuc.edu ## +## ----------------------------------- ## +_ASBOX + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +{ echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } +if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +ac_res=`eval echo '${'$as_ac_Header'}'` + { echo "$as_me:$LINENO: result: $ac_res" >&5 +echo "${ECHO_T}$ac_res" >&6; } + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + { echo "$as_me:$LINENO: checking for HUGE_VAL sanity" >&5 @@ -21297,7 +21470,7 @@ OCAMLOPT!$OCAMLOPT$ac_delim OCAMLDEP!$OCAMLDEP$ac_delim OCAMLDOC!$OCAMLDOC$ac_delim GAS!$GAS$ac_delim -HAVE_LINK_RETAIN_SYMBOLS_FILE!$HAVE_LINK_RETAIN_SYMBOLS_FILE$ac_delim +HAVE_LINK_VERSION_SCRIPT!$HAVE_LINK_VERSION_SCRIPT$ac_delim INSTALL_LTDL_TRUE!$INSTALL_LTDL_TRUE$ac_delim INSTALL_LTDL_FALSE!$INSTALL_LTDL_FALSE$ac_delim CONVENIENCE_LTDL_TRUE!$CONVENIENCE_LTDL_TRUE$ac_delim Modified: head/contrib/llvm/include/llvm-c/Core.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Core.h Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/include/llvm-c/Core.h Tue Jul 20 17:16:57 2010 (r210299) @@ -226,7 +226,8 @@ typedef enum { LLVMExternalWeakLinkage,/**< ExternalWeak linkage description */ LLVMGhostLinkage, /**< Obsolete */ LLVMCommonLinkage, /**< Tentative definitions */ - LLVMLinkerPrivateLinkage /**< Like Private, but linker removes. */ + LLVMLinkerPrivateLinkage, /**< Like Private, but linker removes. */ + LLVMLinkerPrivateWeakLinkage /**< Like LinkerPrivate, but is weak. */ } LLVMLinkage; typedef enum { Modified: head/contrib/llvm/include/llvm-c/Target.h ============================================================================== --- head/contrib/llvm/include/llvm-c/Target.h Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/include/llvm-c/Target.h Tue Jul 20 17:16:57 2010 (r210299) @@ -32,7 +32,8 @@ typedef struct LLVMOpaqueTargetData *LLV typedef struct LLVMStructLayout *LLVMStructLayoutRef; /* Declare all of the target-initialization functions that are available. */ -#define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##TargetInfo(void); +#define LLVM_TARGET(TargetName) \ + void LLVMInitialize##TargetName##TargetInfo(void); #include "llvm/Config/Targets.def" #undef LLVM_TARGET /* Explicit undef to make SWIG happier */ Modified: head/contrib/llvm/include/llvm-c/lto.h ============================================================================== --- head/contrib/llvm/include/llvm-c/lto.h Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/include/llvm-c/lto.h Tue Jul 20 17:16:57 2010 (r210299) @@ -102,7 +102,7 @@ lto_module_is_object_file_in_memory(cons */ extern bool lto_module_is_object_file_in_memory_for_target(const void* mem, size_t length, - const char* target_triple_prefix); + const char* target_triple_prefix); /** Modified: head/contrib/llvm/include/llvm/ADT/APFloat.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/APFloat.h Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/include/llvm/ADT/APFloat.h Tue Jul 20 17:16:57 2010 (r210299) @@ -179,7 +179,7 @@ namespace llvm { // Constructors. APFloat(const fltSemantics &); // Default construct to 0.0 - APFloat(const fltSemantics &, const StringRef &); + APFloat(const fltSemantics &, StringRef); APFloat(const fltSemantics &, integerPart); APFloat(const fltSemantics &, fltCategory, bool negative); APFloat(const fltSemantics &, uninitializedTag); @@ -282,7 +282,7 @@ namespace llvm { bool, roundingMode); opStatus convertFromZeroExtendedInteger(const integerPart *, unsigned int, bool, roundingMode); - opStatus convertFromString(const StringRef&, roundingMode); + opStatus convertFromString(StringRef, roundingMode); APInt bitcastToAPInt() const; double convertToDouble() const; float convertToFloat() const; @@ -386,8 +386,8 @@ namespace llvm { roundingMode, bool *) const; opStatus convertFromUnsignedParts(const integerPart *, unsigned int, roundingMode); - opStatus convertFromHexadecimalString(const StringRef&, roundingMode); - opStatus convertFromDecimalString (const StringRef&, roundingMode); + opStatus convertFromHexadecimalString(StringRef, roundingMode); + opStatus convertFromDecimalString(StringRef, roundingMode); char *convertNormalToHexString(char *, unsigned int, bool, roundingMode) const; opStatus roundSignificandWithExponent(const integerPart *, unsigned int, Modified: head/contrib/llvm/include/llvm/ADT/APInt.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/APInt.h Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/include/llvm/ADT/APInt.h Tue Jul 20 17:16:57 2010 (r210299) @@ -162,7 +162,7 @@ class APInt { /// /// @param radix 2, 8, 10, or 16 /// @brief Convert a char array into an APInt - void fromString(unsigned numBits, const StringRef &str, uint8_t radix); + void fromString(unsigned numBits, StringRef str, uint8_t radix); /// This is used by the toString method to divide by the radix. It simply /// provides a more convenient form of divide for internal use since KnuthDiv @@ -248,7 +248,7 @@ public: /// @param str the string to be interpreted /// @param radix the radix to use for the conversion /// @brief Construct an APInt from a string representation. - APInt(unsigned numBits, const StringRef &str, uint8_t radix); + APInt(unsigned numBits, StringRef str, uint8_t radix); /// Simply makes *this a copy of that. /// @brief Copy Constructor. @@ -1153,7 +1153,7 @@ public: /// This method determines how many bits are required to hold the APInt /// equivalent of the string given by \arg str. /// @brief Get bits required for string value. - static unsigned getBitsNeeded(const StringRef& str, uint8_t radix); + static unsigned getBitsNeeded(StringRef str, uint8_t radix); /// countLeadingZeros - This function is an APInt version of the /// countLeadingZeros_{32,64} functions in MathExtras.h. It counts the number Copied: head/contrib/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h (from r210288, vendor/llvm/dist/include/llvm/ADT/DAGDeltaAlgorithm.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/include/llvm/ADT/DAGDeltaAlgorithm.h Tue Jul 20 17:16:57 2010 (r210299, copy of r210288, vendor/llvm/dist/include/llvm/ADT/DAGDeltaAlgorithm.h) @@ -0,0 +1,75 @@ +//===--- DAGDeltaAlgorithm.h - A DAG Minimization Algorithm ----*- C++ -*--===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +//===----------------------------------------------------------------------===// + +#ifndef LLVM_ADT_DAGDELTAALGORITHM_H +#define LLVM_ADT_DAGDELTAALGORITHM_H + +#include +#include + +namespace llvm { + +/// DAGDeltaAlgorithm - Implements a "delta debugging" algorithm for minimizing +/// directed acyclic graphs using a predicate function. +/// +/// The result of the algorithm is a subset of the input change set which is +/// guaranteed to satisfy the predicate, assuming that the input set did. For +/// well formed predicates, the result set is guaranteed to be such that +/// removing any single element not required by the dependencies on the other +/// elements would falsify the predicate. +/// +/// The DAG should be used to represent dependencies in the changes which are +/// likely to hold across the predicate function. That is, for a particular +/// changeset S and predicate P: +/// +/// P(S) => P(S union pred(S)) +/// +/// The minization algorithm uses this dependency information to attempt to +/// eagerly prune large subsets of changes. As with \see DeltaAlgorithm, the DAG +/// is not required to satisfy this property, but the algorithm will run +/// substantially fewer tests with appropriate dependencies. \see DeltaAlgorithm +/// for more information on the properties which the predicate function itself +/// should satisfy. +class DAGDeltaAlgorithm { +public: + typedef unsigned change_ty; + typedef std::pair edge_ty; + + // FIXME: Use a decent data structure. + typedef std::set changeset_ty; + typedef std::vector changesetlist_ty; + +public: + virtual ~DAGDeltaAlgorithm() {} + + /// Run - Minimize the DAG formed by the \arg Changes vertices and the \arg + /// Dependencies edges by executing \see ExecuteOneTest() on subsets of + /// changes and returning the smallest set which still satisfies the test + /// predicate and the input \arg Dependencies. + /// + /// \param Changes The list of changes. + /// + /// \param Dependencies The list of dependencies amongst changes. For each + /// (x,y) in \arg Dependencies, both x and y must be in \arg Changes. The + /// minimization algorithm guarantees that for each tested changed set S, x + /// \in S implies y \in S. It is an error to have cyclic dependencies. + changeset_ty Run(const changeset_ty &Changes, + const std::vector &Dependencies); + + /// UpdatedSearchState - Callback used when the search state changes. + virtual void UpdatedSearchState(const changeset_ty &Changes, + const changesetlist_ty &Sets, + const changeset_ty &Required) {} + + /// ExecuteOneTest - Execute a single test predicate on the change set \arg S. + virtual bool ExecuteOneTest(const changeset_ty &S) = 0; +}; + +} // end namespace llvm + +#endif Modified: head/contrib/llvm/include/llvm/ADT/DenseMap.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/DenseMap.h Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/include/llvm/ADT/DenseMap.h Tue Jul 20 17:16:57 2010 (r210299) @@ -22,6 +22,7 @@ #include #include #include +#include #include namespace llvm { Modified: head/contrib/llvm/include/llvm/ADT/EquivalenceClasses.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/EquivalenceClasses.h Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/include/llvm/ADT/EquivalenceClasses.h Tue Jul 20 17:16:57 2010 (r210299) @@ -169,7 +169,7 @@ public: /// getOrInsertLeaderValue - Return the leader for the specified value that is /// in the set. If the member is not in the set, it is inserted, then /// returned. - const ElemTy &getOrInsertLeaderValue(const ElemTy &V) const { + const ElemTy &getOrInsertLeaderValue(const ElemTy &V) { member_iterator MI = findLeader(insert(V)); assert(MI != member_end() && "Value is not in the set!"); return *MI; Modified: head/contrib/llvm/include/llvm/ADT/FoldingSet.h ============================================================================== --- head/contrib/llvm/include/llvm/ADT/FoldingSet.h Tue Jul 20 15:48:29 2010 (r210298) +++ head/contrib/llvm/include/llvm/ADT/FoldingSet.h Tue Jul 20 17:16:57 2010 (r210299) @@ -166,6 +166,14 @@ public: /// FindNodeOrInsertPos. void InsertNode(Node *N, void *InsertPos); + /// InsertNode - Insert the specified node into the folding set, knowing that + /// it is not already in the folding set. + void InsertNode(Node *N) { + Node *Inserted = GetOrInsertNode(N); + (void)Inserted; + assert(Inserted == N && "Node already inserted!"); + } + /// size - Returns the number of nodes in the folding set. unsigned size() const { return NumNodes; } @@ -196,6 +204,10 @@ protected: template struct FoldingSetTrait { static inline void Profile(const T& X, FoldingSetNodeID& ID) { X.Profile(ID);} static inline void Profile(T& X, FoldingSetNodeID& ID) { X.Profile(ID); } + template + static inline void Profile(T &X, FoldingSetNodeID &ID, Ctx Context) { + X.Profile(ID, Context); + } }; //===--------------------------------------------------------------------===// @@ -322,6 +334,77 @@ public: }; //===----------------------------------------------------------------------===// +/// ContextualFoldingSet - This template class is a further refinement +/// of FoldingSet which provides a context argument when calling +/// Profile on its nodes. Currently, that argument is fixed at +/// initialization time. +/// +/// T must be a subclass of FoldingSetNode and implement a Profile +/// function with signature +/// void Profile(llvm::FoldingSetNodeID &, Ctx); +template +class ContextualFoldingSet : public FoldingSetImpl { + // Unfortunately, this can't derive from FoldingSet because the + // construction vtable for FoldingSet requires + // FoldingSet::GetNodeProfile to be instantiated, which in turn + // requires a single-argument T::Profile(). + +private: + Ctx Context; + + /// GetNodeProfile - Each instantiatation of the FoldingSet needs to provide a + /// way to convert nodes into a unique specifier. + virtual void GetNodeProfile(FoldingSetNodeID &ID, + FoldingSetImpl::Node *N) const { + T *TN = static_cast(N); + + // We must use explicit template arguments in case Ctx is a + // reference type. + FoldingSetTrait::template Profile(*TN, ID, Context); + } + +public: + explicit ContextualFoldingSet(Ctx Context, unsigned Log2InitSize = 6) + : FoldingSetImpl(Log2InitSize), Context(Context) + {} + + Ctx getContext() const { return Context; } + + + typedef FoldingSetIterator iterator; + iterator begin() { return iterator(Buckets); } + iterator end() { return iterator(Buckets+NumBuckets); } + + typedef FoldingSetIterator const_iterator; + const_iterator begin() const { return const_iterator(Buckets); } + const_iterator end() const { return const_iterator(Buckets+NumBuckets); } + + typedef FoldingSetBucketIterator bucket_iterator; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 17:42:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 746EB106567B; Tue, 20 Jul 2010 17:42:13 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6365E8FC21; Tue, 20 Jul 2010 17:42:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KHgDTR063253; Tue, 20 Jul 2010 17:42:13 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KHgDa2063251; Tue, 20 Jul 2010 17:42:13 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201007201742.o6KHgDa2063251@svn.freebsd.org> From: Xin LI Date: Tue, 20 Jul 2010 17:42:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210300 - head/usr.sbin/watchdogd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 17:42:13 -0000 Author: delphij Date: Tue Jul 20 17:42:13 2010 New Revision: 210300 URL: http://svn.freebsd.org/changeset/base/210300 Log: Staticify local variables. While I'm there also add a 'static' keyword for a function to make it consistent with prototype. Reviewed by: phk MFC after: 3 months Modified: head/usr.sbin/watchdogd/watchdogd.c Modified: head/usr.sbin/watchdogd/watchdogd.c ============================================================================== --- head/usr.sbin/watchdogd/watchdogd.c Tue Jul 20 17:16:57 2010 (r210299) +++ head/usr.sbin/watchdogd/watchdogd.c Tue Jul 20 17:42:13 2010 (r210300) @@ -1,4 +1,4 @@ -/* +/*- * Copyright (c) 2003-2004 Sean M. Kelly * All rights reserved. * @@ -58,17 +58,15 @@ static int watchdog_onoff(int onoff); static int watchdog_patpat(u_int timeout); static void usage(void); -int debugging = 0; -int end_program = 0; -const char *pidfile = _PATH_VARRUN "watchdogd.pid"; -int reset_mib[3]; -size_t reset_miblen = 3; -u_int timeout = WD_TO_16SEC; -u_int passive = 0; -int is_daemon = 0; -int fd = -1; -int nap = 1; -char *test_cmd = NULL; +static int debugging = 0; +static int end_program = 0; +static const char *pidfile = _PATH_VARRUN "watchdogd.pid"; +static u_int timeout = WD_TO_16SEC; +static u_int passive = 0; +static int is_daemon = 0; +static int fd = -1; +static int nap = 1; +static char *test_cmd = NULL; /* * Periodically pat the watchdog, preventing it from firing. @@ -195,7 +193,7 @@ watchdog_loop(void) * Reset the watchdog timer. This function must be called periodically * to keep the watchdog from firing. */ -int +static int watchdog_patpat(u_int t) { From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 17:57:04 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5F9471065674; Tue, 20 Jul 2010 17:57:04 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4CE2F8FC1C; Tue, 20 Jul 2010 17:57:04 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KHv45r066651; Tue, 20 Jul 2010 17:57:04 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KHv4IC066648; Tue, 20 Jul 2010 17:57:04 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201007201757.o6KHv4IC066648@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 20 Jul 2010 17:57:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210301 - stable/7/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 17:57:04 -0000 Author: gnn Date: Tue Jul 20 17:57:03 2010 New Revision: 210301 URL: http://svn.freebsd.org/changeset/base/210301 Log: MFC r210012: Fix a panic brought about by writing an MSR without a proper mask. All of the necessary wrmsr calls are now preceded by a rdmsr and we leave the reserved bits alone. Document the bits in the relevant registers for future reference. Tested by: mdf Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c stable/7/sys/dev/hwpmc/hwpmc_core.h Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_core.c Tue Jul 20 17:42:13 2010 (r210300) +++ stable/7/sys/dev/hwpmc/hwpmc_core.c Tue Jul 20 17:57:03 2010 (r210301) @@ -147,6 +147,7 @@ core_pcpu_fini(struct pmc_mdep *md, int int core_ri, n, npmc; struct pmc_cpu *pc; struct core_cpu *cc; + uint64_t msr = 0; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] insane cpu number (%d)", __LINE__, cpu)); @@ -166,11 +167,14 @@ core_pcpu_fini(struct pmc_mdep *md, int npmc = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_num; core_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_ri; - for (n = 0; n < npmc; n++) - wrmsr(IAP_EVSEL0 + n, 0); + for (n = 0; n < npmc; n++) { + msr = rdmsr(IAP_EVSEL0 + n); + wrmsr(IAP_EVSEL0 + n, msr & ~IAP_EVSEL_MASK); + } if (core_cputype != PMC_CPU_INTEL_CORE) { - wrmsr(IAF_CTRL, 0); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK); npmc += md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAF].pcd_num; } @@ -374,6 +378,7 @@ iaf_start_pmc(int cpu, int ri) { struct pmc *pm; struct core_cpu *iafc; + uint64_t msr = 0; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal CPU value %d", __LINE__, cpu)); @@ -387,12 +392,15 @@ iaf_start_pmc(int cpu, int ri) iafc->pc_iafctrl |= pm->pm_md.pm_iaf.pm_iaf_ctrl; - wrmsr(IAF_CTRL, iafc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); do { iafc->pc_resync = 0; iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET)); - wrmsr(IA_GLOBAL_CTRL, iafc->pc_globalctrl); + msr = rdmsr(IA_GLOBAL_CTRL); + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); PMCDBG(MDP,STA,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", @@ -407,6 +415,7 @@ iaf_stop_pmc(int cpu, int ri) { uint32_t fc; struct core_cpu *iafc; + uint64_t msr = 0; PMCDBG(MDP,STO,1,"iaf-stop cpu=%d ri=%d", cpu, ri); @@ -425,12 +434,15 @@ iaf_stop_pmc(int cpu, int ri) iafc->pc_iafctrl &= ~fc; PMCDBG(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl); - wrmsr(IAF_CTRL, iafc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); do { iafc->pc_resync = 0; iafc->pc_globalctrl &= ~(1ULL << (ri + IAF_OFFSET)); - wrmsr(IA_GLOBAL_CTRL, iafc->pc_globalctrl); + msr = rdmsr(IA_GLOBAL_CTRL); + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); PMCDBG(MDP,STO,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", @@ -445,6 +457,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value { struct core_cpu *cc; struct pmc *pm; + uint64_t msr; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); @@ -460,9 +473,11 @@ iaf_write_pmc(int cpu, int ri, pmc_value if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = iaf_reload_count_to_perfctr_value(v); - wrmsr(IAF_CTRL, 0); /* Turn off fixed counters */ - wrmsr(IAF_CTR0 + ri, v); - wrmsr(IAF_CTRL, cc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK); + wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1)); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (cc->pc_iafctrl & IAF_CTRL_MASK)); PMCDBG(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx " "pmc=%jx", cpu, ri, IAF_RI_TO_MSR(ri), v, @@ -1879,6 +1894,7 @@ iap_stop_pmc(int cpu, int ri) { struct pmc *pm; struct core_cpu *cc; + uint64_t msr; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); @@ -1894,7 +1910,8 @@ iap_stop_pmc(int cpu, int ri) PMCDBG(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri); - wrmsr(IAP_EVSEL0 + ri, 0); /* stop hw */ + msr = rdmsr(IAP_EVSEL0 + ri); + wrmsr(IAP_EVSEL0 + ri, msr & IAP_EVSEL_MASK); /* stop hw */ if (core_cputype == PMC_CPU_INTEL_CORE) return (0); @@ -1937,7 +1954,7 @@ iap_write_pmc(int cpu, int ri, pmc_value * a stopped state when the pcd_write() entry point is called. */ - wrmsr(IAP_PMC0 + ri, v); + wrmsr(IAP_PMC0 + ri, v & ((1ULL << core_iap_width) - 1)); return (0); } @@ -1987,6 +2004,7 @@ core_intr(int cpu, struct trapframe *tf) struct pmc *pm; struct core_cpu *cc; int error, found_interrupt, ri; + uint64_t msr = 0; PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); @@ -2018,7 +2036,8 @@ core_intr(int cpu, struct trapframe *tf) * Stop the counter, reload it but only restart it if * the PMC is not stalled. */ - wrmsr(IAP_EVSEL0 + ri, 0); + msr = rdmsr(IAP_EVSEL0 + ri); + wrmsr(IAP_EVSEL0 + ri, msr & ~IAP_EVSEL_MASK); wrmsr(IAP_PMC0 + ri, v); if (error) Modified: stable/7/sys/dev/hwpmc/hwpmc_core.h ============================================================================== --- stable/7/sys/dev/hwpmc/hwpmc_core.h Tue Jul 20 17:42:13 2010 (r210300) +++ stable/7/sys/dev/hwpmc/hwpmc_core.h Tue Jul 20 17:57:03 2010 (r210301) @@ -67,20 +67,59 @@ struct pmc_md_iap_op_pmcallocate { /* * Fixed-function counters. */ + #define IAF_MASK 0xF +#define IAF_COUNTER_MASK 0x0000ffffffffffff #define IAF_CTR0 0x309 #define IAF_CTR1 0x30A #define IAF_CTR2 0x30B +/* + * The IAF_CTRL MSR is laid out in the following way. + * + * Bit Position Use + * 63 - 12 Reserved (do not touch) + * 11 Ctr 2 PMI + * 10 Reserved (do not touch) + * 9-8 Ctr 2 Enable + * 7 Ctr 1 PMI + * 6 Reserved (do not touch) + * 5-4 Ctr 1 Enable + * 3 Ctr 0 PMI + * 2 Reserved (do not touch) + * 1-0 Ctr 0 Enable (3: All Levels, 2: User, 1: OS, 0: Disable) + */ + #define IAF_OFFSET 32 #define IAF_CTRL 0x38D +#define IAF_CTRL_MASK 0x0000000000000bbb /* * Programmable counters. */ #define IAP_PMC0 0x0C1 + +/* + * IAP_EVSEL(n) is laid out in the following way. + * + * Bit Position Use + * 63-31 Reserved (do not touch) + * 31-24 Counter Mask + * 23 Invert + * 22 Enable + * 21 Reserved (do not touch) + * 20 APIC Interrupt Enable + * 19 Pin Control + * 18 Edge Detect + * 17 OS + * 16 User + * 15-8 Unit Mask + * 7-0 Event Select + */ + +#define IAP_EVSEL_MASK 0x00000000ffdfffff #define IAP_EVSEL0 0x186 /* @@ -90,6 +129,21 @@ struct pmc_md_iap_op_pmcallocate { #define IA_GLOBAL_STATUS 0x38E #define IA_GLOBAL_CTRL 0x38F + +/* + * IA_GLOBAL_CTRL is layed out in the following way. + * + * Bit Position Use + * 63-35 Reserved (do not touch) + * 34 IAF Counter 2 Enable + * 33 IAF Counter 1 Enable + * 32 IAF Counter 0 Enable + * 31-0 Depends on programmable counters + */ + +/* The mask is only for the fixed porttion of the register. */ +#define IAF_GLOBAL_CTRL_MASK 0x0000000700000000 + #define IA_GLOBAL_OVF_CTRL 0x390 #define IA_GLOBAL_STATUS_FLAG_CONDCHG (1ULL << 63) From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 17:57:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 29F7C106577B; Tue, 20 Jul 2010 17:57:10 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C41288FC0A; Tue, 20 Jul 2010 17:57:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KHvAiR066720; Tue, 20 Jul 2010 17:57:10 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KHvAoh066717; Tue, 20 Jul 2010 17:57:10 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201007201757.o6KHvAoh066717@svn.freebsd.org> From: "George V. Neville-Neil" Date: Tue, 20 Jul 2010 17:57:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210302 - stable/8/sys/dev/hwpmc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 17:57:11 -0000 Author: gnn Date: Tue Jul 20 17:57:10 2010 New Revision: 210302 URL: http://svn.freebsd.org/changeset/base/210302 Log: MFC r210012: Fix a panic brought about by writing an MSR without a proper mask. All of the necessary wrmsr calls are now preceded by a rdmsr and we leave the reserved bits alone. Document the bits in the relevant registers for future reference. Tested by: mdf Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c stable/8/sys/dev/hwpmc/hwpmc_core.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_core.c Tue Jul 20 17:57:03 2010 (r210301) +++ stable/8/sys/dev/hwpmc/hwpmc_core.c Tue Jul 20 17:57:10 2010 (r210302) @@ -147,6 +147,7 @@ core_pcpu_fini(struct pmc_mdep *md, int int core_ri, n, npmc; struct pmc_cpu *pc; struct core_cpu *cc; + uint64_t msr = 0; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] insane cpu number (%d)", __LINE__, cpu)); @@ -166,11 +167,14 @@ core_pcpu_fini(struct pmc_mdep *md, int npmc = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_num; core_ri = md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAP].pcd_ri; - for (n = 0; n < npmc; n++) - wrmsr(IAP_EVSEL0 + n, 0); + for (n = 0; n < npmc; n++) { + msr = rdmsr(IAP_EVSEL0 + n); + wrmsr(IAP_EVSEL0 + n, msr & ~IAP_EVSEL_MASK); + } if (core_cputype != PMC_CPU_INTEL_CORE) { - wrmsr(IAF_CTRL, 0); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK); npmc += md->pmd_classdep[PMC_MDEP_CLASS_INDEX_IAF].pcd_num; } @@ -374,6 +378,7 @@ iaf_start_pmc(int cpu, int ri) { struct pmc *pm; struct core_cpu *iafc; + uint64_t msr = 0; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal CPU value %d", __LINE__, cpu)); @@ -387,12 +392,15 @@ iaf_start_pmc(int cpu, int ri) iafc->pc_iafctrl |= pm->pm_md.pm_iaf.pm_iaf_ctrl; - wrmsr(IAF_CTRL, iafc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); do { iafc->pc_resync = 0; iafc->pc_globalctrl |= (1ULL << (ri + IAF_OFFSET)); - wrmsr(IA_GLOBAL_CTRL, iafc->pc_globalctrl); + msr = rdmsr(IA_GLOBAL_CTRL); + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); PMCDBG(MDP,STA,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", @@ -407,6 +415,7 @@ iaf_stop_pmc(int cpu, int ri) { uint32_t fc; struct core_cpu *iafc; + uint64_t msr = 0; PMCDBG(MDP,STO,1,"iaf-stop cpu=%d ri=%d", cpu, ri); @@ -425,12 +434,15 @@ iaf_stop_pmc(int cpu, int ri) iafc->pc_iafctrl &= ~fc; PMCDBG(MDP,STO,1,"iaf-stop iafctrl=%x", iafc->pc_iafctrl); - wrmsr(IAF_CTRL, iafc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (iafc->pc_iafctrl & IAF_CTRL_MASK)); do { iafc->pc_resync = 0; iafc->pc_globalctrl &= ~(1ULL << (ri + IAF_OFFSET)); - wrmsr(IA_GLOBAL_CTRL, iafc->pc_globalctrl); + msr = rdmsr(IA_GLOBAL_CTRL); + wrmsr(IA_GLOBAL_CTRL, msr | (iafc->pc_globalctrl & + IAF_GLOBAL_CTRL_MASK)); } while (iafc->pc_resync != 0); PMCDBG(MDP,STO,1,"iafctrl=%x(%x) globalctrl=%jx(%jx)", @@ -445,6 +457,7 @@ iaf_write_pmc(int cpu, int ri, pmc_value { struct core_cpu *cc; struct pmc *pm; + uint64_t msr; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); @@ -460,9 +473,11 @@ iaf_write_pmc(int cpu, int ri, pmc_value if (PMC_IS_SAMPLING_MODE(PMC_TO_MODE(pm))) v = iaf_reload_count_to_perfctr_value(v); - wrmsr(IAF_CTRL, 0); /* Turn off fixed counters */ - wrmsr(IAF_CTR0 + ri, v); - wrmsr(IAF_CTRL, cc->pc_iafctrl); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr & ~IAF_CTRL_MASK); + wrmsr(IAF_CTR0 + ri, v & ((1ULL << core_iaf_width) - 1)); + msr = rdmsr(IAF_CTRL); + wrmsr(IAF_CTRL, msr | (cc->pc_iafctrl & IAF_CTRL_MASK)); PMCDBG(MDP,WRI,1, "iaf-write cpu=%d ri=%d msr=0x%x v=%jx iafctrl=%jx " "pmc=%jx", cpu, ri, IAF_RI_TO_MSR(ri), v, @@ -1879,6 +1894,7 @@ iap_stop_pmc(int cpu, int ri) { struct pmc *pm; struct core_cpu *cc; + uint64_t msr; KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[core,%d] illegal cpu value %d", __LINE__, cpu)); @@ -1894,7 +1910,8 @@ iap_stop_pmc(int cpu, int ri) PMCDBG(MDP,STO,1, "iap-stop cpu=%d ri=%d", cpu, ri); - wrmsr(IAP_EVSEL0 + ri, 0); /* stop hw */ + msr = rdmsr(IAP_EVSEL0 + ri); + wrmsr(IAP_EVSEL0 + ri, msr & IAP_EVSEL_MASK); /* stop hw */ if (core_cputype == PMC_CPU_INTEL_CORE) return (0); @@ -1937,7 +1954,7 @@ iap_write_pmc(int cpu, int ri, pmc_value * a stopped state when the pcd_write() entry point is called. */ - wrmsr(IAP_PMC0 + ri, v); + wrmsr(IAP_PMC0 + ri, v & ((1ULL << core_iap_width) - 1)); return (0); } @@ -1987,6 +2004,7 @@ core_intr(int cpu, struct trapframe *tf) struct pmc *pm; struct core_cpu *cc; int error, found_interrupt, ri; + uint64_t msr = 0; PMCDBG(MDP,INT, 1, "cpu=%d tf=0x%p um=%d", cpu, (void *) tf, TRAPF_USERMODE(tf)); @@ -2018,7 +2036,8 @@ core_intr(int cpu, struct trapframe *tf) * Stop the counter, reload it but only restart it if * the PMC is not stalled. */ - wrmsr(IAP_EVSEL0 + ri, 0); + msr = rdmsr(IAP_EVSEL0 + ri); + wrmsr(IAP_EVSEL0 + ri, msr & ~IAP_EVSEL_MASK); wrmsr(IAP_PMC0 + ri, v); if (error) Modified: stable/8/sys/dev/hwpmc/hwpmc_core.h ============================================================================== --- stable/8/sys/dev/hwpmc/hwpmc_core.h Tue Jul 20 17:57:03 2010 (r210301) +++ stable/8/sys/dev/hwpmc/hwpmc_core.h Tue Jul 20 17:57:10 2010 (r210302) @@ -67,20 +67,59 @@ struct pmc_md_iap_op_pmcallocate { /* * Fixed-function counters. */ + #define IAF_MASK 0xF +#define IAF_COUNTER_MASK 0x0000ffffffffffff #define IAF_CTR0 0x309 #define IAF_CTR1 0x30A #define IAF_CTR2 0x30B +/* + * The IAF_CTRL MSR is laid out in the following way. + * + * Bit Position Use + * 63 - 12 Reserved (do not touch) + * 11 Ctr 2 PMI + * 10 Reserved (do not touch) + * 9-8 Ctr 2 Enable + * 7 Ctr 1 PMI + * 6 Reserved (do not touch) + * 5-4 Ctr 1 Enable + * 3 Ctr 0 PMI + * 2 Reserved (do not touch) + * 1-0 Ctr 0 Enable (3: All Levels, 2: User, 1: OS, 0: Disable) + */ + #define IAF_OFFSET 32 #define IAF_CTRL 0x38D +#define IAF_CTRL_MASK 0x0000000000000bbb /* * Programmable counters. */ #define IAP_PMC0 0x0C1 + +/* + * IAP_EVSEL(n) is laid out in the following way. + * + * Bit Position Use + * 63-31 Reserved (do not touch) + * 31-24 Counter Mask + * 23 Invert + * 22 Enable + * 21 Reserved (do not touch) + * 20 APIC Interrupt Enable + * 19 Pin Control + * 18 Edge Detect + * 17 OS + * 16 User + * 15-8 Unit Mask + * 7-0 Event Select + */ + +#define IAP_EVSEL_MASK 0x00000000ffdfffff #define IAP_EVSEL0 0x186 /* @@ -90,6 +129,21 @@ struct pmc_md_iap_op_pmcallocate { #define IA_GLOBAL_STATUS 0x38E #define IA_GLOBAL_CTRL 0x38F + +/* + * IA_GLOBAL_CTRL is layed out in the following way. + * + * Bit Position Use + * 63-35 Reserved (do not touch) + * 34 IAF Counter 2 Enable + * 33 IAF Counter 1 Enable + * 32 IAF Counter 0 Enable + * 31-0 Depends on programmable counters + */ + +/* The mask is only for the fixed porttion of the register. */ +#define IAF_GLOBAL_CTRL_MASK 0x0000000700000000 + #define IA_GLOBAL_OVF_CTRL 0x390 #define IA_GLOBAL_STATUS_FLAG_CONDCHG (1ULL << 63) From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 18:28:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 941471065678; Tue, 20 Jul 2010 18:28:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 4A4978FC1B; Tue, 20 Jul 2010 18:28:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KISZQH073836; Tue, 20 Jul 2010 18:28:35 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KISZlt073832; Tue, 20 Jul 2010 18:28:35 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201828.o6KISZlt073832@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 18:28:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210303 - in stable/8/sys: dev/syscons isa X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 18:28:35 -0000 Author: jkim Date: Tue Jul 20 18:28:34 2010 New Revision: 210303 URL: http://svn.freebsd.org/changeset/base/210303 Log: MFC: r208411, r208412, r208413, r208564, r208567, r210149 - Suspend screen updates when the video controller is powered down. - Let the first device suspend and the last device resume syscons(4). - Do not attempt to switch to the same VTs between suspend and resume. - When we are not switching VTs, just mark all buffer to be updated. - Fix some style(9) nits. Modified: stable/8/sys/dev/syscons/syscons.c stable/8/sys/dev/syscons/syscons.h stable/8/sys/isa/syscons_isa.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/syscons/syscons.c ============================================================================== --- stable/8/sys/dev/syscons/syscons.c Tue Jul 20 17:57:10 2010 (r210302) +++ stable/8/sys/dev/syscons/syscons.c Tue Jul 20 18:28:34 2010 (r210303) @@ -1688,7 +1688,7 @@ sccnupdate(scr_stat *scp) { /* this is a cut-down version of scrn_timer()... */ - if (scp->sc->font_loading_in_progress) + if (scp->sc->suspend_in_progress || scp->sc->font_loading_in_progress) return; if (debugger > 0 || panicstr || shutdown_in_progress) { @@ -1738,7 +1738,7 @@ scrn_timer(void *arg) return; /* don't do anything when we are performing some I/O operations */ - if (sc->font_loading_in_progress) { + if (sc->suspend_in_progress || sc->font_loading_in_progress) { if (again) timeout(scrn_timer, sc, hz / 10); return; Modified: stable/8/sys/dev/syscons/syscons.h ============================================================================== --- stable/8/sys/dev/syscons/syscons.h Tue Jul 20 17:57:10 2010 (r210302) +++ stable/8/sys/dev/syscons/syscons.h Tue Jul 20 18:28:34 2010 (r210303) @@ -230,6 +230,7 @@ typedef struct sc_softc { char switch_in_progress; char write_in_progress; char blink_in_progress; + char suspend_in_progress; struct mtx video_mtx; long scrn_time_stamp; Modified: stable/8/sys/isa/syscons_isa.c ============================================================================== --- stable/8/sys/isa/syscons_isa.c Tue Jul 20 17:57:10 2010 (r210302) +++ stable/8/sys/isa/syscons_isa.c Tue Jul 20 18:28:34 2010 (r210303) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); static devclass_t sc_devclass; -static sc_softc_t main_softc; +static sc_softc_t main_softc; #ifdef SC_NO_SUSPEND_VTYSWITCH static int sc_no_suspend_vtswitch = 1; #else @@ -76,26 +76,28 @@ static int sc_no_suspend_vtswitch = 0; #endif static int sc_cur_scr; -TUNABLE_INT("hw.syscons.sc_no_suspend_vtswitch", (int *)&sc_no_suspend_vtswitch); +TUNABLE_INT("hw.syscons.sc_no_suspend_vtswitch", &sc_no_suspend_vtswitch); SYSCTL_DECL(_hw_syscons); SYSCTL_INT(_hw_syscons, OID_AUTO, sc_no_suspend_vtswitch, CTLFLAG_RW, - &sc_no_suspend_vtswitch, 0, "Disable VT switch before suspend."); + &sc_no_suspend_vtswitch, 0, "Disable VT switch before suspend."); static void -scidentify (driver_t *driver, device_t parent) +scidentify(driver_t *driver, device_t parent) { + BUS_ADD_CHILD(parent, ISA_ORDER_SPECULATIVE, "sc", 0); } static int scprobe(device_t dev) { + /* No pnp support */ if (isa_get_vendorid(dev)) return (ENXIO); device_set_desc(dev, "System console"); - return sc_probe_unit(device_get_unit(dev), device_get_flags(dev)); + return (sc_probe_unit(device_get_unit(dev), device_get_flags(dev))); } static int @@ -117,18 +119,17 @@ scsuspend(device_t dev) if (sc->cur_scp == NULL) return (0); - sc_cur_scr = sc->cur_scp->index; - - if (sc_no_suspend_vtswitch) - return (0); - - do { - sc_switch_scr(sc, 0); - if (!sc->switch_in_progress) { - break; - } - pause("scsuspend", hz); - } while (retry--); + if (sc->suspend_in_progress == 0) { + sc_cur_scr = sc->cur_scp->index; + if (!sc_no_suspend_vtswitch && sc_cur_scr != 0) + do { + sc_switch_scr(sc, 0); + if (!sc->switch_in_progress) + break; + pause("scsuspend", hz); + } while (retry--); + } + sc->suspend_in_progress++; return (0); } @@ -138,11 +139,18 @@ scresume(device_t dev) { sc_softc_t *sc; - if (sc_no_suspend_vtswitch) + sc = &main_softc; + + if (sc->cur_scp == NULL) return (0); - sc = &main_softc; - sc_switch_scr(sc, sc_cur_scr); + sc->suspend_in_progress--; + if (sc->suspend_in_progress == 0) { + if (!sc_no_suspend_vtswitch && sc_cur_scr != 0) + sc_switch_scr(sc, sc_cur_scr); + else + mark_all(sc->cur_scp); + } return (0); } @@ -150,7 +158,8 @@ scresume(device_t dev) int sc_max_unit(void) { - return devclass_get_maxunit(sc_devclass); + + return (devclass_get_maxunit(sc_devclass)); } sc_softc_t @@ -159,53 +168,53 @@ sc_softc_t sc_softc_t *sc; if (unit < 0) - return NULL; - if (flags & SC_KERNEL_CONSOLE) { + return (NULL); + if ((flags & SC_KERNEL_CONSOLE) != 0) { /* FIXME: clear if it is wired to another unit! */ sc = &main_softc; } else { - sc = (sc_softc_t *)device_get_softc(devclass_get_device(sc_devclass, unit)); + sc = device_get_softc(devclass_get_device(sc_devclass, unit)); if (sc == NULL) - return NULL; + return (NULL); } sc->unit = unit; - if (!(sc->flags & SC_INIT_DONE)) { + if ((sc->flags & SC_INIT_DONE) == 0) { sc->keyboard = -1; sc->adapter = -1; sc->cursor_char = SC_CURSOR_CHAR; sc->mouse_char = SC_MOUSE_CHAR; } - return sc; + return (sc); } sc_softc_t *sc_find_softc(struct video_adapter *adp, struct keyboard *kbd) { sc_softc_t *sc; - int units; int i; + int units; sc = &main_softc; - if (((adp == NULL) || (adp == sc->adp)) - && ((kbd == NULL) || (kbd == sc->kbd))) - return sc; + if ((adp == NULL || adp == sc->adp) && + (kbd == NULL || kbd == sc->kbd)) + return (sc); units = devclass_get_maxunit(sc_devclass); for (i = 0; i < units; ++i) { - sc = (sc_softc_t *)device_get_softc(devclass_get_device(sc_devclass, i)); + sc = device_get_softc(devclass_get_device(sc_devclass, i)); if (sc == NULL) continue; - if (((adp == NULL) || (adp == sc->adp)) - && ((kbd == NULL) || (kbd == sc->kbd))) - return sc; + if ((adp == NULL || adp == sc->adp) && + (kbd == NULL || kbd == sc->kbd)) + return (sc); } - return NULL; + return (NULL); } int sc_get_cons_priority(int *unit, int *flags) { const char *at; - int u, f; + int f, u; #ifdef XBOX /* @@ -216,7 +225,7 @@ sc_get_cons_priority(int *unit, int *fla if (arch_i386_is_xbox) { *unit = 0; *flags = SC_KERNEL_CONSOLE; - return CN_INTERNAL; + return (CN_INTERNAL); } #endif @@ -245,24 +254,24 @@ sc_get_cons_priority(int *unit, int *fla *flags = 0; } #if 0 - return ((*flags & SC_KERNEL_CONSOLE) ? CN_INTERNAL : CN_NORMAL); + return ((*flags & SC_KERNEL_CONSOLE) != 0 ? CN_INTERNAL : CN_NORMAL); #endif - return CN_INTERNAL; + return (CN_INTERNAL); } void sc_get_bios_values(bios_values_t *values) { #if defined(__i386__) || defined(__amd64__) - u_int8_t shift; + uint8_t shift; - values->cursor_start = *(u_int8_t *)BIOS_PADDRTOVADDR(0x461); - values->cursor_end = *(u_int8_t *)BIOS_PADDRTOVADDR(0x460); - shift = *(u_int8_t *)BIOS_PADDRTOVADDR(0x417); - values->shift_state = ((shift & BIOS_CLKED) ? CLKED : 0) - | ((shift & BIOS_NLKED) ? NLKED : 0) - | ((shift & BIOS_SLKED) ? SLKED : 0) - | ((shift & BIOS_ALKED) ? ALKED : 0); + values->cursor_start = *(uint8_t *)BIOS_PADDRTOVADDR(0x461); + values->cursor_end = *(uint8_t *)BIOS_PADDRTOVADDR(0x460); + shift = *(uint8_t *)BIOS_PADDRTOVADDR(0x417); + values->shift_state = ((shift & BIOS_CLKED) != 0 ? CLKED : 0) | + ((shift & BIOS_NLKED) != 0 ? NLKED : 0) | + ((shift & BIOS_SLKED) != 0 ? SLKED : 0) | + ((shift & BIOS_ALKED) != 0 ? ALKED : 0); #else values->cursor_start = 0; values->cursor_end = 32; @@ -274,17 +283,17 @@ sc_get_bios_values(bios_values_t *values int sc_tone(int herz) { + #if defined(HAS_TIMER_SPKR) if (herz) { if (timer_spkr_acquire()) - return EBUSY; + return (EBUSY); timer_spkr_setfreq(herz); - } else { + } else timer_spkr_release(); - } #endif - return 0; + return (0); } static device_method_t sc_methods[] = { @@ -303,3 +312,70 @@ static driver_t sc_driver = { }; DRIVER_MODULE(sc, isa, sc_driver, sc_devclass, 0, 0); + +static devclass_t scpm_devclass; + +static void +scpm_identify(driver_t *driver, device_t parent) +{ + + device_add_child(parent, "scpm", 0); +} + +static int +scpm_probe(device_t dev) +{ + + device_set_desc(dev, SC_DRIVER_NAME " suspend/resume"); + device_quiet(dev); + + return (BUS_PROBE_DEFAULT); +} + +static int +scpm_attach(device_t dev) +{ + + bus_generic_probe(dev); + bus_generic_attach(dev); + + return (0); +} + +static int +scpm_suspend(device_t dev) +{ + int error; + + error = bus_generic_suspend(dev); + if (error != 0) + return (error); + + return (scsuspend(dev)); +} + +static int +scpm_resume(device_t dev) +{ + + scresume(dev); + + return (bus_generic_resume(dev)); +} + +static device_method_t scpm_methods[] = { + DEVMETHOD(device_identify, scpm_identify), + DEVMETHOD(device_probe, scpm_probe), + DEVMETHOD(device_attach, scpm_attach), + DEVMETHOD(device_suspend, scpm_suspend), + DEVMETHOD(device_resume, scpm_resume), + { 0, 0 } +}; + +static driver_t scpm_driver = { + "scpm", + scpm_methods, + 0 +}; + +DRIVER_MODULE(scpm, vgapm, scpm_driver, scpm_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 18:43:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A67D31065676; Tue, 20 Jul 2010 18:43:16 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 942EA8FC18; Tue, 20 Jul 2010 18:43:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KIhGxX077125; Tue, 20 Jul 2010 18:43:16 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KIhGSK077124; Tue, 20 Jul 2010 18:43:16 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201843.o6KIhGSK077124@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 18:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210304 - stable/8/sys/dev/fb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 18:43:16 -0000 Author: jkim Date: Tue Jul 20 18:43:15 2010 New Revision: 210304 URL: http://svn.freebsd.org/changeset/base/210304 Log: MFC: r209737, r209740 Fix a possible null pointer dereference and plug a possible memory leak. Modified: stable/8/sys/dev/fb/vesa.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/fb/vesa.c ============================================================================== --- stable/8/sys/dev/fb/vesa.c Tue Jul 20 18:28:34 2010 (r210303) +++ stable/8/sys/dev/fb/vesa.c Tue Jul 20 18:43:15 2010 (r210304) @@ -536,6 +536,8 @@ vesa_bios_save_restore(int code, void *p return (1); buf = x86bios_alloc(&offs, size); + if (buf == NULL) + return (1); x86bios_init_regs(®s); regs.R_AX = 0x4f04; @@ -836,7 +838,7 @@ vesa_bios_init(void) "version 1.2 or later is required.\n", ((vers & 0xf000) >> 12) * 10 + ((vers & 0x0f00) >> 8), ((vers & 0x00f0) >> 4) * 10 + (vers & 0x000f)); - return (1); + goto fail; } VESA_STRCPY(vesa_oemstr, buf->v_oemstr); From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 18:55:14 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9129F106568C; Tue, 20 Jul 2010 18:55:14 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6690B8FC1B; Tue, 20 Jul 2010 18:55:14 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KItEb0079809; Tue, 20 Jul 2010 18:55:14 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KItDMY079808; Tue, 20 Jul 2010 18:55:14 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201855.o6KItDMY079808@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 18:55:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210305 - stable/8/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 18:55:14 -0000 Author: jkim Date: Tue Jul 20 18:55:13 2010 New Revision: 210305 URL: http://svn.freebsd.org/changeset/base/210305 Log: MFC: r209836, r209949 Implement optional 'precision' for numbers. Previously, it was parsed but ignored. Some third-party modules (e.g., ACPICA) prefer this format over zero padding flag '0'. Modified: stable/8/sys/kern/subr_prf.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/kern/subr_prf.c ============================================================================== --- stable/8/sys/kern/subr_prf.c Tue Jul 20 18:43:15 2010 (r210304) +++ stable/8/sys/kern/subr_prf.c Tue Jul 20 18:55:13 2010 (r210305) @@ -800,7 +800,8 @@ number: neg = 1; num = -(intmax_t)num; } - p = ksprintn(nbuf, num, base, &tmp, upper); + p = ksprintn(nbuf, num, base, &n, upper); + tmp = 0; if (sharpflag && num != 0) { if (base == 8) tmp++; @@ -810,10 +811,13 @@ number: if (neg) tmp++; - if (!ladjust && padc != '0' && width - && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (!ladjust && padc == '0') + dwidth = width - tmp; + width -= tmp + imax(dwidth, n); + dwidth -= n; + if (!ladjust) + while (width-- > 0) + PCHAR(' '); if (neg) PCHAR('-'); if (sharpflag && num != 0) { @@ -824,16 +828,15 @@ number: PCHAR('x'); } } - if (!ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + while (dwidth-- > 0) + PCHAR('0'); while (*p) PCHAR(*p--); - if (ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (ladjust) + while (width-- > 0) + PCHAR(' '); break; default: From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 18:59:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A7109106566B; Tue, 20 Jul 2010 18:59:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 94AE08FC08; Tue, 20 Jul 2010 18:59:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KIxAG1080790; Tue, 20 Jul 2010 18:59:10 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KIxAYE080788; Tue, 20 Jul 2010 18:59:10 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201859.o6KIxAYE080788@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 18:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210306 - stable/8/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 18:59:10 -0000 Author: jkim Date: Tue Jul 20 18:59:10 2010 New Revision: 210306 URL: http://svn.freebsd.org/changeset/base/210306 Log: MFC: r209837, r209842, r209949 Sync. printf() of libstand(3) with sys/kern/subr_prf.c. CVS r1.94 jhb: Cast the integer read as the first argument for %b to an unsigned integer so it's value is not sign extended when assigned to the uintmax_t variable used internally by printf. For example, if bit 31 is set in the cpuid feature word, then %b would print out the initial value as a 16 character hexadecimal value. Now it only prints out an 8 character value. CVS r1.109 njl: Add support for 'h' and 'hh' modifiers for printf(9). CVS r1.117 phk: If we ignore an unknown % sequence, we must stop interpreting the remaining % arguments because the varargs are now out of sync and there is a risk that we might for instance dereference an integer in a %s argument. SVN r209836 jkim: Implement optional 'precision' for numbers. Previously, it was parsed but ignored. Some third-party modules (e.g., ACPICA) prefer this format over zero padding flag '0'. Modified: stable/8/lib/libstand/printf.c Directory Properties: stable/8/lib/libstand/ (props changed) Modified: stable/8/lib/libstand/printf.c ============================================================================== --- stable/8/lib/libstand/printf.c Tue Jul 20 18:55:13 2010 (r210305) +++ stable/8/lib/libstand/printf.c Tue Jul 20 18:59:10 2010 (r210306) @@ -159,10 +159,10 @@ kvprintf(char const *fmt, void (*func)(i int ch, n; uintmax_t num; int base, lflag, qflag, tmp, width, ladjust, sharpflag, neg, sign, dot; - int jflag, tflag, zflag; + int cflag, hflag, jflag, tflag, zflag; int dwidth, upper; char padc; - int retval = 0; + int stop = 0, retval = 0; num = 0; if (!func) @@ -179,7 +179,7 @@ kvprintf(char const *fmt, void (*func)(i for (;;) { padc = ' '; width = 0; - while ((ch = (u_char)*fmt++) != '%') { + while ((ch = (u_char)*fmt++) != '%' || stop) { if (ch == '\0') return (retval); PCHAR(ch); @@ -187,7 +187,7 @@ kvprintf(char const *fmt, void (*func)(i percent = fmt - 1; qflag = 0; lflag = 0; ladjust = 0; sharpflag = 0; neg = 0; sign = 0; dot = 0; dwidth = 0; upper = 0; - jflag = 0; tflag = 0; zflag = 0; + cflag = 0; hflag = 0; jflag = 0; tflag = 0; zflag = 0; reswitch: switch (ch = (u_char)*fmt++) { case '.': dot = 1; @@ -234,7 +234,7 @@ reswitch: switch (ch = (u_char)*fmt++) { width = n; goto reswitch; case 'b': - num = va_arg(ap, int); + num = (u_int)va_arg(ap, int); p = va_arg(ap, char *); for (q = ksprintn(nbuf, num, *p++, NULL, 0); *q;) PCHAR(*q--); @@ -278,6 +278,13 @@ reswitch: switch (ch = (u_char)*fmt++) { base = 10; sign = 1; goto handle_sign; + case 'h': + if (hflag) { + hflag = 0; + cflag = 1; + } else + hflag = 1; + goto reswitch; case 'j': jflag = 1; goto reswitch; @@ -297,6 +304,10 @@ reswitch: switch (ch = (u_char)*fmt++) { *(va_arg(ap, long *)) = retval; else if (zflag) *(va_arg(ap, size_t *)) = retval; + else if (hflag) + *(va_arg(ap, short *)) = retval; + else if (cflag) + *(va_arg(ap, char *)) = retval; else *(va_arg(ap, int *)) = retval; break; @@ -368,6 +379,10 @@ handle_nosign: num = va_arg(ap, u_long); else if (zflag) num = va_arg(ap, size_t); + else if (hflag) + num = (u_short)va_arg(ap, int); + else if (cflag) + num = (u_char)va_arg(ap, int); else num = va_arg(ap, u_int); goto number; @@ -382,6 +397,10 @@ handle_sign: num = va_arg(ap, long); else if (zflag) num = va_arg(ap, ssize_t); + else if (hflag) + num = (short)va_arg(ap, int); + else if (cflag) + num = (char)va_arg(ap, int); else num = va_arg(ap, int); number: @@ -389,7 +408,8 @@ number: neg = 1; num = -(intmax_t)num; } - p = ksprintn(nbuf, num, base, &tmp, upper); + p = ksprintn(nbuf, num, base, &n, upper); + tmp = 0; if (sharpflag && num != 0) { if (base == 8) tmp++; @@ -399,9 +419,13 @@ number: if (neg) tmp++; - if (!ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (!ladjust && padc == '0') + dwidth = width - tmp; + width -= tmp + imax(dwidth, n); + dwidth -= n; + if (!ladjust) + while (width-- > 0) + PCHAR(' '); if (neg) PCHAR('-'); if (sharpflag && num != 0) { @@ -412,18 +436,27 @@ number: PCHAR('x'); } } + while (dwidth-- > 0) + PCHAR('0'); while (*p) PCHAR(*p--); - if (ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (ladjust) + while (width-- > 0) + PCHAR(' '); break; default: while (percent < fmt) PCHAR(*percent++); + /* + * Since we ignore an formatting argument it is no + * longer safe to obey the remaining formatting + * arguments as the arguments will no longer match + * the format specs. + */ + stop = 1; break; } } From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 19:06:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4ACDB1065670; Tue, 20 Jul 2010 19:06:18 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 20D618FC1B; Tue, 20 Jul 2010 19:06:18 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KJ6I0Q082534; Tue, 20 Jul 2010 19:06:18 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KJ6I55082533; Tue, 20 Jul 2010 19:06:18 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201007201906.o6KJ6I55082533@svn.freebsd.org> From: Ed Schouten Date: Tue, 20 Jul 2010 19:06:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210307 - vendor/llvm/llvm-r108428 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 19:06:18 -0000 Author: ed Date: Tue Jul 20 19:06:17 2010 New Revision: 210307 URL: http://svn.freebsd.org/changeset/base/210307 Log: Add missing LLVM tag. Added: vendor/llvm/llvm-r108428/ - copied from r210306, vendor/llvm/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 19:06:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 34B791065673; Tue, 20 Jul 2010 19:06:38 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0ABB78FC1C; Tue, 20 Jul 2010 19:06:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KJ6bWF082640; Tue, 20 Jul 2010 19:06:37 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KJ6bTP082639; Tue, 20 Jul 2010 19:06:37 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201007201906.o6KJ6bTP082639@svn.freebsd.org> From: Ed Schouten Date: Tue, 20 Jul 2010 19:06:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210308 - vendor/clang/clang-r108428 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 19:06:38 -0000 Author: ed Date: Tue Jul 20 19:06:37 2010 New Revision: 210308 URL: http://svn.freebsd.org/changeset/base/210308 Log: Add missing Clang tag. Added: vendor/clang/clang-r108428/ - copied from r210307, vendor/clang/dist/ From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 19:11:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 622D51065676; Tue, 20 Jul 2010 19:11:47 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 50ADF8FC14; Tue, 20 Jul 2010 19:11:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KJBlaw083870; Tue, 20 Jul 2010 19:11:47 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KJBlAg083868; Tue, 20 Jul 2010 19:11:47 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201911.o6KJBlAg083868@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 19:11:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210309 - stable/7/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 19:11:47 -0000 Author: jkim Date: Tue Jul 20 19:11:47 2010 New Revision: 210309 URL: http://svn.freebsd.org/changeset/base/210309 Log: MFC: r209836, r209949 Implement optional 'precision' for numbers. Previously, it was parsed but ignored. Some third-party modules (e.g., ACPICA) prefer this format over zero padding flag '0'. Modified: stable/7/sys/kern/subr_prf.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/kern/subr_prf.c ============================================================================== --- stable/7/sys/kern/subr_prf.c Tue Jul 20 19:06:37 2010 (r210308) +++ stable/7/sys/kern/subr_prf.c Tue Jul 20 19:11:47 2010 (r210309) @@ -822,7 +822,8 @@ number: neg = 1; num = -(intmax_t)num; } - p = ksprintn(nbuf, num, base, &tmp, upper); + p = ksprintn(nbuf, num, base, &n, upper); + tmp = 0; if (sharpflag && num != 0) { if (base == 8) tmp++; @@ -832,10 +833,13 @@ number: if (neg) tmp++; - if (!ladjust && padc != '0' && width - && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (!ladjust && padc == '0') + dwidth = width - tmp; + width -= tmp + imax(dwidth, n); + dwidth -= n; + if (!ladjust) + while (width-- > 0) + PCHAR(' '); if (neg) PCHAR('-'); if (sharpflag && num != 0) { @@ -846,16 +850,15 @@ number: PCHAR('x'); } } - if (!ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + while (dwidth-- > 0) + PCHAR('0'); while (*p) PCHAR(*p--); - if (ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (ladjust) + while (width-- > 0) + PCHAR(' '); break; default: From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 19:13:31 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD1A8106564A; Tue, 20 Jul 2010 19:13:31 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id AB3E28FC08; Tue, 20 Jul 2010 19:13:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KJDV0d084320; Tue, 20 Jul 2010 19:13:31 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KJDVR8084318; Tue, 20 Jul 2010 19:13:31 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201913.o6KJDVR8084318@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 19:13:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210310 - stable/7/lib/libstand X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 19:13:31 -0000 Author: jkim Date: Tue Jul 20 19:13:31 2010 New Revision: 210310 URL: http://svn.freebsd.org/changeset/base/210310 Log: MFC: r209837, r209842, r209949 Sync. printf() of libstand(3) with sys/kern/subr_prf.c. CVS r1.94 jhb: Cast the integer read as the first argument for %b to an unsigned integer so it's value is not sign extended when assigned to the uintmax_t variable used internally by printf. For example, if bit 31 is set in the cpuid feature word, then %b would print out the initial value as a 16 character hexadecimal value. Now it only prints out an 8 character value. CVS r1.109 njl: Add support for 'h' and 'hh' modifiers for printf(9). CVS r1.117 phk: If we ignore an unknown % sequence, we must stop interpreting the remaining % arguments because the varargs are now out of sync and there is a risk that we might for instance dereference an integer in a %s argument. SVN r209836 jkim: Implement optional 'precision' for numbers. Previously, it was parsed but ignored. Some third-party modules (e.g., ACPICA) prefer this format over zero padding flag '0'. Modified: stable/7/lib/libstand/printf.c Directory Properties: stable/7/lib/libstand/ (props changed) Modified: stable/7/lib/libstand/printf.c ============================================================================== --- stable/7/lib/libstand/printf.c Tue Jul 20 19:11:47 2010 (r210309) +++ stable/7/lib/libstand/printf.c Tue Jul 20 19:13:31 2010 (r210310) @@ -159,10 +159,10 @@ kvprintf(char const *fmt, void (*func)(i int ch, n; uintmax_t num; int base, lflag, qflag, tmp, width, ladjust, sharpflag, neg, sign, dot; - int jflag, tflag, zflag; + int cflag, hflag, jflag, tflag, zflag; int dwidth, upper; char padc; - int retval = 0; + int stop = 0, retval = 0; num = 0; if (!func) @@ -179,7 +179,7 @@ kvprintf(char const *fmt, void (*func)(i for (;;) { padc = ' '; width = 0; - while ((ch = (u_char)*fmt++) != '%') { + while ((ch = (u_char)*fmt++) != '%' || stop) { if (ch == '\0') return (retval); PCHAR(ch); @@ -187,7 +187,7 @@ kvprintf(char const *fmt, void (*func)(i percent = fmt - 1; qflag = 0; lflag = 0; ladjust = 0; sharpflag = 0; neg = 0; sign = 0; dot = 0; dwidth = 0; upper = 0; - jflag = 0; tflag = 0; zflag = 0; + cflag = 0; hflag = 0; jflag = 0; tflag = 0; zflag = 0; reswitch: switch (ch = (u_char)*fmt++) { case '.': dot = 1; @@ -234,7 +234,7 @@ reswitch: switch (ch = (u_char)*fmt++) { width = n; goto reswitch; case 'b': - num = va_arg(ap, int); + num = (u_int)va_arg(ap, int); p = va_arg(ap, char *); for (q = ksprintn(nbuf, num, *p++, NULL, 0); *q;) PCHAR(*q--); @@ -278,6 +278,13 @@ reswitch: switch (ch = (u_char)*fmt++) { base = 10; sign = 1; goto handle_sign; + case 'h': + if (hflag) { + hflag = 0; + cflag = 1; + } else + hflag = 1; + goto reswitch; case 'j': jflag = 1; goto reswitch; @@ -297,6 +304,10 @@ reswitch: switch (ch = (u_char)*fmt++) { *(va_arg(ap, long *)) = retval; else if (zflag) *(va_arg(ap, size_t *)) = retval; + else if (hflag) + *(va_arg(ap, short *)) = retval; + else if (cflag) + *(va_arg(ap, char *)) = retval; else *(va_arg(ap, int *)) = retval; break; @@ -368,6 +379,10 @@ handle_nosign: num = va_arg(ap, u_long); else if (zflag) num = va_arg(ap, size_t); + else if (hflag) + num = (u_short)va_arg(ap, int); + else if (cflag) + num = (u_char)va_arg(ap, int); else num = va_arg(ap, u_int); goto number; @@ -382,6 +397,10 @@ handle_sign: num = va_arg(ap, long); else if (zflag) num = va_arg(ap, ssize_t); + else if (hflag) + num = (short)va_arg(ap, int); + else if (cflag) + num = (char)va_arg(ap, int); else num = va_arg(ap, int); number: @@ -389,7 +408,8 @@ number: neg = 1; num = -(intmax_t)num; } - p = ksprintn(nbuf, num, base, &tmp, upper); + p = ksprintn(nbuf, num, base, &n, upper); + tmp = 0; if (sharpflag && num != 0) { if (base == 8) tmp++; @@ -399,9 +419,13 @@ number: if (neg) tmp++; - if (!ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (!ladjust && padc == '0') + dwidth = width - tmp; + width -= tmp + imax(dwidth, n); + dwidth -= n; + if (!ladjust) + while (width-- > 0) + PCHAR(' '); if (neg) PCHAR('-'); if (sharpflag && num != 0) { @@ -412,18 +436,27 @@ number: PCHAR('x'); } } + while (dwidth-- > 0) + PCHAR('0'); while (*p) PCHAR(*p--); - if (ladjust && width && (width -= tmp) > 0) - while (width--) - PCHAR(padc); + if (ladjust) + while (width-- > 0) + PCHAR(' '); break; default: while (percent < fmt) PCHAR(*percent++); + /* + * Since we ignore an formatting argument it is no + * longer safe to obey the remaining formatting + * arguments as the arguments will no longer match + * the format specs. + */ + stop = 1; break; } } From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 19:25:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 78B58106566C; Tue, 20 Jul 2010 19:25:12 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 642C28FC18; Tue, 20 Jul 2010 19:25:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KJPCcp087051; Tue, 20 Jul 2010 19:25:12 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KJPCOC087019; Tue, 20 Jul 2010 19:25:12 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201007201925.o6KJPCOC087019@svn.freebsd.org> From: Juli Mallett Date: Tue, 20 Jul 2010 19:25:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210311 - in head/sys: conf contrib/octeon-sdk mips/cavium mips/cavium/dev mips/cavium/octe mips/conf mips/include mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 19:25:12 -0000 Author: jmallett Date: Tue Jul 20 19:25:11 2010 New Revision: 210311 URL: http://svn.freebsd.org/changeset/base/210311 Log: Update the port of FreeBSD to Cavium Octeon to use the Cavium Simple Executive library: o) Increase inline unit / large function growth limits for MIPS to accommodate the needs of the Simple Executive, which uses a shocking amount of inlining. o) Remove TARGET_OCTEON and use CPU_CNMIPS to do things required by cnMIPS and the Octeon SoC. o) Add OCTEON_VENDOR_LANNER to use Lanner's allocation of vendor-specific board numbers, specifically to support the MR320. o) Add OCTEON_BOARD_CAPK_0100ND to hard-wire configuration for the CAPK-0100nd, which improperly uses an evaluation board's board number and breaks board detection at runtime. This board is sold by Portwell as the CAM-0100. o) Add support for the RTC available on some Octeon boards. o) Add support for the Octeon PCI bus. Note that rman_[sg]et_virtual for IO ports can not work unless building for n64. o) Clean up the CompactFlash driver to use Simple Executive macros and structures where possible (it would be advisable to use the Simple Executive API to set the PIO mode, too, but that is not done presently.) Also use structures from FreeBSD's ATA layer rather than structures copied from Linux. o) Print available Octeon SoC features on boot. o) Add support for the Octeon timecounter. o) Use the Simple Executive's routines rather than local copies for doing reads and writes to 64-bit addresses and use its macros for various device addresses rather than using local copies. o) Rename octeon_board_real to octeon_is_simulation to reduce differences with Cavium-provided code originally written for Linux. Also make it use the same simplified test that the Simple Executive and Linux both use rather than our complex one. o) Add support for the Octeon CIU, which is the main interrupt unit, as a bus to use normal interrupt allocation and setup routines. o) Use the Simple Executive's bootmem facility to allocate physical memory for the kernel, rather than assuming we know which addresses we can steal. NB: This may reduce the amount of RAM the kernel reports you as having if you are leaving large temporary allocations made by U-Boot allocated when starting FreeBSD. o) Add a port of the Cavium-provided Ethernet driver for Linux. This changes Ethernet interface naming from rgmxN to octeN. The new driver has vast improvements over the old one, both in performance and functionality, but does still have some features which have not been ported entirely and there may be unimplemented code that can be hit in everyday use. I will make every effort to correct those as they are reported. o) Support loading the kernel on non-contiguous cores. o) Add very conservative support for harvesting randomness from the Octeon random number device. o) Turn SMP on by default. o) Clean up the style of the Octeon kernel configurations a little and make them compile with -march=octeon. o) Add support for the Lanner MR320 and the CAPK-0100nd to the Simple Executive. o) Modify the Simple Executive to build on FreeBSD and to build without executive-config.h or cvmx-config.h. In the future we may want to revert part of these changes and supply executive-config.h and cvmx-config.h and access to the options contained in those files via kernel configuration files. o) Modify the Simple Executive USB routines to support getting and setting of the USB PID. Added: head/sys/mips/cavium/ciu.c (contents, props changed) head/sys/mips/cavium/cvmx_config.h (contents, props changed) head/sys/mips/cavium/octe/ head/sys/mips/cavium/octe/cavium-ethernet.h (contents, props changed) head/sys/mips/cavium/octe/ethernet-common.c (contents, props changed) head/sys/mips/cavium/octe/ethernet-common.h (contents, props changed) head/sys/mips/cavium/octe/ethernet-defines.h (contents, props changed) head/sys/mips/cavium/octe/ethernet-headers.h (contents, props changed) head/sys/mips/cavium/octe/ethernet-mdio.c (contents, props changed) head/sys/mips/cavium/octe/ethernet-mdio.h (contents, props changed) head/sys/mips/cavium/octe/ethernet-mem.c (contents, props changed) head/sys/mips/cavium/octe/ethernet-mem.h (contents, props changed) head/sys/mips/cavium/octe/ethernet-rgmii.c (contents, props changed) head/sys/mips/cavium/octe/ethernet-rx.c (contents, props changed) head/sys/mips/cavium/octe/ethernet-rx.h (contents, props changed) head/sys/mips/cavium/octe/ethernet-sgmii.c (contents, props changed) head/sys/mips/cavium/octe/ethernet-spi.c (contents, props changed) head/sys/mips/cavium/octe/ethernet-tx.c (contents, props changed) head/sys/mips/cavium/octe/ethernet-tx.h (contents, props changed) head/sys/mips/cavium/octe/ethernet-util.h (contents, props changed) head/sys/mips/cavium/octe/ethernet-xaui.c (contents, props changed) head/sys/mips/cavium/octe/ethernet.c (contents, props changed) head/sys/mips/cavium/octe/octe.c (contents, props changed) head/sys/mips/cavium/octe/octebus.c (contents, props changed) head/sys/mips/cavium/octe/octebusvar.h (contents, props changed) head/sys/mips/cavium/octe/wrapper-cvmx-includes.h (contents, props changed) head/sys/mips/cavium/octeon_ds1337.c (contents, props changed) head/sys/mips/cavium/octeon_rnd.c (contents, props changed) head/sys/mips/cavium/octeon_rtc.c (contents, props changed) head/sys/mips/cavium/octopci.c (contents, props changed) head/sys/mips/cavium/octopci_bus_space.c (contents, props changed) head/sys/mips/cavium/octopcireg.h (contents, props changed) head/sys/mips/cavium/octopcivar.h (contents, props changed) Deleted: head/sys/contrib/octeon-sdk/perfzilla_screen.png head/sys/mips/cavium/dev/ head/sys/mips/cavium/driveid.h head/sys/mips/cavium/octeon_ebt3000_cf.h Modified: head/sys/conf/kern.pre.mk head/sys/conf/options.mips head/sys/contrib/octeon-sdk/cvmx-access-native.h head/sys/contrib/octeon-sdk/cvmx-app-init.h head/sys/contrib/octeon-sdk/cvmx-asm.h head/sys/contrib/octeon-sdk/cvmx-cmd-queue.c head/sys/contrib/octeon-sdk/cvmx-cmd-queue.h head/sys/contrib/octeon-sdk/cvmx-fpa.c head/sys/contrib/octeon-sdk/cvmx-helper-board.c head/sys/contrib/octeon-sdk/cvmx-helper-errata.c head/sys/contrib/octeon-sdk/cvmx-helper-fpa.c head/sys/contrib/octeon-sdk/cvmx-helper-loop.c head/sys/contrib/octeon-sdk/cvmx-helper-npi.c head/sys/contrib/octeon-sdk/cvmx-helper-rgmii.c head/sys/contrib/octeon-sdk/cvmx-helper-sgmii.c head/sys/contrib/octeon-sdk/cvmx-helper-spi.c head/sys/contrib/octeon-sdk/cvmx-helper-util.c head/sys/contrib/octeon-sdk/cvmx-helper-util.h head/sys/contrib/octeon-sdk/cvmx-helper-xaui.c head/sys/contrib/octeon-sdk/cvmx-helper.c head/sys/contrib/octeon-sdk/cvmx-helper.h head/sys/contrib/octeon-sdk/cvmx-pko.c head/sys/contrib/octeon-sdk/cvmx-platform.h head/sys/contrib/octeon-sdk/cvmx-rtc.h head/sys/contrib/octeon-sdk/cvmx-spi.c head/sys/contrib/octeon-sdk/cvmx-thunder.c head/sys/contrib/octeon-sdk/cvmx-usb.c head/sys/contrib/octeon-sdk/cvmx-usb.h head/sys/contrib/octeon-sdk/octeon-model.h head/sys/mips/cavium/files.octeon1 head/sys/mips/cavium/obio.c head/sys/mips/cavium/octeon_ebt3000_cf.c head/sys/mips/cavium/octeon_machdep.c head/sys/mips/cavium/octeon_mp.c head/sys/mips/cavium/octeon_pcmap_regs.h head/sys/mips/cavium/std.octeon1 head/sys/mips/cavium/uart_bus_octeonusart.c head/sys/mips/cavium/uart_cpu_octeonusart.c head/sys/mips/cavium/uart_dev_oct16550.c head/sys/mips/conf/OCTEON1 head/sys/mips/conf/OCTEON1-32 head/sys/mips/conf/OCTEON1.hints head/sys/mips/include/_bus.h head/sys/mips/include/cache_mipsNN.h head/sys/mips/include/cpufunc.h head/sys/mips/include/cpuregs.h head/sys/mips/mips/bus_space_generic.c head/sys/mips/mips/cache.c head/sys/mips/mips/cache_mipsNN.c head/sys/mips/mips/cpu.c head/sys/mips/mips/exception.S head/sys/mips/mips/locore.S head/sys/mips/mips/machdep.c head/sys/mips/mips/mainbus.c head/sys/mips/mips/mpboot.S head/sys/mips/mips/pm_machdep.c head/sys/mips/mips/support.S head/sys/mips/mips/vm_machdep.c Modified: head/sys/conf/kern.pre.mk ============================================================================== --- head/sys/conf/kern.pre.mk Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/conf/kern.pre.mk Tue Jul 20 19:25:11 2010 (r210311) @@ -94,8 +94,14 @@ CFLAGS= ${COPTFLAGS} ${C_DIALECT} ${DEBU CFLAGS+= ${INCLUDES} -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h .if ${CC} != "icc" CFLAGS+= -fno-common -finline-limit=${INLINE_LIMIT} +.if ${MACHINE_CPUARCH} != "mips" CFLAGS+= --param inline-unit-growth=100 CFLAGS+= --param large-function-growth=1000 +.else +# XXX Actually a gross hack just for Octeon because of the Simple Executive. +CFLAGS+= --param inline-unit-growth=1000 +CFLAGS+= --param large-function-growth=100000 +.endif WERROR?= -Werror .endif Modified: head/sys/conf/options.mips ============================================================================== --- head/sys/conf/options.mips Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/conf/options.mips Tue Jul 20 19:25:11 2010 (r210311) @@ -50,7 +50,6 @@ CFE_ENV opt_global.h CFE_ENV_SIZE opt_global.h NOFPU opt_global.h -TARGET_OCTEON opt_global.h TARGET_EMULATOR opt_ddb.h TARGET_XLR_XLS opt_global.h @@ -61,3 +60,9 @@ TICK_USE_MALTA_RTC opt_global.h # The highest memory address that can be used by the kernel in units of KB. # MAXMEM opt_global.h + +# +# Options that control the Cavium Simple Executive. +# +OCTEON_VENDOR_LANNER opt_cvmx.h +OCTEON_BOARD_CAPK_0100ND opt_cvmx.h Modified: head/sys/contrib/octeon-sdk/cvmx-access-native.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-access-native.h Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-access-native.h Tue Jul 20 19:25:11 2010 (r210311) @@ -122,6 +122,8 @@ static inline uint64_t cvmx_ptr_to_phys( return address + 0x400000000ull; /* 256MB-512MB is a virtual mapping for the 2nd 256MB */ else return address; /* Looks to be a 1:1 mapped userspace pointer */ +#elif defined(__FreeBSD__) && defined(_KERNEL) + return (pmap_kextract((vm_offset_t)ptr)); #else #if CVMX_USE_1_TO_1_TLB_MAPPINGS /* We are assumung we're running the Simple Executive standalone. In this @@ -201,6 +203,15 @@ static inline void *cvmx_phys_to_ptr(uin return CASTPTR(void, physical_address - 0x400000000ull); else return CASTPTR(void, physical_address); +#elif defined(__FreeBSD__) && defined(_KERNEL) +#if defined(__mips_n64) + return CASTPTR(void, CVMX_ADD_SEG(CVMX_MIPS_SPACE_XKPHYS, physical_address)); +#else + if (physical_address < 0x20000000) + return CASTPTR(void, CVMX_ADD_SEG32(CVMX_MIPS32_SPACE_KSEG0, physical_address)); + else + panic("%s: mapping high address (%#jx) not yet supported.\n", __func__, (uintmax_t)physical_address); +#endif #else #if CVMX_USE_1_TO_1_TLB_MAPPINGS Modified: head/sys/contrib/octeon-sdk/cvmx-app-init.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-app-init.h Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-app-init.h Tue Jul 20 19:25:11 2010 (r210311) @@ -194,6 +194,9 @@ enum cvmx_board_types_enum { /* Set aside a range for customer private use. The SDK won't ** use any numbers in this range. */ CVMX_BOARD_TYPE_CUST_PRIVATE_MIN = 20001, +#if defined(OCTEON_VENDOR_LANNER) + CVMX_BOARD_TYPE_CUST_LANNER_MR320= 20002, +#endif CVMX_BOARD_TYPE_CUST_PRIVATE_MAX = 30000, /* The remaining range is reserved for future use. */ @@ -265,6 +268,9 @@ static inline const char *cvmx_board_typ /* Customer private range */ ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MIN) +#if defined(OCTEON_VENDOR_LANNER) + ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_LANNER_MR320) +#endif ENUM_BRD_TYPE_CASE(CVMX_BOARD_TYPE_CUST_PRIVATE_MAX) } return "Unsupported Board"; Modified: head/sys/contrib/octeon-sdk/cvmx-asm.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-asm.h Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-asm.h Tue Jul 20 19:25:11 2010 (r210311) @@ -225,12 +225,12 @@ extern "C" { unsigned long _v; \ ASM_STMT ("rdhwr\t%0,$31\n" \ "\tsll\t%0,%0,0" : "=d"(_v)); \ - result = (typeof(result))_v; \ + result = (__typeof(result))_v; \ } \ } else { \ unsigned long _v; \ ASM_STMT ("rdhwr\t%0,$" CVMX_TMP_STR(regstr) : "=d"(_v)); \ - result = (typeof(result))_v; \ + result = (__typeof(result))_v; \ }}) Modified: head/sys/contrib/octeon-sdk/cvmx-cmd-queue.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-cmd-queue.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-cmd-queue.c Tue Jul 20 19:25:11 2010 (r210311) @@ -49,7 +49,6 @@ * *
$Revision: 42150 $
*/ -#include "cvmx-config.h" #include "cvmx.h" #include "cvmx-fpa.h" #include "cvmx-cmd-queue.h" Modified: head/sys/contrib/octeon-sdk/cvmx-cmd-queue.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-cmd-queue.h Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-cmd-queue.h Tue Jul 20 19:25:11 2010 (r210311) @@ -92,8 +92,10 @@ #ifndef __CVMX_CMD_QUEUE_H__ #define __CVMX_CMD_QUEUE_H__ +#ifndef CVMX_DONT_INCLUDE_CONFIG #include "executive-config.h" #include "cvmx-config.h" +#endif #include "cvmx-fpa.h" #ifdef __cplusplus @@ -168,6 +170,8 @@ typedef struct __cvmx_cmd_queue_state_t state[(CVMX_CMD_QUEUE_END>>16) * 256]; } __cvmx_cmd_queue_all_state_t; +extern CVMX_SHARED __cvmx_cmd_queue_all_state_t *__cvmx_cmd_queue_state_ptr; + /** * Initialize a command queue for use. The initial FPA buffer is * allocated and the hardware unit is configured to point to the @@ -246,7 +250,6 @@ static inline int __cvmx_cmd_queue_get_i */ static inline void __cvmx_cmd_queue_lock(cvmx_cmd_queue_id_t queue_id, __cvmx_cmd_queue_state_t *qptr) { - extern CVMX_SHARED __cvmx_cmd_queue_all_state_t *__cvmx_cmd_queue_state_ptr; int tmp; int my_ticket; CVMX_PREFETCH(qptr, 0); @@ -304,7 +307,6 @@ static inline void __cvmx_cmd_queue_unlo */ static inline __cvmx_cmd_queue_state_t *__cvmx_cmd_queue_get_state(cvmx_cmd_queue_id_t queue_id) { - extern CVMX_SHARED __cvmx_cmd_queue_all_state_t *__cvmx_cmd_queue_state_ptr; if (CVMX_ENABLE_PARAMETER_CHECKING) { if (cvmx_unlikely(queue_id >= CVMX_CMD_QUEUE_END)) Modified: head/sys/contrib/octeon-sdk/cvmx-fpa.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-fpa.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-fpa.c Tue Jul 20 19:25:11 2010 (r210311) @@ -50,7 +50,6 @@ * */ -#include "cvmx-config.h" #include "cvmx.h" #include "cvmx-fpa.h" #include "cvmx-ipd.h" Modified: head/sys/contrib/octeon-sdk/cvmx-helper-board.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-board.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper-board.c Tue Jul 20 19:25:11 2010 (r210311) @@ -85,6 +85,26 @@ CVMX_SHARED cvmx_helper_link_info_t (*cv */ int cvmx_helper_board_get_mii_address(int ipd_port) { + /* + * Board types we have to know at compile-time. + */ +#ifdef OCTEON_BOARD_CAPK_0100ND + switch (ipd_port) { + case 0: + return 2; + case 1: + return 3; + case 2: + /* XXX Switch PHY? */ + return -1; + default: + return -1; + } +#endif + + /* + * For board types we can determine at runtime. + */ switch (cvmx_sysinfo_get()->board_type) { case CVMX_BOARD_TYPE_SIM: @@ -154,6 +174,22 @@ int cvmx_helper_board_get_mii_address(in return -1; case CVMX_BOARD_TYPE_BBGW_REF: return -1; /* No PHYs are connected to Octeon, everything is through switch */ + + /* Private vendor-defined boards. */ +#if defined(OCTEON_VENDOR_LANNER) + case CVMX_BOARD_TYPE_CUST_LANNER_MR320: + switch (ipd_port) { + case 0: + /* XXX Switch PHY? */ + return -1; + case 1: + return 1; + case 2: + return 2; + default: + return -1; + } +#endif } /* Some unknown board. Somebody forgot to update this function... */ @@ -195,6 +231,7 @@ cvmx_helper_link_info_t __cvmx_helper_bo /* Unless we fix it later, all links are defaulted to down */ result.u64 = 0; +#if !defined(OCTEON_BOARD_CAPK_0100ND) /* This switch statement should handle all ports that either don't use Marvell PHYS, or don't support in-band status */ switch (cvmx_sysinfo_get()->board_type) @@ -248,7 +285,21 @@ cvmx_helper_link_info_t __cvmx_helper_bo return result; } break; + /* Private vendor-defined boards. */ +#if defined(OCTEON_VENDOR_LANNER) + case CVMX_BOARD_TYPE_CUST_LANNER_MR320: + /* Port 0 connects to the switch */ + if (ipd_port == 0) + { + result.s.link_up = 1; + result.s.full_duplex = 1; + result.s.speed = 1000; + return result; + } + break; +#endif } +#endif phy_addr = cvmx_helper_board_get_mii_address(ipd_port); if (phy_addr != -1) @@ -322,7 +373,11 @@ cvmx_helper_link_info_t __cvmx_helper_bo and set the resolved bit (bit 11) */ if (phy_status & (1<<11)) { +#if defined(OCTEON_BOARD_CAPK_0100ND) + result.s.link_up = (phy_status>>10)&1; +#else result.s.link_up = 1; +#endif result.s.full_duplex = ((phy_status>>13)&1); switch ((phy_status>>14)&3) { @@ -635,6 +690,9 @@ cvmx_helper_board_usb_clock_types_t __cv { switch (cvmx_sysinfo_get()->board_type) { case CVMX_BOARD_TYPE_BBGW_REF: +#if defined(OCTEON_VENDOR_LANNER) + case CVMX_BOARD_TYPE_CUST_LANNER_MR320: +#endif return USB_CLOCK_TYPE_CRYSTAL_12; } return USB_CLOCK_TYPE_REF_48; Modified: head/sys/contrib/octeon-sdk/cvmx-helper-errata.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-errata.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper-errata.c Tue Jul 20 19:25:11 2010 (r210311) @@ -51,9 +51,6 @@ * *
$Revision: 42150 $
*/ -#include "executive-config.h" -#include "cvmx-config.h" - #include "cvmx.h" #include "cvmx-fpa.h" #include "cvmx-pip.h" Modified: head/sys/contrib/octeon-sdk/cvmx-helper-fpa.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-fpa.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper-fpa.c Tue Jul 20 19:25:11 2010 (r210311) @@ -48,8 +48,6 @@ * *
$Revision: 41586 $
*/ -#include "executive-config.h" -#include "cvmx-config.h" #include "cvmx.h" #include "cvmx-bootmem.h" #include "cvmx-fpa.h" Modified: head/sys/contrib/octeon-sdk/cvmx-helper-loop.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-loop.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper-loop.c Tue Jul 20 19:25:11 2010 (r210311) @@ -49,14 +49,11 @@ * *
$Revision: 41586 $
*/ -#include "executive-config.h" -#include "cvmx-config.h" -#ifdef CVMX_ENABLE_PKO_FUNCTIONS - #include "cvmx.h" #include "cvmx-helper.h" +#ifdef CVMX_ENABLE_PKO_FUNCTIONS /** * @INTERNAL * Probe a LOOP interface and determine the number of ports Modified: head/sys/contrib/octeon-sdk/cvmx-helper-npi.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-npi.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper-npi.c Tue Jul 20 19:25:11 2010 (r210311) @@ -49,14 +49,10 @@ * *
$Revision: 41586 $
*/ -#include "executive-config.h" -#include "cvmx-config.h" -#ifdef CVMX_ENABLE_PKO_FUNCTIONS - #include "cvmx.h" #include "cvmx-helper.h" - +#ifdef CVMX_ENABLE_PKO_FUNCTIONS /** * @INTERNAL * Probe a NPI interface and determine the number of ports Modified: head/sys/contrib/octeon-sdk/cvmx-helper-rgmii.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-rgmii.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper-rgmii.c Tue Jul 20 19:25:11 2010 (r210311) @@ -49,10 +49,6 @@ * *
$Revision: 42417 $
*/ -#include "executive-config.h" -#include "cvmx-config.h" -#ifdef CVMX_ENABLE_PKO_FUNCTIONS - #include "cvmx.h" #include "cvmx-sysinfo.h" #include "cvmx-mdio.h" @@ -60,6 +56,7 @@ #include "cvmx-helper.h" #include "cvmx-helper-board.h" +#ifdef CVMX_ENABLE_PKO_FUNCTIONS /** * @INTERNAL * Probe RGMII ports and determine the number present @@ -202,6 +199,31 @@ int __cvmx_helper_rgmii_enable(int inter cvmx_write_csr(CVMX_GMXX_TXX_PAUSE_PKT_TIME(port, interface), 20000); cvmx_write_csr(CVMX_GMXX_TXX_PAUSE_PKT_INTERVAL(port, interface), 19000); + /* + * Board types we have to know at compile-time. + */ +#if defined(OCTEON_BOARD_CAPK_0100ND) + cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(port, interface), 26); + cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(port, interface), 26); +#else + /* + * Vendor-defined board types. + */ +#if defined(OCTEON_VENDOR_LANNER) + switch (cvmx_sysinfo_get()->board_type) { + case CVMX_BOARD_TYPE_CUST_LANNER_MR320: + if (port == 0) { + cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(port, interface), 4); + } else { + cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(port, interface), 7); + } + cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(port, interface), 0); + break; + } +#else + /* + * For board types we can determine at runtime. + */ if (OCTEON_IS_MODEL(OCTEON_CN50XX)) { cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(port, interface), 16); @@ -212,6 +234,8 @@ int __cvmx_helper_rgmii_enable(int inter cvmx_write_csr(CVMX_ASXX_TX_CLK_SETX(port, interface), 24); cvmx_write_csr(CVMX_ASXX_RX_CLK_SETX(port, interface), 24); } +#endif +#endif } __cvmx_helper_setup_gmx(interface, num_ports); Modified: head/sys/contrib/octeon-sdk/cvmx-helper-sgmii.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-sgmii.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper-sgmii.c Tue Jul 20 19:25:11 2010 (r210311) @@ -49,17 +49,13 @@ * *
$Revision: 42417 $
*/ -#include "executive-config.h" -#include "cvmx-config.h" -#ifdef CVMX_ENABLE_PKO_FUNCTIONS - #include "cvmx.h" #include "cvmx-sysinfo.h" #include "cvmx-mdio.h" #include "cvmx-helper.h" #include "cvmx-helper-board.h" - +#ifdef CVMX_ENABLE_PKO_FUNCTIONS /** * @INTERNAL * Perform initialization required only once for an SGMII port. Modified: head/sys/contrib/octeon-sdk/cvmx-helper-spi.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-spi.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper-spi.c Tue Jul 20 19:25:11 2010 (r210311) @@ -49,15 +49,12 @@ * *
$Revision: 42417 $
*/ -#include "executive-config.h" -#include "cvmx-config.h" -#ifdef CVMX_ENABLE_PKO_FUNCTIONS - #include "cvmx.h" #include "cvmx-spi.h" #include "cvmx-sysinfo.h" #include "cvmx-helper.h" +#ifdef CVMX_ENABLE_PKO_FUNCTIONS /* CVMX_HELPER_SPI_TIMEOUT is used to determine how long the SPI initialization routines wait for SPI training. You can override the value using executive-config.h if necessary */ Modified: head/sys/contrib/octeon-sdk/cvmx-helper-util.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-util.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper-util.c Tue Jul 20 19:25:11 2010 (r210311) @@ -48,8 +48,6 @@ * *
$Revision: 42493 $
*/ -#include "executive-config.h" -#include "cvmx-config.h" #include "cvmx.h" #include "cvmx-bootmem.h" #include "cvmx-fpa.h" Modified: head/sys/contrib/octeon-sdk/cvmx-helper-util.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-util.h Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper-util.h Tue Jul 20 19:25:11 2010 (r210311) @@ -157,8 +157,6 @@ static inline int cvmx_helper_get_first_ */ static inline int cvmx_helper_get_last_ipd_port (int interface) { - extern int cvmx_helper_ports_on_interface (int interface); - return (cvmx_helper_get_first_ipd_port (interface) + cvmx_helper_ports_on_interface (interface) - 1); } Modified: head/sys/contrib/octeon-sdk/cvmx-helper-xaui.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper-xaui.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper-xaui.c Tue Jul 20 19:25:11 2010 (r210311) @@ -49,14 +49,10 @@ * *
$Revision: 42417 $
*/ -#include "executive-config.h" -#include "cvmx-config.h" -#ifdef CVMX_ENABLE_PKO_FUNCTIONS - #include "cvmx.h" #include "cvmx-helper.h" - +#ifdef CVMX_ENABLE_PKO_FUNCTIONS /** * @INTERNAL * Probe a XAUI interface and determine the number of ports Modified: head/sys/contrib/octeon-sdk/cvmx-helper.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper.c Tue Jul 20 19:25:11 2010 (r210311) @@ -48,8 +48,6 @@ * *
$Revision: 42150 $
*/ -#include "executive-config.h" -#include "cvmx-config.h" #include "cvmx.h" #include "cvmx-bootmem.h" #include "cvmx-fpa.h" Modified: head/sys/contrib/octeon-sdk/cvmx-helper.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-helper.h Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-helper.h Tue Jul 20 19:25:11 2010 (r210311) @@ -52,8 +52,10 @@ #ifndef __CVMX_HELPER_H__ #define __CVMX_HELPER_H__ +#ifndef CVMX_DONT_INCLUDE_CONFIG #include "executive-config.h" #include "cvmx-config.h" +#endif #include "cvmx-fpa.h" #include "cvmx-wqe.h" @@ -97,7 +99,6 @@ typedef union #include "cvmx-helper-rgmii.h" #include "cvmx-helper-sgmii.h" #include "cvmx-helper-spi.h" -#include "cvmx-helper-util.h" #include "cvmx-helper-xaui.h" /** @@ -250,6 +251,8 @@ extern int cvmx_helper_interface_probe(i */ extern int cvmx_helper_configure_loopback(int ipd_port, int enable_internal, int enable_external); +#include "cvmx-helper-util.h" + #endif /* CVMX_ENABLE_PKO_FUNCTIONS */ #ifdef __cplusplus Modified: head/sys/contrib/octeon-sdk/cvmx-pko.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-pko.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-pko.c Tue Jul 20 19:25:11 2010 (r210311) @@ -48,8 +48,6 @@ * *
$Revision: 42150 $
*/ -#include "executive-config.h" -#include "cvmx-config.h" #include "cvmx.h" #include "cvmx-pko.h" #include "cvmx-sysinfo.h" Modified: head/sys/contrib/octeon-sdk/cvmx-platform.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-platform.h Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-platform.h Tue Jul 20 19:25:11 2010 (r210311) @@ -103,6 +103,8 @@ /* To build the simple exec toolchain runtime (newlib) library. We should only use features available on all Octeon models. */ #define CVMX_BUILD_FOR_TOOLCHAIN +#elif defined(__FreeBSD__) && defined(_KERNEL) + #define CVMX_BUILD_FOR_FREEBSD #else /* We are building a simple exec standalone image for Octeon */ #define CVMX_BUILD_FOR_STANDALONE @@ -117,7 +119,11 @@ * This is for data structures use by software ONLY, * as it is not 1-1 VA-PA mapped. */ +#if defined(CVMX_BUILD_FOR_FREEBSD) +#define CVMX_SHARED +#else #define CVMX_SHARED __attribute__ ((cvmx_shared)) +#endif #if defined(CVMX_BUILD_FOR_UBOOT) @@ -187,6 +193,10 @@ #include #include +#elif defined(CVMX_BUILD_FOR_FREEBSD) + + #include + #else #error Unexpected CVMX_BUILD_FOR_* macro Modified: head/sys/contrib/octeon-sdk/cvmx-rtc.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-rtc.h Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-rtc.h Tue Jul 20 19:25:11 2010 (r210311) @@ -74,7 +74,7 @@ typedef enum * * @return Supported options, or 0 if RTC is not supported */ -static inline cvmx_rtc_options_t cvmx_rtc_supported() +static inline cvmx_rtc_options_t cvmx_rtc_supported(void) { static int supported = -1; Modified: head/sys/contrib/octeon-sdk/cvmx-spi.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-spi.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-spi.c Tue Jul 20 19:25:11 2010 (r210311) @@ -48,7 +48,6 @@ * *
$Revision: 41586 $
*/ -#include "cvmx-config.h" #include "cvmx.h" #include "cvmx-mio.h" #include "cvmx-pko.h" Modified: head/sys/contrib/octeon-sdk/cvmx-thunder.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-thunder.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-thunder.c Tue Jul 20 19:25:11 2010 (r210311) @@ -50,7 +50,6 @@ * */ -#include "cvmx-config.h" #include "cvmx.h" #include "cvmx-sysinfo.h" #include "cvmx-thunder.h" @@ -121,7 +120,7 @@ int cvmx_rtc_ds1374_write(uint32_t time) return (rc ? -1 : 0); } -int cvmx_rtc_ds1374_alarm_config(int WD, int WDSTR, int AIE) +static int cvmx_rtc_ds1374_alarm_config(int WD, int WDSTR, int AIE) { int val; @@ -134,7 +133,7 @@ int cvmx_rtc_ds1374_alarm_config(int WD, return 0; } -int cvmx_rtc_ds1374_alarm_set(int alarm_on) +static int cvmx_rtc_ds1374_alarm_set(int alarm_on) { uint8_t val; @@ -152,7 +151,7 @@ int cvmx_rtc_ds1374_alarm_set(int alarm_ } -int cvmx_rtc_ds1374_alarm_counter_set(uint32_t interval) +static int cvmx_rtc_ds1374_alarm_counter_set(uint32_t interval) { int i; int rc = 0; @@ -165,7 +164,8 @@ int cvmx_rtc_ds1374_alarm_counter_set(ui return rc; } -uint32_t cvmx_rtc_ds1374_alarm_counter_get(void) +#if 0 /* XXX unused */ +static uint32_t cvmx_rtc_ds1374_alarm_counter_get(void) { int i; uint32_t interval = 0; @@ -176,6 +176,7 @@ uint32_t cvmx_rtc_ds1374_alarm_counter_g } return interval; } +#endif #ifdef CVMX_RTC_DEBUG Modified: head/sys/contrib/octeon-sdk/cvmx-usb.c ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-usb.c Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-usb.c Tue Jul 20 19:25:11 2010 (r210311) @@ -194,7 +194,7 @@ typedef struct /* This macro logs out when a function returns a value */ #define CVMX_USB_RETURN(v) \ do { \ - typeof(v) r = v; \ + __typeof(v) r = v; \ if (cvmx_unlikely(usb->init_flags & CVMX_USB_INITIALIZE_FLAGS_DEBUG_CALLS)) \ cvmx_dprintf("%*s%s: returned %s(%d)\n", 2*--usb->indent, "", __FUNCTION__, #v, r); \ return r; \ @@ -3648,3 +3648,20 @@ cvmx_usb_status_t cvmx_usb_device_disabl CVMX_USB_RETURN(CVMX_USB_SUCCESS); } +extern void cvmx_usb_set_toggle(cvmx_usb_state_t *state, int endpoint_num, int toggle) +{ + cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t*)state; + cvmx_usb_pipe_t *pipe = usb->pipe + endpoint_num; + + pipe->pid_toggle = !!toggle; +} + +extern int cvmx_usb_get_toggle(cvmx_usb_state_t *state, int endpoint_num) +{ + cvmx_usb_internal_state_t *usb = (cvmx_usb_internal_state_t*)state; + cvmx_usb_pipe_t *pipe = usb->pipe + endpoint_num; + + if (pipe->pid_toggle) + return (1); + return (0); +} Modified: head/sys/contrib/octeon-sdk/cvmx-usb.h ============================================================================== --- head/sys/contrib/octeon-sdk/cvmx-usb.h Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/cvmx-usb.h Tue Jul 20 19:25:11 2010 (r210311) @@ -1122,6 +1122,13 @@ extern cvmx_usb_status_t cvmx_usb_device extern cvmx_usb_status_t cvmx_usb_device_disable_endpoint(cvmx_usb_state_t *state, int endpoint_num); +/* + * The FreeBSD host driver uses these functions to manipulate the toggle to deal + * more easily with endpoint management. + */ +extern void cvmx_usb_set_toggle(cvmx_usb_state_t *state, int endpoint_num, int toggle); +extern int cvmx_usb_get_toggle(cvmx_usb_state_t *state, int endpoint_num); + #ifdef __cplusplus } #endif Modified: head/sys/contrib/octeon-sdk/octeon-model.h ============================================================================== --- head/sys/contrib/octeon-sdk/octeon-model.h Tue Jul 20 19:13:31 2010 (r210310) +++ head/sys/contrib/octeon-sdk/octeon-model.h Tue Jul 20 19:25:11 2010 (r210311) @@ -254,7 +254,7 @@ extern "C" { && (((chip_model) & OCTEON_58XX_MODEL_MASK) < ((arg_model) & OCTEON_58XX_MODEL_MASK))) \ ))) -#if defined(USE_RUNTIME_MODEL_CHECKS) || defined(__U_BOOT__) || (defined(__linux__) && defined(__KERNEL__)) +#if defined(USE_RUNTIME_MODEL_CHECKS) || defined(__U_BOOT__) || (defined(__linux__) && defined(__KERNEL__)) || (defined(__FreeBSD__) && defined(_KERNEL)) /* NOTE: This for internal use only!!!!! */ static inline int __octeon_is_model_runtime__(uint32_t model) Added: head/sys/mips/cavium/ciu.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/cavium/ciu.c Tue Jul 20 19:25:11 2010 (r210311) @@ -0,0 +1,359 @@ +/*- + * Copyright (c) 2010 Juli Mallett + * 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$ + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +/* + * This bus sits between devices/buses and nexus and handles CIU interrupts + * and passes everything else through. It should really be a nexus subclass + * or something, but for now this will be sufficient. + */ + +#define CIU_IRQ_HARD (0) + +#define CIU_IRQ_EN0_BEGIN CVMX_IRQ_WORKQ0 +#define CIU_IRQ_EN0_END CVMX_IRQ_BOOTDMA +#define CIU_IRQ_EN0_COUNT ((CIU_IRQ_EN0_END - CIU_IRQ_EN0_BEGIN) + 1) + +#define CIU_IRQ_EN1_BEGIN CVMX_IRQ_WDOG0 +#define CIU_IRQ_EN1_END CVMX_IRQ_WDOG15 +#define CIU_IRQ_EN1_COUNT ((CIU_IRQ_EN1_END - CIU_IRQ_EN1_BEGIN) + 1) + +struct ciu_softc { + struct rman irq_rman; + struct resource *ciu_irq; +}; + +static mips_intrcnt_t ciu_en0_intrcnt[CIU_IRQ_EN0_COUNT]; +static mips_intrcnt_t ciu_en1_intrcnt[CIU_IRQ_EN1_COUNT]; + +static struct intr_event *ciu_en0_intr_events[CIU_IRQ_EN0_COUNT]; +static struct intr_event *ciu_en1_intr_events[CIU_IRQ_EN1_COUNT]; + +static int ciu_probe(device_t); +static int ciu_attach(device_t); +static struct resource *ciu_alloc_resource(device_t, device_t, int, int *, + u_long, u_long, u_long, u_int); +static int ciu_setup_intr(device_t, device_t, struct resource *, + int, driver_filter_t *, driver_intr_t *, + void *, void **); +static void ciu_hinted_child(device_t, const char *, int); + +static void ciu_en0_intr_mask(void *); +static void ciu_en0_intr_unmask(void *); + +static void ciu_en1_intr_mask(void *); +static void ciu_en1_intr_unmask(void *); + +static int ciu_intr(void *); + +static int +ciu_probe(device_t dev) +{ + if (device_get_unit(dev) != 0) + return (ENXIO); + + device_set_desc(dev, "Cavium Octeon Central Interrupt Unit"); + return (0); +} + +static int +ciu_attach(device_t dev) +{ + char name[MAXCOMLEN + 1]; + struct ciu_softc *sc; + unsigned i; + int error; + int rid; + + sc = device_get_softc(dev); + + rid = 0; + sc->ciu_irq = bus_alloc_resource(dev, SYS_RES_IRQ, &rid, CIU_IRQ_HARD, + CIU_IRQ_HARD, 1, RF_ACTIVE); + if (sc->ciu_irq == NULL) { + device_printf(dev, "could not allocate irq%d\n", CIU_IRQ_HARD); + return (ENXIO); + } + + error = bus_setup_intr(dev, sc->ciu_irq, INTR_TYPE_MISC, ciu_intr, + NULL, sc, NULL); + if (error != 0) { + device_printf(dev, "bus_setup_intr failed: %d\n", error); + return (error); + } + + sc->irq_rman.rm_type = RMAN_ARRAY; + sc->irq_rman.rm_descr = "CIU IRQ"; + + error = rman_init(&sc->irq_rman); + if (error != 0) + return (error); + + /* + * We have two contiguous IRQ regions, use a single rman. + */ + error = rman_manage_region(&sc->irq_rman, CIU_IRQ_EN0_BEGIN, + CIU_IRQ_EN1_END); + if (error != 0) + return (error); + + for (i = 0; i < CIU_IRQ_EN0_COUNT; i++) { + snprintf(name, sizeof name, "int%d:", i + CIU_IRQ_EN0_BEGIN); + ciu_en0_intrcnt[i] = mips_intrcnt_create(name); + } + + for (i = 0; i < CIU_IRQ_EN1_COUNT; i++) { + snprintf(name, sizeof name, "int%d:", i + CIU_IRQ_EN1_BEGIN); + ciu_en1_intrcnt[i] = mips_intrcnt_create(name); + } + + bus_generic_probe(dev); + bus_generic_attach(dev); + + return (0); +} + +static struct resource * +ciu_alloc_resource(device_t bus, device_t child, int type, int *rid, + u_long start, u_long end, u_long count, u_int flags) +{ + struct resource *res; + struct ciu_softc *sc; + + sc = device_get_softc(bus); + + switch (type) { + case SYS_RES_IRQ: + break; + default: + return (bus_alloc_resource(device_get_parent(bus), type, rid, + start, end, count, flags)); + } + + /* + * One interrupt at a time for now. + */ + if (start != end) + return (NULL); + + res = rman_reserve_resource(&sc->irq_rman, start, end, count, flags, + child); + if (res != NULL) + return (res); + + return (NULL); +} + +static int +ciu_setup_intr(device_t bus, device_t child, struct resource *res, int flags, + driver_filter_t *filter, driver_intr_t *intr, void *arg, + void **cookiep) +{ + struct intr_event *event, **eventp; + void (*mask_func)(void *); + void (*unmask_func)(void *); + mips_intrcnt_t intrcnt; + int error; + int irq; + + irq = rman_get_start(res); + if (irq <= CIU_IRQ_EN0_END) { + eventp = &ciu_en0_intr_events[irq - CIU_IRQ_EN0_BEGIN]; + intrcnt = ciu_en0_intrcnt[irq - CIU_IRQ_EN0_BEGIN]; + mask_func = ciu_en0_intr_mask; + unmask_func = ciu_en0_intr_unmask; + } else { + eventp = &ciu_en1_intr_events[irq - CIU_IRQ_EN1_BEGIN]; + intrcnt = ciu_en1_intrcnt[irq - CIU_IRQ_EN1_BEGIN]; + mask_func = ciu_en1_intr_mask; + unmask_func = ciu_en1_intr_unmask; + } + + if ((event = *eventp) == NULL) { + error = intr_event_create(eventp, (void *)(uintptr_t)irq, 0, + irq, mask_func, unmask_func, NULL, NULL, "int%d", irq); + if (error != 0) + return (error); + + event = *eventp; + + unmask_func((void *)(uintptr_t)irq); + } + + intr_event_add_handler(event, device_get_nameunit(child), + filter, intr, arg, intr_priority(flags), flags, cookiep); + + mips_intrcnt_setname(intrcnt, event->ie_fullname); + + return (0); +} + +static void +ciu_hinted_child(device_t bus, const char *dname, int dunit) +{ + BUS_ADD_CHILD(bus, 0, dname, dunit); +} + +static void +ciu_en0_intr_mask(void *arg) +{ + uint64_t mask; + int irq; + + irq = (uintptr_t)arg; + mask = cvmx_read_csr(CVMX_CIU_INTX_EN0(cvmx_get_core_num()*2)); + mask &= ~(1ull << (irq - CIU_IRQ_EN0_BEGIN)); + cvmx_write_csr(CVMX_CIU_INTX_EN0(cvmx_get_core_num()*2), mask); +} + +static void +ciu_en0_intr_unmask(void *arg) +{ + uint64_t mask; + int irq; + + irq = (uintptr_t)arg; + mask = cvmx_read_csr(CVMX_CIU_INTX_EN0(cvmx_get_core_num()*2)); + mask |= 1ull << (irq - CIU_IRQ_EN0_BEGIN); + cvmx_write_csr(CVMX_CIU_INTX_EN0(cvmx_get_core_num()*2), mask); +} + +static void +ciu_en1_intr_mask(void *arg) +{ + uint64_t mask; + int irq; + + irq = (uintptr_t)arg; + mask = cvmx_read_csr(CVMX_CIU_INTX_EN1(cvmx_get_core_num()*2)); + mask &= ~(1ull << (irq - CIU_IRQ_EN1_BEGIN)); + cvmx_write_csr(CVMX_CIU_INTX_EN1(cvmx_get_core_num()*2), mask); +} + +static void +ciu_en1_intr_unmask(void *arg) +{ + uint64_t mask; + int irq; + + irq = (uintptr_t)arg; + mask = cvmx_read_csr(CVMX_CIU_INTX_EN1(cvmx_get_core_num()*2)); + mask |= 1ull << (irq - CIU_IRQ_EN1_BEGIN); + cvmx_write_csr(CVMX_CIU_INTX_EN1(cvmx_get_core_num()*2), mask); +} + +static int +ciu_intr(void *arg) +{ + struct ciu_softc *sc; + uint64_t en0_sum, en1_sum; + uint64_t en0_mask, en1_mask; + int irq_index; + int error; + + sc = arg; + (void)sc; + + en0_sum = cvmx_read_csr(CVMX_CIU_INTX_SUM0(cvmx_get_core_num()*2)); + en1_sum = cvmx_read_csr(CVMX_CIU_INT_SUM1); + + en0_mask = cvmx_read_csr(CVMX_CIU_INTX_EN0(cvmx_get_core_num()*2)); + en1_mask = cvmx_read_csr(CVMX_CIU_INTX_EN1(cvmx_get_core_num()*2)); + + en0_sum &= en0_mask; + en1_sum &= en1_mask; + + if (en0_sum == 0 && en1_sum == 0) + return (FILTER_STRAY); + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 19:32:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF3B01065689; Tue, 20 Jul 2010 19:32:25 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DC7CE8FC16; Tue, 20 Jul 2010 19:32:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KJWPx3088749; Tue, 20 Jul 2010 19:32:25 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KJWPP5088746; Tue, 20 Jul 2010 19:32:25 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201007201932.o6KJWPP5088746@svn.freebsd.org> From: Juli Mallett Date: Tue, 20 Jul 2010 19:32:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210312 - in head/sys/mips/cavium: . cryptocteon usb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 19:32:26 -0000 Author: jmallett Date: Tue Jul 20 19:32:25 2010 New Revision: 210312 URL: http://svn.freebsd.org/changeset/base/210312 Log: o) Add the "octusb" controller which supports the first port of the Octeon on-board USB controller. It is not currently enabled because there are known problems with device communication and until those are fixed I am not certain that it won't destabilize the system. [1] o) Add the "cryptocteon" opencrypto device based on the OCF device written by David McCullough. It is not currently enabled because until support for saving/restoring coprocessor 2 state on context switch is available, it runs with interrupts disabled, which tends to pessimize performance over using a software crypto facility. Tests using this driver which are not negatively affected by it running with interrupts disabled show it to be substantially faster than software for large blocks. Submitted by: hps [1] Added: head/sys/mips/cavium/cryptocteon/ head/sys/mips/cavium/cryptocteon/cavium_crypto.c (contents, props changed) head/sys/mips/cavium/cryptocteon/cryptocteon.c (contents, props changed) head/sys/mips/cavium/cryptocteon/cryptocteonvar.h (contents, props changed) head/sys/mips/cavium/usb/ head/sys/mips/cavium/usb/octusb.c (contents, props changed) head/sys/mips/cavium/usb/octusb.h (contents, props changed) head/sys/mips/cavium/usb/octusb_octeon.c (contents, props changed) Modified: head/sys/mips/cavium/files.octeon1 Added: head/sys/mips/cavium/cryptocteon/cavium_crypto.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/cavium/cryptocteon/cavium_crypto.c Tue Jul 20 19:32:25 2010 (r210312) @@ -0,0 +1,2222 @@ +/* + * vim:sw=4 ts=8 + */ +/* + * Copyright (c) 2009 David McCullough + * + * Copyright (c) 2003-2007 Cavium Networks (support@cavium.com). All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by Cavium Networks + * 4. Cavium Networks' name may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * This Software, including technical data, may be subject to U.S. export + * control laws, including the U.S. Export Administration Act and its + * associated regulations, and may be subject to export or import regulations + * in other countries. You warrant that You will comply strictly in all + * respects with all such regulations and acknowledge that you have the + * responsibility to obtain licenses to export, re-export or import the + * Software. + * + * TO THE MAXIMUM EXTENT PERMITTED BY LAW, THE SOFTWARE IS PROVIDED "AS IS" AND + * WITH ALL FAULTS AND CAVIUM MAKES NO PROMISES, REPRESENTATIONS OR WARRANTIES, + * EITHER EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, WITH RESPECT TO THE + * SOFTWARE, INCLUDING ITS CONDITION, ITS CONFORMITY TO ANY REPRESENTATION OR + * DESCRIPTION, OR THE EXISTENCE OF ANY LATENT OR PATENT DEFECTS, AND CAVIUM + * SPECIFICALLY DISCLAIMS ALL IMPLIED (IF ANY) WARRANTIES OF TITLE, + * MERCHANTABILITY, NONINFRINGEMENT, FITNESS FOR A PARTICULAR PURPOSE, LACK OF + * VIRUSES, ACCURACY OR COMPLETENESS, QUIET ENJOYMENT, QUIET POSSESSION OR + * CORRESPONDENCE TO DESCRIPTION. THE ENTIRE RISK ARISING OUT OF USE OR + * PERFORMANCE OF THE SOFTWARE LIES WITH YOU. +*/ +/****************************************************************************/ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include + +#include + +#include + +#include + +/****************************************************************************/ + +#define IOV_INIT(iov, ptr, idx, len) \ + do { \ + (idx) = 0; \ + (ptr) = (iov)[(idx)].iov_base; \ + (len) = (iov)[(idx)].iov_len; \ + } while (0) + +/* + * XXX + * It would be better if this were an IOV_READ/IOV_WRITE macro instead so + * that we could detect overflow before it happens rather than right after, + * which is especially bad since there is usually no IOV_CONSUME after the + * final read or write. + */ +#define IOV_CONSUME(iov, ptr, idx, len) \ + do { \ + if ((len) > sizeof *(ptr)) { \ + (len) -= sizeof *(ptr); \ + (ptr)++; \ + } else { \ + if ((len) != sizeof *(ptr)) \ + panic("%s: went past end of iovec.", __func__); \ + (idx)++; \ + (ptr) = (iov)[(idx)].iov_base; \ + (len) = (iov)[(idx)].iov_len; \ + } \ + } while (0) + +static inline unsigned long octeon_crypto_enable(void) +{ + register_t s; + + s = intr_disable(); + mips_wr_status(mips_rd_status() | MIPS_SR_COP_2_BIT); + + return (s); +} + +static inline void octeon_crypto_disable(register_t s) +{ + mips_wr_status(mips_rd_status() & ~MIPS_SR_COP_2_BIT); + intr_restore(s); +} + +#define ESP_HEADER_LENGTH 8 +#define DES_CBC_IV_LENGTH 8 +#define AES_CBC_IV_LENGTH 16 +#define ESP_HMAC_LEN 12 + +#define ESP_HEADER_LENGTH 8 +#define DES_CBC_IV_LENGTH 8 + +/****************************************************************************/ + +#define CVM_LOAD_SHA_UNIT(dat, next) { \ + if (next == 0) { \ + next = 1; \ + CVMX_MT_HSH_DAT (dat, 0); \ + } else if (next == 1) { \ + next = 2; \ + CVMX_MT_HSH_DAT (dat, 1); \ + } else if (next == 2) { \ + next = 3; \ + CVMX_MT_HSH_DAT (dat, 2); \ + } else if (next == 3) { \ + next = 4; \ + CVMX_MT_HSH_DAT (dat, 3); \ + } else if (next == 4) { \ + next = 5; \ + CVMX_MT_HSH_DAT (dat, 4); \ + } else if (next == 5) { \ + next = 6; \ + CVMX_MT_HSH_DAT (dat, 5); \ + } else if (next == 6) { \ + next = 7; \ + CVMX_MT_HSH_DAT (dat, 6); \ + } else { \ + CVMX_MT_HSH_STARTSHA (dat); \ + next = 0; \ + } \ +} + +#define CVM_LOAD2_SHA_UNIT(dat1, dat2, next) { \ + if (next == 0) { \ + CVMX_MT_HSH_DAT (dat1, 0); \ + CVMX_MT_HSH_DAT (dat2, 1); \ + next = 2; \ + } else if (next == 1) { \ + CVMX_MT_HSH_DAT (dat1, 1); \ + CVMX_MT_HSH_DAT (dat2, 2); \ + next = 3; \ + } else if (next == 2) { \ + CVMX_MT_HSH_DAT (dat1, 2); \ + CVMX_MT_HSH_DAT (dat2, 3); \ + next = 4; \ + } else if (next == 3) { \ + CVMX_MT_HSH_DAT (dat1, 3); \ + CVMX_MT_HSH_DAT (dat2, 4); \ + next = 5; \ + } else if (next == 4) { \ + CVMX_MT_HSH_DAT (dat1, 4); \ + CVMX_MT_HSH_DAT (dat2, 5); \ + next = 6; \ + } else if (next == 5) { \ + CVMX_MT_HSH_DAT (dat1, 5); \ + CVMX_MT_HSH_DAT (dat2, 6); \ + next = 7; \ + } else if (next == 6) { \ + CVMX_MT_HSH_DAT (dat1, 6); \ + CVMX_MT_HSH_STARTSHA (dat2); \ + next = 0; \ + } else { \ + CVMX_MT_HSH_STARTSHA (dat1); \ + CVMX_MT_HSH_DAT (dat2, 0); \ + next = 1; \ + } \ +} + +/****************************************************************************/ + +#define CVM_LOAD_MD5_UNIT(dat, next) { \ + if (next == 0) { \ + next = 1; \ + CVMX_MT_HSH_DAT (dat, 0); \ + } else if (next == 1) { \ + next = 2; \ + CVMX_MT_HSH_DAT (dat, 1); \ + } else if (next == 2) { \ + next = 3; \ + CVMX_MT_HSH_DAT (dat, 2); \ + } else if (next == 3) { \ + next = 4; \ + CVMX_MT_HSH_DAT (dat, 3); \ + } else if (next == 4) { \ + next = 5; \ + CVMX_MT_HSH_DAT (dat, 4); \ + } else if (next == 5) { \ + next = 6; \ + CVMX_MT_HSH_DAT (dat, 5); \ + } else if (next == 6) { \ + next = 7; \ + CVMX_MT_HSH_DAT (dat, 6); \ + } else { \ + CVMX_MT_HSH_STARTMD5 (dat); \ + next = 0; \ + } \ +} + +#define CVM_LOAD2_MD5_UNIT(dat1, dat2, next) { \ + if (next == 0) { \ + CVMX_MT_HSH_DAT (dat1, 0); \ + CVMX_MT_HSH_DAT (dat2, 1); \ + next = 2; \ + } else if (next == 1) { \ + CVMX_MT_HSH_DAT (dat1, 1); \ + CVMX_MT_HSH_DAT (dat2, 2); \ + next = 3; \ + } else if (next == 2) { \ + CVMX_MT_HSH_DAT (dat1, 2); \ + CVMX_MT_HSH_DAT (dat2, 3); \ + next = 4; \ + } else if (next == 3) { \ + CVMX_MT_HSH_DAT (dat1, 3); \ + CVMX_MT_HSH_DAT (dat2, 4); \ + next = 5; \ + } else if (next == 4) { \ + CVMX_MT_HSH_DAT (dat1, 4); \ + CVMX_MT_HSH_DAT (dat2, 5); \ + next = 6; \ + } else if (next == 5) { \ + CVMX_MT_HSH_DAT (dat1, 5); \ + CVMX_MT_HSH_DAT (dat2, 6); \ + next = 7; \ + } else if (next == 6) { \ + CVMX_MT_HSH_DAT (dat1, 6); \ + CVMX_MT_HSH_STARTMD5 (dat2); \ + next = 0; \ + } else { \ + CVMX_MT_HSH_STARTMD5 (dat1); \ + CVMX_MT_HSH_DAT (dat2, 0); \ + next = 1; \ + } \ +} + +/****************************************************************************/ + +void +octo_calc_hash(uint8_t auth, unsigned char *key, uint64_t *inner, uint64_t *outer) +{ + uint8_t hash_key[64]; + uint64_t *key1; + register uint64_t xor1 = 0x3636363636363636ULL; + register uint64_t xor2 = 0x5c5c5c5c5c5c5c5cULL; + register_t s; + + dprintf("%s()\n", __func__); + + memset(hash_key, 0, sizeof(hash_key)); + memcpy(hash_key, (uint8_t *) key, (auth ? 20 : 16)); + key1 = (uint64_t *) hash_key; + s = octeon_crypto_enable(); + if (auth) { + CVMX_MT_HSH_IV(0x67452301EFCDAB89ULL, 0); + CVMX_MT_HSH_IV(0x98BADCFE10325476ULL, 1); + CVMX_MT_HSH_IV(0xC3D2E1F000000000ULL, 2); + } else { + CVMX_MT_HSH_IV(0x0123456789ABCDEFULL, 0); + CVMX_MT_HSH_IV(0xFEDCBA9876543210ULL, 1); + } + + CVMX_MT_HSH_DAT((*key1 ^ xor1), 0); + key1++; + CVMX_MT_HSH_DAT((*key1 ^ xor1), 1); + key1++; + CVMX_MT_HSH_DAT((*key1 ^ xor1), 2); + key1++; + CVMX_MT_HSH_DAT((*key1 ^ xor1), 3); + key1++; + CVMX_MT_HSH_DAT((*key1 ^ xor1), 4); + key1++; + CVMX_MT_HSH_DAT((*key1 ^ xor1), 5); + key1++; + CVMX_MT_HSH_DAT((*key1 ^ xor1), 6); + key1++; + if (auth) + CVMX_MT_HSH_STARTSHA((*key1 ^ xor1)); + else + CVMX_MT_HSH_STARTMD5((*key1 ^ xor1)); + + CVMX_MF_HSH_IV(inner[0], 0); + CVMX_MF_HSH_IV(inner[1], 1); + if (auth) { + inner[2] = 0; + CVMX_MF_HSH_IV(((uint64_t *) inner)[2], 2); + } + + memset(hash_key, 0, sizeof(hash_key)); + memcpy(hash_key, (uint8_t *) key, (auth ? 20 : 16)); + key1 = (uint64_t *) hash_key; + if (auth) { + CVMX_MT_HSH_IV(0x67452301EFCDAB89ULL, 0); + CVMX_MT_HSH_IV(0x98BADCFE10325476ULL, 1); + CVMX_MT_HSH_IV(0xC3D2E1F000000000ULL, 2); + } else { + CVMX_MT_HSH_IV(0x0123456789ABCDEFULL, 0); + CVMX_MT_HSH_IV(0xFEDCBA9876543210ULL, 1); + } + + CVMX_MT_HSH_DAT((*key1 ^ xor2), 0); + key1++; + CVMX_MT_HSH_DAT((*key1 ^ xor2), 1); + key1++; + CVMX_MT_HSH_DAT((*key1 ^ xor2), 2); + key1++; + CVMX_MT_HSH_DAT((*key1 ^ xor2), 3); + key1++; + CVMX_MT_HSH_DAT((*key1 ^ xor2), 4); + key1++; + CVMX_MT_HSH_DAT((*key1 ^ xor2), 5); + key1++; + CVMX_MT_HSH_DAT((*key1 ^ xor2), 6); + key1++; + if (auth) + CVMX_MT_HSH_STARTSHA((*key1 ^ xor2)); + else + CVMX_MT_HSH_STARTMD5((*key1 ^ xor2)); + + CVMX_MF_HSH_IV(outer[0], 0); + CVMX_MF_HSH_IV(outer[1], 1); + if (auth) { + outer[2] = 0; + CVMX_MF_HSH_IV(outer[2], 2); + } + octeon_crypto_disable(s); + return; +} + +/****************************************************************************/ +/* DES functions */ + +int +octo_des_cbc_encrypt( + struct octo_sess *od, + struct iovec *iov, size_t iovcnt, size_t iovlen, + int auth_off, int auth_len, + int crypt_off, int crypt_len, + int icv_off, uint8_t *ivp) +{ + uint64_t *data; + int data_i, data_l; + register_t s; + + dprintf("%s()\n", __func__); + + if (__predict_false(od == NULL || iov==NULL || iovlen==0 || ivp==NULL || + (crypt_off & 0x7) || (crypt_off + crypt_len > iovlen))) { + dprintf("%s: Bad parameters od=%p iov=%p iovlen=%d " + "auth_off=%d auth_len=%d crypt_off=%d crypt_len=%d " + "icv_off=%d ivp=%p\n", __func__, od, iov, iovlen, + auth_off, auth_len, crypt_off, crypt_len, icv_off, ivp); + return -EINVAL; + } + + IOV_INIT(iov, data, data_i, data_l); + + CVMX_PREFETCH0(ivp); + CVMX_PREFETCH0(od->octo_enckey); + + s = octeon_crypto_enable(); + + /* load 3DES Key */ + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 0); + if (od->octo_encklen == 24) { + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[1], 1); + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[2], 2); + } else if (od->octo_encklen == 8) { + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 1); + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 2); + } else { + octeon_crypto_disable(s); + dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen); + return -EINVAL; + } + + CVMX_MT_3DES_IV(* (uint64_t *) ivp); + + while (crypt_off > 0) { + IOV_CONSUME(iov, data, data_i, data_l); + crypt_off -= 8; + } + + while (crypt_len > 0) { + CVMX_MT_3DES_ENC_CBC(*data); + CVMX_MF_3DES_RESULT(*data); + IOV_CONSUME(iov, data, data_i, data_l); + crypt_len -= 8; + } + + octeon_crypto_disable(s); + return 0; +} + + +int +octo_des_cbc_decrypt( + struct octo_sess *od, + struct iovec *iov, size_t iovcnt, size_t iovlen, + int auth_off, int auth_len, + int crypt_off, int crypt_len, + int icv_off, uint8_t *ivp) +{ + uint64_t *data; + int data_i, data_l; + register_t s; + + dprintf("%s()\n", __func__); + + if (__predict_false(od == NULL || iov==NULL || iovlen==0 || ivp==NULL || + (crypt_off & 0x7) || (crypt_off + crypt_len > iovlen))) { + dprintf("%s: Bad parameters od=%p iov=%p iovlen=%d " + "auth_off=%d auth_len=%d crypt_off=%d crypt_len=%d " + "icv_off=%d ivp=%p\n", __func__, od, iov, iovlen, + auth_off, auth_len, crypt_off, crypt_len, icv_off, ivp); + return -EINVAL; + } + + IOV_INIT(iov, data, data_i, data_l); + + CVMX_PREFETCH0(ivp); + CVMX_PREFETCH0(od->octo_enckey); + + s = octeon_crypto_enable(); + + /* load 3DES Key */ + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 0); + if (od->octo_encklen == 24) { + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[1], 1); + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[2], 2); + } else if (od->octo_encklen == 8) { + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 1); + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 2); + } else { + octeon_crypto_disable(s); + dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen); + return -EINVAL; + } + + CVMX_MT_3DES_IV(* (uint64_t *) ivp); + + while (crypt_off > 0) { + IOV_CONSUME(iov, data, data_i, data_l); + crypt_off -= 8; + } + + while (crypt_len > 0) { + CVMX_MT_3DES_DEC_CBC(*data); + CVMX_MF_3DES_RESULT(*data); + IOV_CONSUME(iov, data, data_i, data_l); + crypt_len -= 8; + } + + octeon_crypto_disable(s); + return 0; +} + +/****************************************************************************/ +/* AES functions */ + +int +octo_aes_cbc_encrypt( + struct octo_sess *od, + struct iovec *iov, size_t iovcnt, size_t iovlen, + int auth_off, int auth_len, + int crypt_off, int crypt_len, + int icv_off, uint8_t *ivp) +{ + uint64_t *data, *pdata; + int data_i, data_l; + register_t s; + + dprintf("%s()\n", __func__); + + if (__predict_false(od == NULL || iov==NULL || iovlen==0 || ivp==NULL || + (crypt_off & 0x7) || (crypt_off + crypt_len > iovlen))) { + dprintf("%s: Bad parameters od=%p iov=%p iovlen=%d " + "auth_off=%d auth_len=%d crypt_off=%d crypt_len=%d " + "icv_off=%d ivp=%p\n", __func__, od, iov, iovlen, + auth_off, auth_len, crypt_off, crypt_len, icv_off, ivp); + return -EINVAL; + } + + IOV_INIT(iov, data, data_i, data_l); + + CVMX_PREFETCH0(ivp); + CVMX_PREFETCH0(od->octo_enckey); + + s = octeon_crypto_enable(); + + /* load AES Key */ + CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[0], 0); + CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[1], 1); + + if (od->octo_encklen == 16) { + CVMX_MT_AES_KEY(0x0, 2); + CVMX_MT_AES_KEY(0x0, 3); + } else if (od->octo_encklen == 24) { + CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[2], 2); + CVMX_MT_AES_KEY(0x0, 3); + } else if (od->octo_encklen == 32) { + CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[2], 2); + CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[3], 3); + } else { + octeon_crypto_disable(s); + dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen); + return -EINVAL; + } + CVMX_MT_AES_KEYLENGTH(od->octo_encklen / 8 - 1); + + CVMX_MT_AES_IV(((uint64_t *) ivp)[0], 0); + CVMX_MT_AES_IV(((uint64_t *) ivp)[1], 1); + + while (crypt_off > 0) { + IOV_CONSUME(iov, data, data_i, data_l); + crypt_off -= 8; + } + + while (crypt_len > 0) { + pdata = data; + CVMX_MT_AES_ENC_CBC0(*data); + IOV_CONSUME(iov, data, data_i, data_l); + CVMX_MT_AES_ENC_CBC1(*data); + CVMX_MF_AES_RESULT(*pdata, 0); + CVMX_MF_AES_RESULT(*data, 1); + IOV_CONSUME(iov, data, data_i, data_l); + crypt_len -= 16; + } + + octeon_crypto_disable(s); + return 0; +} + + +int +octo_aes_cbc_decrypt( + struct octo_sess *od, + struct iovec *iov, size_t iovcnt, size_t iovlen, + int auth_off, int auth_len, + int crypt_off, int crypt_len, + int icv_off, uint8_t *ivp) +{ + uint64_t *data, *pdata; + int data_i, data_l; + register_t s; + + dprintf("%s()\n", __func__); + + if (__predict_false(od == NULL || iov==NULL || iovlen==0 || ivp==NULL || + (crypt_off & 0x7) || (crypt_off + crypt_len > iovlen))) { + dprintf("%s: Bad parameters od=%p iov=%p iovlen=%d " + "auth_off=%d auth_len=%d crypt_off=%d crypt_len=%d " + "icv_off=%d ivp=%p\n", __func__, od, iov, iovlen, + auth_off, auth_len, crypt_off, crypt_len, icv_off, ivp); + return -EINVAL; + } + + IOV_INIT(iov, data, data_i, data_l); + + CVMX_PREFETCH0(ivp); + CVMX_PREFETCH0(od->octo_enckey); + + s = octeon_crypto_enable(); + + /* load AES Key */ + CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[0], 0); + CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[1], 1); + + if (od->octo_encklen == 16) { + CVMX_MT_AES_KEY(0x0, 2); + CVMX_MT_AES_KEY(0x0, 3); + } else if (od->octo_encklen == 24) { + CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[2], 2); + CVMX_MT_AES_KEY(0x0, 3); + } else if (od->octo_encklen == 32) { + CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[2], 2); + CVMX_MT_AES_KEY(((uint64_t *) od->octo_enckey)[3], 3); + } else { + octeon_crypto_disable(s); + dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen); + return -EINVAL; + } + CVMX_MT_AES_KEYLENGTH(od->octo_encklen / 8 - 1); + + CVMX_MT_AES_IV(((uint64_t *) ivp)[0], 0); + CVMX_MT_AES_IV(((uint64_t *) ivp)[1], 1); + + while (crypt_off > 0) { + IOV_CONSUME(iov, data, data_i, data_l); + crypt_off -= 8; + } + + while (crypt_len > 0) { + pdata = data; + CVMX_MT_AES_DEC_CBC0(*data); + IOV_CONSUME(iov, data, data_i, data_l); + CVMX_MT_AES_DEC_CBC1(*data); + CVMX_MF_AES_RESULT(*pdata, 0); + CVMX_MF_AES_RESULT(*data, 1); + IOV_CONSUME(iov, data, data_i, data_l); + crypt_len -= 16; + } + + octeon_crypto_disable(s); + return 0; +} + +/****************************************************************************/ +/* MD5 */ + +int +octo_null_md5_encrypt( + struct octo_sess *od, + struct iovec *iov, size_t iovcnt, size_t iovlen, + int auth_off, int auth_len, + int crypt_off, int crypt_len, + int icv_off, uint8_t *ivp) +{ + register int next = 0; + uint64_t *data; + uint64_t tmp1, tmp2; + int data_i, data_l, alen = auth_len; + register_t s; + + dprintf("%s()\n", __func__); + + if (__predict_false(od == NULL || iov==NULL || iovlen==0 || + (auth_off & 0x7) || (auth_off + auth_len > iovlen))) { + dprintf("%s: Bad parameters od=%p iov=%p iovlen=%d " + "auth_off=%d auth_len=%d crypt_off=%d crypt_len=%d " + "icv_off=%d ivp=%p\n", __func__, od, iov, iovlen, + auth_off, auth_len, crypt_off, crypt_len, icv_off, ivp); + return -EINVAL; + } + + IOV_INIT(iov, data, data_i, data_l); + + s = octeon_crypto_enable(); + + /* Load MD5 IV */ + CVMX_MT_HSH_IV(od->octo_hminner[0], 0); + CVMX_MT_HSH_IV(od->octo_hminner[1], 1); + + while (auth_off > 0) { + IOV_CONSUME(iov, data, data_i, data_l); + auth_off -= 8; + } + + while (auth_len > 0) { + CVM_LOAD_MD5_UNIT(*data, next); + auth_len -= 8; + IOV_CONSUME(iov, data, data_i, data_l); + } + + /* finish the hash */ + CVMX_PREFETCH0(od->octo_hmouter); +#if 0 + if (__predict_false(inplen)) { + uint64_t tmp = 0; + uint8_t *p = (uint8_t *) & tmp; + p[inplen] = 0x80; + do { + inplen--; + p[inplen] = ((uint8_t *) data)[inplen]; + } while (inplen); + CVM_LOAD_MD5_UNIT(tmp, next); + } else { + CVM_LOAD_MD5_UNIT(0x8000000000000000ULL, next); + } +#else + CVM_LOAD_MD5_UNIT(0x8000000000000000ULL, next); +#endif + + /* Finish Inner hash */ + while (next != 7) { + CVM_LOAD_MD5_UNIT(((uint64_t) 0x0ULL), next); + } + CVMX_ES64(tmp1, ((alen + 64) << 3)); + CVM_LOAD_MD5_UNIT(tmp1, next); + + /* Get the inner hash of HMAC */ + CVMX_MF_HSH_IV(tmp1, 0); + CVMX_MF_HSH_IV(tmp2, 1); + + /* Initialize hash unit */ + CVMX_MT_HSH_IV(od->octo_hmouter[0], 0); + CVMX_MT_HSH_IV(od->octo_hmouter[1], 1); + + CVMX_MT_HSH_DAT(tmp1, 0); + CVMX_MT_HSH_DAT(tmp2, 1); + CVMX_MT_HSH_DAT(0x8000000000000000ULL, 2); + CVMX_MT_HSH_DATZ(3); + CVMX_MT_HSH_DATZ(4); + CVMX_MT_HSH_DATZ(5); + CVMX_MT_HSH_DATZ(6); + CVMX_ES64(tmp1, ((64 + 16) << 3)); + CVMX_MT_HSH_STARTMD5(tmp1); + + /* save the HMAC */ + IOV_INIT(iov, data, data_i, data_l); + while (icv_off > 0) { + IOV_CONSUME(iov, data, data_i, data_l); + icv_off -= 8; + } + CVMX_MF_HSH_IV(*data, 0); + IOV_CONSUME(iov, data, data_i, data_l); + CVMX_MF_HSH_IV(tmp1, 1); + *(uint32_t *)data = (uint32_t) (tmp1 >> 32); + + octeon_crypto_disable(s); + return 0; +} + +/****************************************************************************/ +/* SHA1 */ + +int +octo_null_sha1_encrypt( + struct octo_sess *od, + struct iovec *iov, size_t iovcnt, size_t iovlen, + int auth_off, int auth_len, + int crypt_off, int crypt_len, + int icv_off, uint8_t *ivp) +{ + register int next = 0; + uint64_t *data; + uint64_t tmp1, tmp2, tmp3; + int data_i, data_l, alen = auth_len; + register_t s; + + dprintf("%s()\n", __func__); + + if (__predict_false(od == NULL || iov==NULL || iovlen==0 || + (auth_off & 0x7) || (auth_off + auth_len > iovlen))) { + dprintf("%s: Bad parameters od=%p iov=%p iovlen=%d " + "auth_off=%d auth_len=%d crypt_off=%d crypt_len=%d " + "icv_off=%d ivp=%p\n", __func__, od, iov, iovlen, + auth_off, auth_len, crypt_off, crypt_len, icv_off, ivp); + return -EINVAL; + } + + IOV_INIT(iov, data, data_i, data_l); + + s = octeon_crypto_enable(); + + /* Load SHA1 IV */ + CVMX_MT_HSH_IV(od->octo_hminner[0], 0); + CVMX_MT_HSH_IV(od->octo_hminner[1], 1); + CVMX_MT_HSH_IV(od->octo_hminner[2], 2); + + while (auth_off > 0) { + IOV_CONSUME(iov, data, data_i, data_l); + auth_off -= 8; + } + + while (auth_len > 0) { + CVM_LOAD_SHA_UNIT(*data, next); + auth_len -= 8; + IOV_CONSUME(iov, data, data_i, data_l); + } + + /* finish the hash */ + CVMX_PREFETCH0(od->octo_hmouter); +#if 0 + if (__predict_false(inplen)) { + uint64_t tmp = 0; + uint8_t *p = (uint8_t *) & tmp; + p[inplen] = 0x80; + do { + inplen--; + p[inplen] = ((uint8_t *) data)[inplen]; + } while (inplen); + CVM_LOAD_MD5_UNIT(tmp, next); + } else { + CVM_LOAD_MD5_UNIT(0x8000000000000000ULL, next); + } +#else + CVM_LOAD_SHA_UNIT(0x8000000000000000ULL, next); +#endif + + /* Finish Inner hash */ + while (next != 7) { + CVM_LOAD_SHA_UNIT(((uint64_t) 0x0ULL), next); + } + CVM_LOAD_SHA_UNIT((uint64_t) ((alen + 64) << 3), next); + + /* Get the inner hash of HMAC */ + CVMX_MF_HSH_IV(tmp1, 0); + CVMX_MF_HSH_IV(tmp2, 1); + tmp3 = 0; + CVMX_MF_HSH_IV(tmp3, 2); + + /* Initialize hash unit */ + CVMX_MT_HSH_IV(od->octo_hmouter[0], 0); + CVMX_MT_HSH_IV(od->octo_hmouter[1], 1); + CVMX_MT_HSH_IV(od->octo_hmouter[2], 2); + + CVMX_MT_HSH_DAT(tmp1, 0); + CVMX_MT_HSH_DAT(tmp2, 1); + tmp3 |= 0x0000000080000000; + CVMX_MT_HSH_DAT(tmp3, 2); + CVMX_MT_HSH_DATZ(3); + CVMX_MT_HSH_DATZ(4); + CVMX_MT_HSH_DATZ(5); + CVMX_MT_HSH_DATZ(6); + CVMX_MT_HSH_STARTSHA((uint64_t) ((64 + 20) << 3)); + + /* save the HMAC */ + IOV_INIT(iov, data, data_i, data_l); + while (icv_off > 0) { + IOV_CONSUME(iov, data, data_i, data_l); + icv_off -= 8; + } + CVMX_MF_HSH_IV(*data, 0); + IOV_CONSUME(iov, data, data_i, data_l); + CVMX_MF_HSH_IV(tmp1, 1); + *(uint32_t *)data = (uint32_t) (tmp1 >> 32); + + octeon_crypto_disable(s); + return 0; +} + +/****************************************************************************/ +/* DES MD5 */ + +int +octo_des_cbc_md5_encrypt( + struct octo_sess *od, + struct iovec *iov, size_t iovcnt, size_t iovlen, + int auth_off, int auth_len, + int crypt_off, int crypt_len, + int icv_off, uint8_t *ivp) +{ + register int next = 0; + union { + uint32_t data32[2]; + uint64_t data64[1]; + } mydata; + uint64_t *data = &mydata.data64[0]; + uint32_t *data32; + uint64_t tmp1, tmp2; + int data_i, data_l, alen = auth_len; + register_t s; + + dprintf("%s()\n", __func__); + + if (__predict_false(od == NULL || iov==NULL || iovlen==0 || ivp==NULL || + (crypt_off & 0x3) || (crypt_off + crypt_len > iovlen) || + (crypt_len & 0x7) || + (auth_len & 0x7) || + (auth_off & 0x3) || (auth_off + auth_len > iovlen))) { + dprintf("%s: Bad parameters od=%p iov=%p iovlen=%d " + "auth_off=%d auth_len=%d crypt_off=%d crypt_len=%d " + "icv_off=%d ivp=%p\n", __func__, od, iov, iovlen, + auth_off, auth_len, crypt_off, crypt_len, icv_off, ivp); + return -EINVAL; + } + + IOV_INIT(iov, data32, data_i, data_l); + + CVMX_PREFETCH0(ivp); + CVMX_PREFETCH0(od->octo_enckey); + + s = octeon_crypto_enable(); + + /* load 3DES Key */ + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 0); + if (od->octo_encklen == 24) { + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[1], 1); + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[2], 2); + } else if (od->octo_encklen == 8) { + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 1); + CVMX_MT_3DES_KEY(((uint64_t *) od->octo_enckey)[0], 2); + } else { + octeon_crypto_disable(s); + dprintf("%s: Bad key length %d\n", __func__, od->octo_encklen); + return -EINVAL; + } + + CVMX_MT_3DES_IV(* (uint64_t *) ivp); + + /* Load MD5 IV */ + CVMX_MT_HSH_IV(od->octo_hminner[0], 0); + CVMX_MT_HSH_IV(od->octo_hminner[1], 1); + + while (crypt_off > 0 && auth_off > 0) { + IOV_CONSUME(iov, data32, data_i, data_l); + crypt_off -= 4; + auth_off -= 4; + } + + while (crypt_len > 0 || auth_len > 0) { + uint32_t *first = data32; + mydata.data32[0] = *first; + IOV_CONSUME(iov, data32, data_i, data_l); + mydata.data32[1] = *data32; + if (crypt_off <= 0) { + if (crypt_len > 0) { + CVMX_MT_3DES_ENC_CBC(*data); + CVMX_MF_3DES_RESULT(*data); + crypt_len -= 8; + } + } else + crypt_off -= 8; + if (auth_off <= 0) { + if (auth_len > 0) { + CVM_LOAD_MD5_UNIT(*data, next); + auth_len -= 8; + } + } else + auth_off -= 8; + *first = mydata.data32[0]; + *data32 = mydata.data32[1]; + IOV_CONSUME(iov, data32, data_i, data_l); + } + + /* finish the hash */ + CVMX_PREFETCH0(od->octo_hmouter); +#if 0 + if (__predict_false(inplen)) { + uint64_t tmp = 0; + uint8_t *p = (uint8_t *) & tmp; + p[inplen] = 0x80; + do { + inplen--; + p[inplen] = ((uint8_t *) data)[inplen]; + } while (inplen); + CVM_LOAD_MD5_UNIT(tmp, next); + } else { + CVM_LOAD_MD5_UNIT(0x8000000000000000ULL, next); + } +#else + CVM_LOAD_MD5_UNIT(0x8000000000000000ULL, next); +#endif + + /* Finish Inner hash */ + while (next != 7) { + CVM_LOAD_MD5_UNIT(((uint64_t) 0x0ULL), next); + } + CVMX_ES64(tmp1, ((alen + 64) << 3)); + CVM_LOAD_MD5_UNIT(tmp1, next); + + /* Get the inner hash of HMAC */ + CVMX_MF_HSH_IV(tmp1, 0); + CVMX_MF_HSH_IV(tmp2, 1); + + /* Initialize hash unit */ + CVMX_MT_HSH_IV(od->octo_hmouter[0], 0); + CVMX_MT_HSH_IV(od->octo_hmouter[1], 1); + + CVMX_MT_HSH_DAT(tmp1, 0); + CVMX_MT_HSH_DAT(tmp2, 1); + CVMX_MT_HSH_DAT(0x8000000000000000ULL, 2); + CVMX_MT_HSH_DATZ(3); + CVMX_MT_HSH_DATZ(4); + CVMX_MT_HSH_DATZ(5); + CVMX_MT_HSH_DATZ(6); + CVMX_ES64(tmp1, ((64 + 16) << 3)); + CVMX_MT_HSH_STARTMD5(tmp1); + + /* save the HMAC */ + IOV_INIT(iov, data32, data_i, data_l); + while (icv_off > 0) { + IOV_CONSUME(iov, data32, data_i, data_l); + icv_off -= 4; + } + CVMX_MF_HSH_IV(tmp1, 0); + *data32 = (uint32_t) (tmp1 >> 32); + IOV_CONSUME(iov, data32, data_i, data_l); + *data32 = (uint32_t) tmp1; + IOV_CONSUME(iov, data32, data_i, data_l); + CVMX_MF_HSH_IV(tmp1, 1); + *data32 = (uint32_t) (tmp1 >> 32); + + octeon_crypto_disable(s); + return 0; +} + +int +octo_des_cbc_md5_decrypt( + struct octo_sess *od, + struct iovec *iov, size_t iovcnt, size_t iovlen, + int auth_off, int auth_len, + int crypt_off, int crypt_len, + int icv_off, uint8_t *ivp) +{ + register int next = 0; + union { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 19:38:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 58531106566B; Tue, 20 Jul 2010 19:38:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 460E28FC12; Tue, 20 Jul 2010 19:38:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KJcdTa090225; Tue, 20 Jul 2010 19:38:39 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KJcd2E090222; Tue, 20 Jul 2010 19:38:39 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201938.o6KJcd2E090222@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 19:38:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210313 - stable/8/sys/dev/acpica/Osd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 19:38:39 -0000 Author: jkim Date: Tue Jul 20 19:38:38 2010 New Revision: 210313 URL: http://svn.freebsd.org/changeset/base/210313 Log: MFC: r209965, r209966, r210129, r210137, r210155, r210157 - According to ACPICA User Guide and Programmer Reference, the read data must be zero extended to fill the 32-bit or 64-bit return value even if the bit width of the port or location is less than 32 or 64. - Use pmap_mapdev()/pmap_unmapdev() to map device memory instead of using AcpiOsMapMemory()/AcpiOsUnmapMemory() (-> pmap_mapbios()/pmap_unmapbios()) for AcpiOsReadMemory() and AcpiOsWriteMemory(). Although they do not sound too obvious, these functions are exclusively used to access memory mapped IO in ACPICA. - Remove 64-bit access from AcpiOsReadMemory() and AcpiOsWriteMemory(). These functions do not support 64-bit access. Likewise, return error when 64-bit access is requested for PCI configuration space. - Simplify AcpiOsReadPort() and AcpiOsWritePort() with iodev_read_*() and iodev_write_*(). This removes unnecessary uses of temporary macros as well. There is no functional change after this (verified with md5(1) on amd64). Modified: stable/8/sys/dev/acpica/Osd/OsdHardware.c stable/8/sys/dev/acpica/Osd/OsdMemory.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/acpica/Osd/OsdHardware.c ============================================================================== --- stable/8/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 20 19:32:25 2010 (r210312) +++ stable/8/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 20 19:38:38 2010 (r210313) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include +#include #include #include #include @@ -48,42 +48,21 @@ __FBSDID("$FreeBSD$"); * * In order to deal with this, we ignore resource ownership entirely, and simply * use the native I/O space accessor functionality. This is Evil, but it works. - * - * XXX use an intermediate #define for the tag/handle */ -#ifdef __i386__ -#define ACPI_BUS_SPACE_IO I386_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 -#endif -#ifdef __ia64__ -#define ACPI_BUS_SPACE_IO IA64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 -#endif -#ifdef __amd64__ -#define ACPI_BUS_SPACE_IO AMD64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 -#endif - ACPI_STATUS AcpiOsReadPort(ACPI_IO_ADDRESS InPort, UINT32 *Value, UINT32 Width) { switch (Width) { case 8: - *(u_int8_t *)Value = bus_space_read_1(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); - break; + *Value = iodev_read_1(InPort); + break; case 16: - *(u_int16_t *)Value = bus_space_read_2(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); - break; + *Value = iodev_read_2(InPort); + break; case 32: - *(u_int32_t *)Value = bus_space_read_4(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); - break; - default: - /* debug trap goes here */ + *Value = iodev_read_4(InPort); break; } @@ -96,16 +75,13 @@ AcpiOsWritePort(ACPI_IO_ADDRESS OutPort, switch (Width) { case 8: - bus_space_write_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; + iodev_write_1(OutPort, Value); + break; case 16: - bus_space_write_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; + iodev_write_2(OutPort, Value); + break; case 32: - bus_space_write_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; - default: - /* debug trap goes here */ + iodev_write_4(OutPort, Value); break; } @@ -116,28 +92,15 @@ ACPI_STATUS AcpiOsReadPciConfiguration(ACPI_PCI_ID *PciId, UINT32 Register, void *Value, UINT32 Width) { - u_int32_t byte_width = Width / 8; - u_int32_t val; + + if (Width == 64) + return (AE_SUPPORT); if (!pci_cfgregopen()) - return (AE_NOT_EXIST); + return (AE_NOT_EXIST); - val = pci_cfgregread(PciId->Bus, PciId->Device, PciId->Function, Register, - byte_width); - switch (Width) { - case 8: - *(u_int8_t *)Value = val & 0xff; - break; - case 16: - *(u_int16_t *)Value = val & 0xffff; - break; - case 32: - *(u_int32_t *)Value = val; - break; - default: - /* debug trap goes here */ - break; - } + *(UINT64 *)Value = pci_cfgregread(PciId->Bus, PciId->Device, + PciId->Function, Register, Width / 8); return (AE_OK); } @@ -147,13 +110,15 @@ ACPI_STATUS AcpiOsWritePciConfiguration (ACPI_PCI_ID *PciId, UINT32 Register, UINT64 Value, UINT32 Width) { - u_int32_t byte_width = Width / 8; + + if (Width == 64) + return (AE_SUPPORT); if (!pci_cfgregopen()) return (AE_NOT_EXIST); pci_cfgregwrite(PciId->Bus, PciId->Device, PciId->Function, Register, - Value, byte_width); + Value, Width / 8); return (AE_OK); } Modified: stable/8/sys/dev/acpica/Osd/OsdMemory.c ============================================================================== --- stable/8/sys/dev/acpica/Osd/OsdMemory.c Tue Jul 20 19:32:25 2010 (r210312) +++ stable/8/sys/dev/acpica/Osd/OsdMemory.c Tue Jul 20 19:38:38 2010 (r210313) @@ -97,29 +97,23 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS A { void *LogicalAddress; - LogicalAddress = AcpiOsMapMemory(Address, Width / 8); + LogicalAddress = pmap_mapdev(Address, Width / 8); if (LogicalAddress == NULL) return (AE_NOT_EXIST); switch (Width) { case 8: - *(u_int8_t *)Value = (*(volatile u_int8_t *)LogicalAddress); + *Value = *(volatile uint8_t *)LogicalAddress; break; case 16: - *(u_int16_t *)Value = (*(volatile u_int16_t *)LogicalAddress); + *Value = *(volatile uint16_t *)LogicalAddress; break; case 32: - *(u_int32_t *)Value = (*(volatile u_int32_t *)LogicalAddress); - break; - case 64: - *(u_int64_t *)Value = (*(volatile u_int64_t *)LogicalAddress); - break; - default: - /* debug trap goes here */ + *Value = *(volatile uint32_t *)LogicalAddress; break; } - AcpiOsUnmapMemory(LogicalAddress, Width / 8); + pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8); return (AE_OK); } @@ -129,29 +123,23 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS { void *LogicalAddress; - LogicalAddress = AcpiOsMapMemory(Address, Width / 8); + LogicalAddress = pmap_mapdev(Address, Width / 8); if (LogicalAddress == NULL) return (AE_NOT_EXIST); switch (Width) { case 8: - (*(volatile u_int8_t *)LogicalAddress) = Value & 0xff; + *(volatile uint8_t *)LogicalAddress = Value; break; case 16: - (*(volatile u_int16_t *)LogicalAddress) = Value & 0xffff; + *(volatile uint16_t *)LogicalAddress = Value; break; case 32: - (*(volatile u_int32_t *)LogicalAddress) = Value & 0xffffffff; - break; - case 64: - (*(volatile u_int64_t *)LogicalAddress) = Value; - break; - default: - /* debug trap goes here */ + *(volatile uint32_t *)LogicalAddress = Value; break; } - AcpiOsUnmapMemory(LogicalAddress, Width / 8); + pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8); return (AE_OK); } From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 19:43:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EB48B106566B; Tue, 20 Jul 2010 19:43:25 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D94E08FC08; Tue, 20 Jul 2010 19:43:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KJhP4U091350; Tue, 20 Jul 2010 19:43:25 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KJhPCh091347; Tue, 20 Jul 2010 19:43:25 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007201943.o6KJhPCh091347@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 19:43:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org X-SVN-Group: stable-7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210314 - stable/7/sys/dev/acpica/Osd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 19:43:26 -0000 Author: jkim Date: Tue Jul 20 19:43:25 2010 New Revision: 210314 URL: http://svn.freebsd.org/changeset/base/210314 Log: MFC: r209965, r209966, r210129, r210137, r210155 - According to ACPICA User Guide and Programmer Reference, the read data must be zero extended to fill the 32-bit or 64-bit return value even if the bit width of the port or location is less than 32 or 64. - Use pmap_mapdev()/pmap_unmapdev() to map device memory instead of using AcpiOsMapMemory()/AcpiOsUnmapMemory() (-> pmap_mapbios()/pmap_unmapbios()) for AcpiOsReadMemory() and AcpiOsWriteMemory(). Although they do not sound too obvious, these functions are exclusively used to access memory mapped IO in ACPICA. - Remove 64-bit access from AcpiOsReadMemory() and AcpiOsWriteMemory(). These functions do not support 64-bit access. Likewise, return error when 64-bit access is requested for PCI configuration space. - Clean up some white spaces. Modified: stable/7/sys/dev/acpica/Osd/OsdHardware.c stable/7/sys/dev/acpica/Osd/OsdMemory.c Directory Properties: stable/7/sys/ (props changed) stable/7/sys/cddl/contrib/opensolaris/ (props changed) stable/7/sys/contrib/dev/acpica/ (props changed) stable/7/sys/contrib/pf/ (props changed) Modified: stable/7/sys/dev/acpica/Osd/OsdHardware.c ============================================================================== --- stable/7/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 20 19:38:38 2010 (r210313) +++ stable/7/sys/dev/acpica/Osd/OsdHardware.c Tue Jul 20 19:43:25 2010 (r210314) @@ -53,16 +53,16 @@ __FBSDID("$FreeBSD$"); */ #ifdef __i386__ -#define ACPI_BUS_SPACE_IO I386_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 +#define ACPI_BUS_SPACE_IO I386_BUS_SPACE_IO +#define ACPI_BUS_HANDLE 0 #endif #ifdef __ia64__ -#define ACPI_BUS_SPACE_IO IA64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 +#define ACPI_BUS_SPACE_IO IA64_BUS_SPACE_IO +#define ACPI_BUS_HANDLE 0 #endif #ifdef __amd64__ -#define ACPI_BUS_SPACE_IO AMD64_BUS_SPACE_IO -#define ACPI_BUS_HANDLE 0 +#define ACPI_BUS_SPACE_IO AMD64_BUS_SPACE_IO +#define ACPI_BUS_HANDLE 0 #endif /* @@ -137,19 +137,13 @@ AcpiOsReadPort(ACPI_IO_ADDRESS InPort, U switch (Width) { case 8: - *(u_int8_t *)Value = bus_space_read_1(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); - break; + *Value = bus_space_read_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); + break; case 16: - *(u_int16_t *)Value = bus_space_read_2(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); - break; + *Value = bus_space_read_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); + break; case 32: - *(u_int32_t *)Value = bus_space_read_4(ACPI_BUS_SPACE_IO, - ACPI_BUS_HANDLE, InPort); - break; - default: - /* debug trap goes here */ + *Value = bus_space_read_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, InPort); break; } @@ -172,16 +166,13 @@ AcpiOsWritePort(ACPI_IO_ADDRESS OutPort, switch (Width) { case 8: - bus_space_write_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; + bus_space_write_1(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + break; case 16: - bus_space_write_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; + bus_space_write_2(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); + break; case 32: - bus_space_write_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); - break; - default: - /* debug trap goes here */ + bus_space_write_4(ACPI_BUS_SPACE_IO, ACPI_BUS_HANDLE, OutPort, Value); break; } @@ -192,28 +183,15 @@ ACPI_STATUS AcpiOsReadPciConfiguration(ACPI_PCI_ID *PciId, UINT32 Register, void *Value, UINT32 Width) { - u_int32_t byte_width = Width / 8; - u_int32_t val; + + if (Width == 64) + return (AE_SUPPORT); if (!pci_cfgregopen()) - return (AE_NOT_EXIST); + return (AE_NOT_EXIST); - val = pci_cfgregread(PciId->Bus, PciId->Device, PciId->Function, Register, - byte_width); - switch (Width) { - case 8: - *(u_int8_t *)Value = val & 0xff; - break; - case 16: - *(u_int16_t *)Value = val & 0xffff; - break; - case 32: - *(u_int32_t *)Value = val; - break; - default: - /* debug trap goes here */ - break; - } + *(UINT64 *)Value = pci_cfgregread(PciId->Bus, PciId->Device, + PciId->Function, Register, Width / 8); return (AE_OK); } @@ -223,13 +201,15 @@ ACPI_STATUS AcpiOsWritePciConfiguration (ACPI_PCI_ID *PciId, UINT32 Register, ACPI_INTEGER Value, UINT32 Width) { - u_int32_t byte_width = Width / 8; + + if (Width == 64) + return (AE_SUPPORT); if (!pci_cfgregopen()) return (AE_NOT_EXIST); pci_cfgregwrite(PciId->Bus, PciId->Device, PciId->Function, Register, - Value, byte_width); + Value, Width / 8); return (AE_OK); } Modified: stable/7/sys/dev/acpica/Osd/OsdMemory.c ============================================================================== --- stable/7/sys/dev/acpica/Osd/OsdMemory.c Tue Jul 20 19:38:38 2010 (r210313) +++ stable/7/sys/dev/acpica/Osd/OsdMemory.c Tue Jul 20 19:43:25 2010 (r210314) @@ -108,29 +108,23 @@ AcpiOsReadMemory(ACPI_PHYSICAL_ADDRESS A { void *LogicalAddress; - LogicalAddress = AcpiOsMapMemory(Address, Width / 8); + LogicalAddress = pmap_mapdev(Address, Width / 8); if (LogicalAddress == NULL) return (AE_NOT_EXIST); switch (Width) { case 8: - *(u_int8_t *)Value = (*(volatile u_int8_t *)LogicalAddress); + *Value = *(volatile uint8_t *)LogicalAddress; break; case 16: - *(u_int16_t *)Value = (*(volatile u_int16_t *)LogicalAddress); + *Value = *(volatile uint16_t *)LogicalAddress; break; case 32: - *(u_int32_t *)Value = (*(volatile u_int32_t *)LogicalAddress); - break; - case 64: - *(u_int64_t *)Value = (*(volatile u_int64_t *)LogicalAddress); - break; - default: - /* debug trap goes here */ + *Value = *(volatile uint32_t *)LogicalAddress; break; } - AcpiOsUnmapMemory(LogicalAddress, Width / 8); + pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8); return (AE_OK); } @@ -140,29 +134,23 @@ AcpiOsWriteMemory(ACPI_PHYSICAL_ADDRESS { void *LogicalAddress; - LogicalAddress = AcpiOsMapMemory(Address, Width / 8); + LogicalAddress = pmap_mapdev(Address, Width / 8); if (LogicalAddress == NULL) return (AE_NOT_EXIST); switch (Width) { case 8: - (*(volatile u_int8_t *)LogicalAddress) = Value & 0xff; + *(volatile uint8_t *)LogicalAddress = Value; break; case 16: - (*(volatile u_int16_t *)LogicalAddress) = Value & 0xffff; + *(volatile uint16_t *)LogicalAddress = Value; break; case 32: - (*(volatile u_int32_t *)LogicalAddress) = Value & 0xffffffff; - break; - case 64: - (*(volatile u_int64_t *)LogicalAddress) = Value; - break; - default: - /* debug trap goes here */ + *(volatile uint32_t *)LogicalAddress = Value; break; } - AcpiOsUnmapMemory(LogicalAddress, Width / 8); + pmap_unmapdev((vm_offset_t)LogicalAddress, Width / 8); return (AE_OK); } From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 20:15:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 156DE106566B; Tue, 20 Jul 2010 20:15:33 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 029D88FC13; Tue, 20 Jul 2010 20:15:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KKFWMn098567; Tue, 20 Jul 2010 20:15:32 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KKFWFC098562; Tue, 20 Jul 2010 20:15:32 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007202015.o6KKFWFC098562@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 20:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210315 - in stable/8/sys: amd64/acpica conf dev/acpica modules/acpi/acpi X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 20:15:33 -0000 Author: jkim Date: Tue Jul 20 20:15:32 2010 New Revision: 210315 URL: http://svn.freebsd.org/changeset/base/210315 Log: MFC: r209957, r210003, r210005 - Move i386-inherited logic of building ACPI headers for acpi_wakeup.c into better places and remove intermediate makefile and shell scripts. This makes parallel kernel build little bit safer for amd64. - Make SMP code path in acpi.c conditional at run-time. - Define SMP unconditionally for amd64 and remove opt_global.h from SRCS in sys/modules/acpi/acpi/Makefile. Note it is done just for correctness sake because we do not build, ship, or support acpi.ko on amd64. Deleted: stable/8/sys/amd64/acpica/Makefile stable/8/sys/amd64/acpica/genwakecode.sh stable/8/sys/amd64/acpica/genwakedata.sh Modified: stable/8/sys/amd64/acpica/acpi_wakecode.S stable/8/sys/conf/files.amd64 stable/8/sys/dev/acpica/acpi.c stable/8/sys/modules/acpi/acpi/Makefile Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/amd64/acpica/acpi_wakecode.S ============================================================================== --- stable/8/sys/amd64/acpica/acpi_wakecode.S Tue Jul 20 19:43:25 2010 (r210314) +++ stable/8/sys/amd64/acpica/acpi_wakecode.S Tue Jul 20 20:15:32 2010 (r210315) @@ -29,8 +29,6 @@ * $FreeBSD$ */ -#define LOCORE - #include #include Modified: stable/8/sys/conf/files.amd64 ============================================================================== --- stable/8/sys/conf/files.amd64 Tue Jul 20 19:43:25 2010 (r210314) +++ stable/8/sys/conf/files.amd64 Tue Jul 20 20:15:32 2010 (r210315) @@ -70,17 +70,26 @@ hptrr_lib.o optional hptrr \ amd64/acpica/OsdEnvironment.c optional acpi amd64/acpica/acpi_machdep.c optional acpi amd64/acpica/acpi_switch.S optional acpi -acpi_wakecode.h optional acpi \ - dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ - compile-with "${MAKE} -f $S/amd64/acpica/Makefile ${.TARGET} MAKESRCPATH=$S/amd64/acpica" \ +acpi_wakecode.o optional acpi \ + dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ + compile-with "${NORMAL_S}" \ no-obj no-implicit-rule before-depend \ - clean "acpi_wakecode.h acpi_wakecode.o acpi_wakecode.bin" -# -acpi_wakedata.h optional acpi \ - dependency "$S/amd64/acpica/acpi_wakecode.S assym.s" \ - compile-with "${MAKE} -f $S/amd64/acpica/Makefile ${.TARGET} MAKESRCPATH=$S/amd64/acpica" \ - no-obj no-implicit-rule before-depend \ - clean "acpi_wakedata.h acpi_wakecode.o acpi_wakecode.bin" + clean "acpi_wakecode.o" +acpi_wakecode.bin optional acpi \ + dependency "acpi_wakecode.o" \ + compile-with "objcopy -S -O binary acpi_wakecode.o ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakecode.bin" +acpi_wakecode.h optional acpi \ + dependency "acpi_wakecode.bin" \ + compile-with "file2c -sx 'static char wakecode[] = {' '};' < acpi_wakecode.bin > ${.TARGET}" \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakecode.h" +acpi_wakedata.h optional acpi \ + dependency "acpi_wakecode.o" \ + compile-with 'nm -n --defined-only acpi_wakecode.o | while read offset dummy what; do echo "#define $${what} 0x$${offset}"; done > ${.TARGET}' \ + no-obj no-implicit-rule before-depend \ + clean "acpi_wakedata.h" # amd64/acpica/acpi_wakeup.c optional acpi amd64/acpica/madt.c optional acpi Modified: stable/8/sys/dev/acpica/acpi.c ============================================================================== --- stable/8/sys/dev/acpica/acpi.c Tue Jul 20 19:43:25 2010 (r210314) +++ stable/8/sys/dev/acpica/acpi.c Tue Jul 20 20:15:32 2010 (r210315) @@ -46,9 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#ifdef SMP #include -#endif #include #include @@ -2536,11 +2534,11 @@ acpi_EnterSleepState(struct acpi_softc * return_ACPI_STATUS (AE_OK); } -#ifdef SMP - thread_lock(curthread); - sched_bind(curthread, 0); - thread_unlock(curthread); -#endif + if (smp_started) { + thread_lock(curthread); + sched_bind(curthread, 0); + thread_unlock(curthread); + } /* * Be sure to hold Giant across DEVICE_SUSPEND/RESUME since non-MPSAFE @@ -2621,11 +2619,11 @@ backout: mtx_unlock(&Giant); -#ifdef SMP - thread_lock(curthread); - sched_unbind(curthread); - thread_unlock(curthread); -#endif + if (smp_started) { + thread_lock(curthread); + sched_unbind(curthread); + thread_unlock(curthread); + } /* Allow another sleep request after a while. */ timeout(acpi_sleep_enable, sc, hz * ACPI_MINIMUM_AWAKETIME); Modified: stable/8/sys/modules/acpi/acpi/Makefile ============================================================================== --- stable/8/sys/modules/acpi/acpi/Makefile Tue Jul 20 19:43:25 2010 (r210314) +++ stable/8/sys/modules/acpi/acpi/Makefile Tue Jul 20 20:15:32 2010 (r210315) @@ -99,15 +99,28 @@ SRCS+= assym.s madt.c CLEANFILES+= acpi_wakecode.bin acpi_wakecode.h acpi_wakecode.o .if ${MACHINE_ARCH} == "amd64" -SRCS+= acpi_switch.S opt_global.h +.if !defined(KERNBUILDDIR) +CFLAGS+=-DSMP +.endif +SRCS+= acpi_switch.S acpi_wakedata.h CLEANFILES+= acpi_wakedata.h ASM_CFLAGS= -x assembler-with-cpp -DLOCORE ${CFLAGS} acpi_switch.o: acpi_switch.S ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} -.endif - +acpi_wakecode.o: acpi_wakecode.S assym.s + ${CC} -c ${ASM_CFLAGS} ${WERROR} ${.IMPSRC} +acpi_wakecode.bin: acpi_wakecode.o + objcopy -S -O binary acpi_wakecode.o ${.TARGET} +acpi_wakecode.h: acpi_wakecode.bin + file2c -sx 'static char wakecode[] = {' '};' < acpi_wakecode.bin > \ + ${.TARGET} +acpi_wakedata.h: acpi_wakecode.o + nm -n --defined-only ${.ALLSRC} | while read offset dummy what; do \ + echo "#define $${what} 0x$${offset}"; done > ${.TARGET} +.else acpi_wakecode.h: acpi_wakecode.S assym.s ${MAKE} -f ${.CURDIR}/../../../${MACHINE_ARCH}/acpica/Makefile \ MAKESRCPATH=${.CURDIR}/../../../${MACHINE_ARCH}/acpica +.endif .include From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 20:27:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6B016106564A; Tue, 20 Jul 2010 20:27:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3FE368FC0A; Tue, 20 Jul 2010 20:27:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KKRZPI001420; Tue, 20 Jul 2010 20:27:35 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KKRZlM001416; Tue, 20 Jul 2010 20:27:35 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201007202027.o6KKRZlM001416@svn.freebsd.org> From: Jung-uk Kim Date: Tue, 20 Jul 2010 20:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210316 - stable/8/sys/dev/usb/wlan X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 20:27:35 -0000 Author: jkim Date: Tue Jul 20 20:27:34 2010 New Revision: 210316 URL: http://svn.freebsd.org/changeset/base/210316 Log: MFC: r209189 Fix typos that broke duration calculations on protection frames. Modified: stable/8/sys/dev/usb/wlan/if_rum.c stable/8/sys/dev/usb/wlan/if_run.c stable/8/sys/dev/usb/wlan/if_ural.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/dev/usb/wlan/if_rum.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_rum.c Tue Jul 20 20:15:32 2010 (r210315) +++ stable/8/sys/dev/usb/wlan/if_rum.c Tue Jul 20 20:27:34 2010 (r210316) @@ -1049,7 +1049,7 @@ rum_sendprot(struct rum_softc *sc, ackrate = ieee80211_ack_rate(ic->ic_rt, rate); isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; - dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort); + dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) + ieee80211_ack_duration(ic->ic_rt, rate, isshort); flags = RT2573_TX_MORE_FRAG; if (prot == IEEE80211_PROT_RTSCTS) { Modified: stable/8/sys/dev/usb/wlan/if_run.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_run.c Tue Jul 20 20:15:32 2010 (r210315) +++ stable/8/sys/dev/usb/wlan/if_run.c Tue Jul 20 20:27:34 2010 (r210316) @@ -3164,7 +3164,7 @@ run_sendprot(struct run_softc *sc, ackrate = ieee80211_ack_rate(ic->ic_rt, rate); isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; - dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort); + dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) + ieee80211_ack_duration(ic->ic_rt, rate, isshort); wflags = RT2860_TX_FRAG; Modified: stable/8/sys/dev/usb/wlan/if_ural.c ============================================================================== --- stable/8/sys/dev/usb/wlan/if_ural.c Tue Jul 20 20:15:32 2010 (r210315) +++ stable/8/sys/dev/usb/wlan/if_ural.c Tue Jul 20 20:27:34 2010 (r210316) @@ -1157,7 +1157,7 @@ ural_sendprot(struct ural_softc *sc, ackrate = ieee80211_ack_rate(ic->ic_rt, rate); isshort = (ic->ic_flags & IEEE80211_F_SHPREAMBLE) != 0; - dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort); + dur = ieee80211_compute_duration(ic->ic_rt, pktlen, rate, isshort) + ieee80211_ack_duration(ic->ic_rt, rate, isshort); flags = RAL_TX_RETRY(7); if (prot == IEEE80211_PROT_RTSCTS) { From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 21:17:33 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9761F106566C; Tue, 20 Jul 2010 21:17:33 +0000 (UTC) (envelope-from jmallett@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6DB588FC0A; Tue, 20 Jul 2010 21:17:33 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6KLHXbF012572; Tue, 20 Jul 2010 21:17:33 GMT (envelope-from jmallett@svn.freebsd.org) Received: (from jmallett@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6KLHX5j012571; Tue, 20 Jul 2010 21:17:33 GMT (envelope-from jmallett@svn.freebsd.org) Message-Id: <201007202117.o6KLHX5j012571@svn.freebsd.org> From: Juli Mallett Date: Tue, 20 Jul 2010 21:17:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210317 - head/sys/mips/mips X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 21:17:33 -0000 Author: jmallett Date: Tue Jul 20 21:17:33 2010 New Revision: 210317 URL: http://svn.freebsd.org/changeset/base/210317 Log: Remove unused file. Replaced by tlb.c. Deleted: head/sys/mips/mips/tlb.S From owner-svn-src-all@FreeBSD.ORG Tue Jul 20 21:52:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6DF3E106564A; Tue, 20 Jul 2010 21:52:26 +0000 (UTC) (envelope-from anders@FreeBSD.org) Received: from fupp.net (totem.fix.no [80.91.36.20]) by mx1.freebsd.org (Postfix) with ESMTP id 1D9238FC0A; Tue, 20 Jul 2010 21:52:25 +0000 (UTC) Received: from localhost (totem.fix.no [80.91.36.20]) by fupp.net (Postfix) with ESMTP id 166AA462A6; Tue, 20 Jul 2010 23:52:25 +0200 (CEST) Received: from fupp.net ([80.91.36.20]) by localhost (totem.fix.no [80.91.36.20]) (amavisd-new, port 10024) with LMTP id XHpppQK3gady; Tue, 20 Jul 2010 23:52:24 +0200 (CEST) Received: by fupp.net (Postfix, from userid 1000) id DC08A462A5; Tue, 20 Jul 2010 23:52:24 +0200 (CEST) Date: Tue, 20 Jul 2010 23:52:24 +0200 From: Anders Nordby To: Pyun YongHyeon Message-ID: <20100720215224.GA47151@fupp.net> References: <201006101804.o5AI4PEX024259@svn.freebsd.org> <20100629074831.GA75332@fupp.net> <1277820825.55649.7.camel@bauer.cse.buffalo.edu> <20100701215218.GC7090@michelle.cdnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20100701215218.GC7090@michelle.cdnetworks.com> User-Agent: Mutt/1.4.2.3i X-PGP-Key: http://anders.fix.no/pgp/ X-PGP-Key-FingerPrint: 1E0F C53C D8DF 6A8F EAAD 19C5 D12A BC9F 0083 5956 Cc: src-committers@freebsd.org, Ken Smith , jdc@parodius.com, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-7@freebsd.org, marcel@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r208995 - stable/7/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jul 2010 21:52:26 -0000 Hi, On Thu, Jul 01, 2010 at 02:52:18PM -0700, Pyun YongHyeon wrote: >> > Is it possible to get this fix into FreeBSD 7.3-RELEASE? >> We typically rely on developers to decide if fixes might warrant >> consideration as an Errata Notice and send email to re@ suggesting >> it. It's hard for us to judge on our own - factors include things >> like the individual developers' confidence level in the fix, etc. > Even though I didn't receive positive feedback from jumbo frame > users I'm pretty sure the change set will fix regression introduced > in r199011. As you might know, the bug was not detected for a very > long time(about 6 months) so I think it's better to wait 2 or 3 > weeks to get more confidence on the patch. Ok, so it's been 19 days since your mail. And much longer since june 10, when you fixed it in RELENG_7 and RELENG_8. Do you feel OK with the patch by now? My experience with the patch on production systems is entirely positive. Would be great to have this fix in 7.3. Only 7.3 has this bug. I can send the reports of my problems to re@ if you are OK with putting this into the release. Regards, -- Anders. From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 03:49:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 56CF6106566B; Wed, 21 Jul 2010 03:49:00 +0000 (UTC) (envelope-from imp@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 460918FC1C; Wed, 21 Jul 2010 03:49:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L3n0Ca099627; Wed, 21 Jul 2010 03:49:00 GMT (envelope-from imp@svn.freebsd.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L3n0gE099624; Wed, 21 Jul 2010 03:49:00 GMT (envelope-from imp@svn.freebsd.org) Message-Id: <201007210349.o6L3n0gE099624@svn.freebsd.org> From: Warner Losh Date: Wed, 21 Jul 2010 03:49:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org X-SVN-Group: svnadmin MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210318 - svnadmin/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 03:49:00 -0000 Author: imp Date: Wed Jul 21 03:48:58 2010 New Revision: 210318 URL: http://svn.freebsd.org/changeset/base/210318 Log: Welecome Andrew Turner to our midsts. He'll be doing Samsung ARM things as punishment for all the Samsung ARM things he's done to date. I'll be his mentor. Approved by: core@ (core.5) Modified: svnadmin/conf/access svnadmin/conf/mentors Modified: svnadmin/conf/access ============================================================================== --- svnadmin/conf/access Tue Jul 20 21:17:33 2010 (r210317) +++ svnadmin/conf/access Wed Jul 21 03:48:58 2010 (r210318) @@ -25,6 +25,7 @@ alfred ambrisko anchie andre +andrew antoine ariff attilio Modified: svnadmin/conf/mentors ============================================================================== --- svnadmin/conf/mentors Tue Jul 20 21:17:33 2010 (r210317) +++ svnadmin/conf/mentors Wed Jul 21 03:48:58 2010 (r210318) @@ -12,6 +12,7 @@ # Mentee Mentor Optional comment ae mav Co-mentor: kib anchie bz +andrew imp brucec rrs cbzimmer sam dchagin kib From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 04:18:18 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B94FD1065675; Wed, 21 Jul 2010 04:18:18 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 4CA0D8FC21; Wed, 21 Jul 2010 04:18:17 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6L4IDCG026215 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Jul 2010 14:18:14 +1000 Date: Wed, 21 Jul 2010 14:18:13 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: John Baldwin In-Reply-To: <201007190829.21995.jhb@freebsd.org> Message-ID: <20100721134319.E7228@delplex.bde.org> References: <201007181015.o6IAFXvK018739@svn.freebsd.org> <201007190829.21995.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Ivan Voras Subject: Re: svn commit: r210217 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 04:18:18 -0000 On Mon, 19 Jul 2010, John Baldwin wrote: >> Log: >> In keeping with the Age-of-the-fruitbat theme, scale up hirunningspace on >> machines which can clearly afford the memory. >> >> This is a somewhat conservative version of the patch - more fine tuning may be >> necessary. >> >> Idea from: Thread on hackers@ >> Discussed with: alc Sorry I didn't look at the thread, but I wonder if you should increase lorunningspace similarly. The vfs_bio sysctls are not easy to tune. The only time I tried changing them much was in connection with nfs. Congestion caused i/o to not stream. IIRC the problem was mostly that too many nfsiods ran and they got in each others way, and increasing hirunningspace only helped by making the problem more obvious -- it allowed longer bursts of the network part of the i/o but longer idle periods too. There is a possibly related problem with writing through file systems to high-latency disk devices like dvds. getblk() often takes many seconds, and occasionally takes a couple of _minutes_. dvd's aren't quite that slow, and can easily write hirunningspace = 1MB in 1 second, except possibly if the file system is not designed for high-latency devices (like most including cd9660 and udf are :-() so it does lots of random i/o). The above is mostly for 1 active file system... >> >> Modified: >> head/sys/kern/vfs_bio.c >> >> Modified: head/sys/kern/vfs_bio.c >> ============================================================================== >> --- head/sys/kern/vfs_bio.c Sun Jul 18 08:54:31 2010 (r210216) >> +++ head/sys/kern/vfs_bio.c Sun Jul 18 10:15:33 2010 (r210217) >> @@ -621,7 +621,9 @@ bufinit(void) >> lobufspace = hibufspace - MAXBSIZE; >> >> lorunningspace = 512 * 1024; >> - hirunningspace = 1024 * 1024; >> + hirunningspace = lmin(roundup(hibufspace/64, MAXBSIZE), 16*1024*1024); >> + if (hirunningspace < 1024 * 1024) >> + hirunningspace = 1024 * 1024; ... dvds are plenty slow enough to take many seconds to write hirunningspace = 16MB, even for purely sequential writes. Floppy disks are slower and would take 16*33 seconds :-). So although faster disks and multiple disks need a larger hirunningspace, a large hirunningspace is not good while it is global (it should probably be per-active-disk). If there is just one active-for-writes slow disk in the system, writes to it alone are almost sure to build up (since writes to the faster disks will complete faster), so that soon all of hirunningspace is allocated to the slow disk. Something like this happens in my dvd example. > Presumably you could use 'lmax(lmin(..., 16 * 1024 * 1024), 1024 * 1024))'? Better. > Also, the common style throughout the kernel is to provide spaces around > operators like '/' and '*'. The Normal style is still used in adjacent lines. Normal formatting is sometimes broken to avoid lines longer than 80 characters. This works here. I don't like this. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 08:27:56 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB444106566B; Wed, 21 Jul 2010 08:27:56 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9AEF28FC08; Wed, 21 Jul 2010 08:27:56 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L8RuqF061158; Wed, 21 Jul 2010 08:27:56 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L8RucS061157; Wed, 21 Jul 2010 08:27:56 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201007210827.o6L8RucS061157@svn.freebsd.org> From: Ed Schouten Date: Wed, 21 Jul 2010 08:27:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210320 - head/tools/build/mk X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 08:27:56 -0000 Author: ed Date: Wed Jul 21 08:27:56 2010 New Revision: 210320 URL: http://svn.freebsd.org/changeset/base/210320 Log: Chase LLVM version bump to 2.8. Modified: head/tools/build/mk/OptionalObsoleteFiles.inc Modified: head/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- head/tools/build/mk/OptionalObsoleteFiles.inc Wed Jul 21 06:52:13 2010 (r210319) +++ head/tools/build/mk/OptionalObsoleteFiles.inc Wed Jul 21 08:27:56 2010 (r210320) @@ -630,12 +630,12 @@ OLD_FILES+=usr/share/man/man8/zpool.8.gz OLD_FILES+=usr/bin/clang OLD_FILES+=usr/bin/clang++ OLD_FILES+=usr/bin/tblgen -OLD_FILES+=usr/include/clang/2.0/emmintrin.h -OLD_FILES+=usr/include/clang/2.0/mm_malloc.h -OLD_FILES+=usr/include/clang/2.0/mmintrin.h -OLD_FILES+=usr/include/clang/2.0/pmmintrin.h -OLD_FILES+=usr/include/clang/2.0/tmmintrin.h -OLD_FILES+=usr/include/clang/2.0/xmmintrin.h +OLD_FILES+=usr/include/clang/2.8/emmintrin.h +OLD_FILES+=usr/include/clang/2.8/mm_malloc.h +OLD_FILES+=usr/include/clang/2.8/mmintrin.h +OLD_FILES+=usr/include/clang/2.8/pmmintrin.h +OLD_FILES+=usr/include/clang/2.8/tmmintrin.h +OLD_FILES+=usr/include/clang/2.8/xmmintrin.h .endif .if ${MK_CPP} == no From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 08:43:48 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D84BD1065674; Wed, 21 Jul 2010 08:43:48 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C83938FC08; Wed, 21 Jul 2010 08:43:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L8hmEN064624; Wed, 21 Jul 2010 08:43:48 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L8hmo5064622; Wed, 21 Jul 2010 08:43:48 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007210843.o6L8hmo5064622@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 08:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210321 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 08:43:48 -0000 Author: kaiw Date: Wed Jul 21 08:43:48 2010 New Revision: 210321 URL: http://svn.freebsd.org/changeset/base/210321 Log: Remove a superfluous comment. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/elf_update.c Modified: head/lib/libelf/elf_update.c ============================================================================== --- head/lib/libelf/elf_update.c Wed Jul 21 08:27:56 2010 (r210320) +++ head/lib/libelf/elf_update.c Wed Jul 21 08:43:48 2010 (r210321) @@ -297,7 +297,6 @@ _libelf_resync_sections(Elf *e, off_t rc else sh_type = s->s_shdr.s_shdr64.sh_type; - /* XXX Do we need the 'size' field of an SHT_NOBITS section */ if (sh_type == SHT_NOBITS || sh_type == SHT_NULL) continue; From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 08:48:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F05371065675; Wed, 21 Jul 2010 08:48:45 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DD35C8FC19; Wed, 21 Jul 2010 08:48:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L8mjej065838; Wed, 21 Jul 2010 08:48:45 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L8mjVZ065832; Wed, 21 Jul 2010 08:48:45 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201007210848.o6L8mjVZ065832@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Wed, 21 Jul 2010 08:48:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210322 - in stable/8/sbin/geom: class/part core misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 08:48:46 -0000 Author: ae Date: Wed Jul 21 08:48:45 2010 New Revision: 210322 URL: http://svn.freebsd.org/changeset/base/210322 Log: MFC r209388: Remove G_TYPE_ASCLBA type and replace it with G_TYPE_STRING in gpart. Move code that converts params from humanized numbers to sectors count to subr.c and adjust comment. Add post-processing for "size" and "start offset" params in gpart, now they are properly converted to sectors count with known sector size that can be greater that 512 bytes. Also replace "unsigned long long" type to "off_t" for unify code since it used for medium size in libgeom(3) and DIOCGMEDIASIZE ioctl. PR: bin/146277 MFC r209392: Check for overflow before it occurs. Also add check for negative numbers. Suggested by: ache Approved by: mav (mentor) Modified: stable/8/sbin/geom/class/part/geom_part.c stable/8/sbin/geom/core/geom.c stable/8/sbin/geom/core/geom.h stable/8/sbin/geom/misc/subr.c stable/8/sbin/geom/misc/subr.h Directory Properties: stable/8/sbin/geom/ (props changed) stable/8/sbin/geom/class/part/ (props changed) stable/8/sbin/geom/class/stripe/ (props changed) Modified: stable/8/sbin/geom/class/part/geom_part.c ============================================================================== --- stable/8/sbin/geom/class/part/geom_part.c Wed Jul 21 08:43:48 2010 (r210321) +++ stable/8/sbin/geom/class/part/geom_part.c Wed Jul 21 08:48:45 2010 (r210322) @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -60,6 +62,9 @@ static char autofill[] = "*"; static char optional[] = ""; static char flags[] = "C"; +static char sstart[32]; +static char ssize[32]; + static const char const bootcode_param[] = "bootcode"; static const char const index_param[] = "index"; static const char const partcode_param[] = "partcode"; @@ -68,8 +73,7 @@ static struct gclass *find_class(struct static struct ggeom * find_geom(struct gclass *, const char *); static const char *find_geomcfg(struct ggeom *, const char *); static const char *find_provcfg(struct gprovider *, const char *); -static struct gprovider *find_provider(struct ggeom *, - unsigned long long); +static struct gprovider *find_provider(struct ggeom *, off_t); static const char *fmtsize(int64_t); static int gpart_autofill(struct gctl_req *); static void gpart_bootcode(struct gctl_req *, unsigned int); @@ -83,8 +87,8 @@ static void gpart_write_partcode_vtoc8(s struct g_command PUBSYM(class_commands)[] = { { "add", 0, gpart_issue, { - { 'b', "start", autofill, G_TYPE_ASCLBA }, - { 's', "size", autofill, G_TYPE_ASCLBA }, + { 'b', "start", autofill, G_TYPE_STRING }, + { 's', "size", autofill, G_TYPE_STRING }, { 't', "type", NULL, G_TYPE_STRING }, { 'i', index_param, optional, G_TYPE_ASCNUM }, { 'l', "label", optional, G_TYPE_STRING }, @@ -148,7 +152,7 @@ struct g_command PUBSYM(class_commands)[ "geom", NULL }, { "resize", 0, gpart_issue, { - { 's', "size", autofill, G_TYPE_ASCLBA }, + { 's', "size", autofill, G_TYPE_STRING }, { 'i', index_param, NULL, G_TYPE_ASCNUM }, { 'f', "flags", flags, G_TYPE_STRING }, G_OPT_SENTINEL }, @@ -206,11 +210,11 @@ find_provcfg(struct gprovider *pp, const } static struct gprovider * -find_provider(struct ggeom *gp, unsigned long long minsector) +find_provider(struct ggeom *gp, off_t minsector) { struct gprovider *pp, *bestpp; const char *s; - unsigned long long sector, bestsector; + off_t sector, bestsector; bestpp = NULL; bestsector = 0; @@ -218,9 +222,10 @@ find_provider(struct ggeom *gp, unsigned s = find_provcfg(pp, "start"); if (s == NULL) { s = find_provcfg(pp, "offset"); - sector = atoll(s) / pp->lg_sectorsize; + sector = + (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else - sector = atoll(s); + sector = (off_t)strtoimax(s, NULL, 0); if (sector < minsector) continue; @@ -270,18 +275,12 @@ gpart_autofill_resize(struct gctl_req *r struct gclass *cp; struct ggeom *gp; struct gprovider *pp; - unsigned long long last, size, start, new_size; - unsigned long long lba, new_lba; + off_t last, size, start, new_size; + off_t lba, new_lba; const char *s; char *val; int error, idx; - s = gctl_get_ascii(req, "size"); - if (*s == '*') - new_size = (unsigned long long)atoll(s); - else - return (0); - s = gctl_get_ascii(req, index_param); idx = strtol(s, &val, 10); if (idx < 1 || *s == '\0' || *val != '\0') @@ -302,8 +301,22 @@ gpart_autofill_resize(struct gctl_req *r gp = find_geom(cp, s); if (gp == NULL) errx(EXIT_FAILURE, "No such geom: %s.", s); - last = atoll(find_geomcfg(gp, "last")); + pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; + if (pp == NULL) + errx(EXIT_FAILURE, "Provider for geom %s not found.", s); + + s = gctl_get_ascii(req, "size"); + if (*s == '*') + new_size = 0; + else { + error = g_parse_lba(s, pp->lg_sectorsize, &new_size); + if (error) + errc(EXIT_FAILURE, error, "Invalid size param"); + /* no autofill necessary. */ + goto done; + } + last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0); LIST_FOREACH(pp, &gp->lg_provider, lg_provider) { s = find_provcfg(pp, "index"); if (s == NULL) @@ -317,18 +330,21 @@ gpart_autofill_resize(struct gctl_req *r s = find_provcfg(pp, "start"); if (s == NULL) { s = find_provcfg(pp, "offset"); - start = atoll(s) / pp->lg_sectorsize; + start = (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else - start = atoll(s); + start = (off_t)strtoimax(s, NULL, 0); s = find_provcfg(pp, "end"); if (s == NULL) { s = find_provcfg(pp, "length"); - lba = start + atoll(s) / pp->lg_sectorsize; + lba = start + + (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else - lba = atoll(s) + 1; + lba = (off_t)strtoimax(s, NULL, 0) + 1; - if (lba > last) + if (lba > last) { + geom_deletetree(&mesh); return (ENOSPC); + } size = lba - start; pp = find_provider(gp, lba); if (pp == NULL) @@ -337,22 +353,25 @@ gpart_autofill_resize(struct gctl_req *r s = find_provcfg(pp, "start"); if (s == NULL) { s = find_provcfg(pp, "offset"); - new_lba = atoll(s) / pp->lg_sectorsize; + new_lba = + (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else - new_lba = atoll(s); - /* Is there any free space between current and + new_lba = (off_t)strtoimax(s, NULL, 0); + /* + * Is there any free space between current and * next providers? */ if (new_lba > lba) new_size = new_lba - start; - else + else { + geom_deletetree(&mesh); return (ENOSPC); + } } - asprintf(&val, "%llu", new_size); - if (val == NULL) - return (ENOMEM); - gctl_change_param(req, "size", -1, val); - +done: + snprintf(ssize, sizeof(ssize), "%jd", (intmax_t)new_size); + gctl_change_param(req, "size", -1, ssize); + geom_deletetree(&mesh); return (0); } @@ -363,11 +382,11 @@ gpart_autofill(struct gctl_req *req) struct gclass *cp; struct ggeom *gp; struct gprovider *pp; - unsigned long long first, last; - unsigned long long size, start; - unsigned long long lba, len, grade; + off_t first, last; + off_t size, start; + off_t lba, len; + uintmax_t grade; const char *s; - char *val; int error, has_size, has_start; s = gctl_get_ascii(req, "verb"); @@ -376,18 +395,6 @@ gpart_autofill(struct gctl_req *req) if (strcmp(s, "add") != 0) return (0); - s = gctl_get_ascii(req, "size"); - has_size = (*s == '*') ? 0 : 1; - size = (has_size) ? (unsigned long long)atoll(s) : 0ULL; - - s = gctl_get_ascii(req, "start"); - has_start = (*s == '*') ? 0 : 1; - start = (has_start) ? (unsigned long long)atoll(s) : ~0ULL; - - /* No autofill necessary. */ - if (has_size && has_start) - return (0); - error = geom_gettree(&mesh); if (error) return (error); @@ -403,22 +410,49 @@ gpart_autofill(struct gctl_req *req) gp = find_geom(cp, s); if (gp == NULL) errx(EXIT_FAILURE, "No such geom: %s.", s); - first = atoll(find_geomcfg(gp, "first")); - last = atoll(find_geomcfg(gp, "last")); + pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; + if (pp == NULL) + errx(EXIT_FAILURE, "Provider for geom %s not found.", s); + + s = gctl_get_ascii(req, "size"); + has_size = (*s == '*') ? 0 : 1; + size = 0; + if (has_size) { + error = g_parse_lba(s, pp->lg_sectorsize, &size); + if (error) + errc(EXIT_FAILURE, error, "Invalid size param"); + } + + s = gctl_get_ascii(req, "start"); + has_start = (*s == '*') ? 0 : 1; + start = 0ULL; + if (has_start) { + error = g_parse_lba(s, pp->lg_sectorsize, &start); + if (error) + errc(EXIT_FAILURE, error, "Invalid start param"); + } + + /* No autofill necessary. */ + if (has_size && has_start) + goto done; + + first = (off_t)strtoimax(find_geomcfg(gp, "first"), NULL, 0); + last = (off_t)strtoimax(find_geomcfg(gp, "last"), NULL, 0); grade = ~0ULL; while ((pp = find_provider(gp, first)) != NULL) { s = find_provcfg(pp, "start"); if (s == NULL) { s = find_provcfg(pp, "offset"); - lba = atoll(s) / pp->lg_sectorsize; + lba = (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else - lba = atoll(s); + lba = (off_t)strtoimax(s, NULL, 0); if (first < lba) { /* Free space [first, lba> */ len = lba - first; if (has_size) { - if (len >= size && len - size < grade) { + if (len >= size && + (uintmax_t)(len - size) < grade) { start = first; grade = len - size; } @@ -439,15 +473,17 @@ gpart_autofill(struct gctl_req *req) s = find_provcfg(pp, "end"); if (s == NULL) { s = find_provcfg(pp, "length"); - first = lba + atoll(s) / pp->lg_sectorsize; + first = lba + + (off_t)strtoimax(s, NULL, 0) / pp->lg_sectorsize; } else - first = atoll(s) + 1; + first = (off_t)strtoimax(s, NULL, 0) + 1; } if (first <= last) { /* Free space [first-last] */ len = last - first + 1; if (has_size) { - if (len >= size && len - size < grade) { + if (len >= size && + (uintmax_t)(len - size) < grade) { start = first; grade = len - size; } @@ -465,21 +501,17 @@ gpart_autofill(struct gctl_req *req) } } - if (grade == ~0ULL) + if (grade == ~0ULL) { + geom_deletetree(&mesh); return (ENOSPC); - - if (!has_size) { - asprintf(&val, "%llu", size); - if (val == NULL) - return (ENOMEM); - gctl_change_param(req, "size", -1, val); - } - if (!has_start) { - asprintf(&val, "%llu", start); - if (val == NULL) - return (ENOMEM); - gctl_change_param(req, "start", -1, val); } + +done: + snprintf(ssize, sizeof(ssize), "%jd", (intmax_t)size); + gctl_change_param(req, "size", -1, ssize); + snprintf(sstart, sizeof(sstart), "%jd", (intmax_t)start); + gctl_change_param(req, "start", -1, sstart); + geom_deletetree(&mesh); return (0); } @@ -488,21 +520,21 @@ gpart_show_geom(struct ggeom *gp, const { struct gprovider *pp; const char *s, *scheme; - unsigned long long first, last, sector, end; - unsigned long long length, secsz; + off_t first, last, sector, end; + off_t length, secsz; int idx, wblocks, wname; scheme = find_geomcfg(gp, "scheme"); s = find_geomcfg(gp, "first"); - first = atoll(s); + first = (off_t)strtoimax(s, NULL, 0); s = find_geomcfg(gp, "last"); - last = atoll(s); + last = (off_t)strtoimax(s, NULL, 0); wblocks = strlen(s); wname = strlen(gp->lg_name); pp = LIST_FIRST(&gp->lg_consumer)->lg_provider; secsz = pp->lg_sectorsize; - printf("=>%*llu %*llu %*s %s (%s)\n", - wblocks, first, wblocks, (last - first + 1), + printf("=>%*jd %*jd %*s %s (%s)\n", + wblocks, (intmax_t)first, wblocks, (intmax_t)(last - first + 1), wname, gp->lg_name, scheme, fmtsize(pp->lg_mediasize)); @@ -510,37 +542,37 @@ gpart_show_geom(struct ggeom *gp, const s = find_provcfg(pp, "start"); if (s == NULL) { s = find_provcfg(pp, "offset"); - sector = atoll(s) / secsz; + sector = (off_t)strtoimax(s, NULL, 0) / secsz; } else - sector = atoll(s); + sector = (off_t)strtoimax(s, NULL, 0); s = find_provcfg(pp, "end"); if (s == NULL) { s = find_provcfg(pp, "length"); - length = atoll(s) / secsz; + length = (off_t)strtoimax(s, NULL, 0) / secsz; end = sector + length - 1; } else { - end = atoll(s); + end = (off_t)strtoimax(s, NULL, 0); length = end - sector + 1; } s = find_provcfg(pp, "index"); idx = atoi(s); if (first < sector) { - printf(" %*llu %*llu %*s - free - (%s)\n", - wblocks, first, wblocks, sector - first, - wname, "", + printf(" %*jd %*jd %*s - free - (%s)\n", + wblocks, (intmax_t)first, wblocks, + (intmax_t)(sector - first), wname, "", fmtsize((sector - first) * secsz)); } - printf(" %*llu %*llu %*d %s %s (%s)\n", - wblocks, sector, wblocks, length, + printf(" %*jd %*jd %*d %s %s (%s)\n", + wblocks, (intmax_t)sector, wblocks, (intmax_t)length, wname, idx, find_provcfg(pp, element), fmtattrib(pp), fmtsize(pp->lg_mediasize)); first = end + 1; } if (first <= last) { length = last - first + 1; - printf(" %*llu %*llu %*s - free - (%s)\n", - wblocks, first, wblocks, length, + printf(" %*jd %*jd %*s - free - (%s)\n", + wblocks, (intmax_t)first, wblocks, (intmax_t)length, wname, "", fmtsize(length * secsz)); } Modified: stable/8/sbin/geom/core/geom.c ============================================================================== --- stable/8/sbin/geom/core/geom.c Wed Jul 21 08:43:48 2010 (r210321) +++ stable/8/sbin/geom/core/geom.c Wed Jul 21 08:48:45 2010 (r210322) @@ -249,94 +249,6 @@ set_option(struct gctl_req *req, struct opt->go_val); } else gctl_ro_param(req, opt->go_name, -1, opt->go_val); - } else if (G_OPT_TYPE(opt) == G_TYPE_ASCLBA) { - /* - * LBAs are ugly. The argument is a sector. The size of a - * sector is context specific (i.e. determined by the media), - * which we don't know here. But when users enter a value - * with a SI unit, they really mean the byte-size or byte- - * offset and not the size or offset in sectors. - * So how can we map the byte-oriented value into a sector- - * oriented value if we don't know the sector size in bytes? - * The approach taken here is: - * o Sectors are 512 bytes in size. Mostly the case anyway. - * o When no SI unit is specified the value is in sectors. - * o With an SI unit the value is in bytes. - * o The 'b' suffix forces byte interpretation and the 's' - * suffix forces sector interpretation. - * - * Thus: - * o 2 and 2s mean 2 sectors, and 2b means 2 bytes. - * o 4k and 4kb mean 4096 bytes, and 4ks means 4096 sectors. - * - * "This seemed like a good idea at the time" - */ - intmax_t mult, unit; - - number = strtoimax(val, &s, 0); - if (s == val) - errc(EXIT_FAILURE, EINVAL, "argument '%c'", - opt->go_char); - mult = 1; - unit = 512; /* sector */ - if (*s == '\0') - goto done; - switch (*s) { - case 'e': case 'E': - mult *= 1024; - /*FALLTHROUGH*/ - case 'p': case 'P': - mult *= 1024; - /*FALLTHROUGH*/ - case 't': case 'T': - mult *= 1024; - /*FALLTHROUGH*/ - case 'g': case 'G': - mult *= 1024; - /*FALLTHROUGH*/ - case 'm': case 'M': - mult *= 1024; - /*FALLTHROUGH*/ - case 'k': case 'K': - mult *= 1024; - break; - default: - goto sfx; - } - unit = 1; /* bytes */ - s++; - if (*s == '\0') - goto done; -sfx: - switch (*s) { - case 's': case 'S': - unit = 512; /* sector */ - break; - case 'b': case 'B': - unit = 1; /* bytes */ - break; - default: - errc(EXIT_FAILURE, EINVAL, "argument '%c': suffix '%c'", - opt->go_char, *s); - } - s++; - if (*s != '\0') - errx(EXIT_FAILURE, "argument '%c': junk at end (%s)", - opt->go_char, s); -done: - if (mult * unit < mult || number * mult * unit < number) - errc(EXIT_FAILURE, ERANGE, "argument '%c'", - opt->go_char); - number *= mult * unit; - if (number % 512) - errx(EXIT_FAILURE, "argument '%c': " - "not a valid block address", opt->go_char); - number /= 512; - asprintf(&s, "%jd", number); - if (s == NULL) - err(EXIT_FAILURE, NULL); - opt->go_val = s; - gctl_ro_param(req, opt->go_name, -1, s); } else if (G_OPT_TYPE(opt) == G_TYPE_STRING) { gctl_ro_param(req, opt->go_name, -1, val); } else if (G_OPT_TYPE(opt) == G_TYPE_BOOL) { @@ -429,8 +341,7 @@ parse_arguments(struct g_command *cmd, s gctl_ro_param(req, opt->go_name, sizeof(intmax_t), opt->go_val); } else if (G_OPT_TYPE(opt) == G_TYPE_STRING || - G_OPT_TYPE(opt) == G_TYPE_ASCNUM || - G_OPT_TYPE(opt) == G_TYPE_ASCLBA) { + G_OPT_TYPE(opt) == G_TYPE_ASCNUM) { if (cmd->gc_argname == NULL || opt->go_val == NULL || *(char *)opt->go_val != '\0') Modified: stable/8/sbin/geom/core/geom.h ============================================================================== --- stable/8/sbin/geom/core/geom.h Wed Jul 21 08:43:48 2010 (r210321) +++ stable/8/sbin/geom/core/geom.h Wed Jul 21 08:48:45 2010 (r210322) @@ -39,7 +39,6 @@ #define G_TYPE_STRING 0x02 #define G_TYPE_NUMBER 0x03 #define G_TYPE_ASCNUM 0x04 -#define G_TYPE_ASCLBA 0x05 #define G_TYPE_MASK 0x0f #define G_TYPE_DONE 0x10 Modified: stable/8/sbin/geom/misc/subr.c ============================================================================== --- stable/8/sbin/geom/misc/subr.c Wed Jul 21 08:43:48 2010 (r210321) +++ stable/8/sbin/geom/misc/subr.c Wed Jul 21 08:48:45 2010 (r210322) @@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #include #include #include @@ -107,6 +109,94 @@ bitcount32(uint32_t x) return (x); } +/* + * The size of a sector is context specific (i.e. determined by the + * media). But when users enter a value with a SI unit, they really + * mean the byte-size or byte-offset and not the size or offset in + * sectors. We should map the byte-oriented value into a sector-oriented + * value when we already know the sector size in bytes. At this time + * we can use g_parse_lba() function. It converts user specified + * value into sectors with following conditions: + * o Sectors size taken as argument from caller. + * o When no SI unit is specified the value is in sectors. + * o With an SI unit the value is in bytes. + * o The 'b' suffix forces byte interpretation and the 's' + * suffix forces sector interpretation. + * + * Thus: + * o 2 and 2s mean 2 sectors, and 2b means 2 bytes. + * o 4k and 4kb mean 4096 bytes, and 4ks means 4096 sectors. + * + */ +int +g_parse_lba(const char *lbastr, unsigned sectorsize, off_t *sectors) +{ + off_t number, mult, unit; + char *s; + + assert(lbastr != NULL); + assert(sectorsize > 0); + assert(sectors != NULL); + + number = (off_t)strtoimax(lbastr, &s, 0); + if (s == lbastr || number < 0) + return (EINVAL); + + mult = 1; + unit = sectorsize; + if (*s == '\0') + goto done; + switch (*s) { + case 'e': case 'E': + mult *= 1024; + /* FALLTHROUGH */ + case 'p': case 'P': + mult *= 1024; + /* FALLTHROUGH */ + case 't': case 'T': + mult *= 1024; + /* FALLTHROUGH */ + case 'g': case 'G': + mult *= 1024; + /* FALLTHROUGH */ + case 'm': case 'M': + mult *= 1024; + /* FALLTHROUGH */ + case 'k': case 'K': + mult *= 1024; + break; + default: + goto sfx; + } + unit = 1; /* bytes */ + s++; + if (*s == '\0') + goto done; +sfx: + switch (*s) { + case 's': case 'S': + unit = sectorsize; /* sector */ + break; + case 'b': case 'B': + unit = 1; /* bytes */ + break; + default: + return (EINVAL); + } + s++; + if (*s != '\0') + return (EINVAL); +done: + if ((OFF_MAX / unit) < mult || (OFF_MAX / mult / unit) < number) + return (ERANGE); + number *= mult * unit; + if (number % sectorsize) + return (EINVAL); + number /= sectorsize; + *sectors = number; + return (0); +} + off_t g_get_mediasize(const char *name) { Modified: stable/8/sbin/geom/misc/subr.h ============================================================================== --- stable/8/sbin/geom/misc/subr.h Wed Jul 21 08:43:48 2010 (r210321) +++ stable/8/sbin/geom/misc/subr.h Wed Jul 21 08:48:45 2010 (r210322) @@ -32,6 +32,7 @@ unsigned g_lcm(unsigned a, unsigned b); uint32_t bitcount32(uint32_t x); +int g_parse_lba(const char *lbastr, unsigned sectorsize, off_t *sectors); off_t g_get_mediasize(const char *name); unsigned g_get_sectorsize(const char *name); From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 08:51:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A9391106566B; Wed, 21 Jul 2010 08:51:38 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 98CD68FC14; Wed, 21 Jul 2010 08:51:38 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L8pcba066506; Wed, 21 Jul 2010 08:51:38 GMT (envelope-from ed@svn.freebsd.org) Received: (from ed@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L8pcgw066504; Wed, 21 Jul 2010 08:51:38 GMT (envelope-from ed@svn.freebsd.org) Message-Id: <201007210851.o6L8pcgw066504@svn.freebsd.org> From: Ed Schouten Date: Wed, 21 Jul 2010 08:51:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210323 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 08:51:38 -0000 Author: ed Date: Wed Jul 21 08:51:38 2010 New Revision: 210323 URL: http://svn.freebsd.org/changeset/base/210323 Log: Also link getutxent.3 to utmpx.3. If you run `man utmpx', you expect to get some info on it. Modified: head/lib/libc/gen/Makefile.inc Modified: head/lib/libc/gen/Makefile.inc ============================================================================== --- head/lib/libc/gen/Makefile.inc Wed Jul 21 08:48:45 2010 (r210322) +++ head/lib/libc/gen/Makefile.inc Wed Jul 21 08:51:38 2010 (r210323) @@ -129,7 +129,7 @@ MLINKS+=getusershell.3 endusershell.3 ge MLINKS+=getutxent.3 endutxent.3 getutxent.3 getutxid.3 \ getutxent.3 getutxline.3 getutxent.3 getutxuser.3 \ getutxent.3 pututxline.3 getutxent.3 setutxdb.3 \ - getutxent.3 setutxent.3 + getutxent.3 setutxent.3 getutxent.3 utmpx.3 MLINKS+=glob.3 globfree.3 MLINKS+=isgreater.3 isgreaterequal.3 isgreater.3 isless.3 \ isgreater.3 islessequal.3 isgreater.3 islessgreater.3 \ From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 08:54:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D0A401065677; Wed, 21 Jul 2010 08:54:46 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BF8028FC0A; Wed, 21 Jul 2010 08:54:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L8sklV067230; Wed, 21 Jul 2010 08:54:46 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L8skIl067227; Wed, 21 Jul 2010 08:54:46 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007210854.o6L8skIl067227@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 08:54:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210324 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 08:54:46 -0000 Author: kaiw Date: Wed Jul 21 08:54:46 2010 New Revision: 210324 URL: http://svn.freebsd.org/changeset/base/210324 Log: - Correctly handle sections of type SHT_NOBITS. For these sections: - elf_getdata() and elf_rawdata() should return an "Elf_Data" structure that has its "d_buf" member set to NULL and "d_size" member set to the nominal 'size' of the section. [1] - Update the manual page for these functions. - Fix a memory leak in an error handling path inside elf_getdata(). - Use _libelf_allocate_data() in elf_newdata() for consistency. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/elf_data.c head/lib/libelf/elf_getdata.3 Modified: head/lib/libelf/elf_data.c ============================================================================== --- head/lib/libelf/elf_data.c Wed Jul 21 08:51:38 2010 (r210323) +++ head/lib/libelf/elf_data.c Wed Jul 21 08:54:46 2010 (r210324) @@ -39,7 +39,6 @@ Elf_Data * elf_getdata(Elf_Scn *s, Elf_Data *d) { Elf *e; - char *dst; size_t fsz, msz, count; int elfclass, elftype; unsigned int sh_type; @@ -79,20 +78,22 @@ elf_getdata(Elf_Scn *s, Elf_Data *d) sh_align = s->s_shdr.s_shdr64.sh_addralign; } + if (sh_type == SHT_NULL) + return (NULL); + if ((elftype = _libelf_xlate_shtype(sh_type)) < ELF_T_FIRST || - elftype > ELF_T_LAST || - sh_offset + sh_size > (uint64_t) e->e_rawsize) { + elftype > ELF_T_LAST || (sh_type != SHT_NOBITS && + sh_offset + sh_size > (uint64_t) e->e_rawsize)) { LIBELF_SET_ERROR(SECTION, 0); return (NULL); } - if ((fsz = (elfclass == ELFCLASS32 ? elf32_fsize : elf64_fsize)(elftype, - (size_t) 1, e->e_version)) == 0) { + if ((fsz = (elfclass == ELFCLASS32 ? elf32_fsize : elf64_fsize) + (elftype, (size_t) 1, e->e_version)) == 0) { LIBELF_SET_ERROR(UNIMPL, 0); return (NULL); } - if (sh_size % fsz) { LIBELF_SET_ERROR(SECTION, 0); return (NULL); @@ -104,21 +105,25 @@ elf_getdata(Elf_Scn *s, Elf_Data *d) assert(msz > 0); - if ((dst = malloc(msz*count)) == NULL) { - LIBELF_SET_ERROR(RESOURCE, 0); - return (NULL); - } - if ((d = _libelf_allocate_data(s)) == NULL) return (NULL); - d->d_buf = dst; + d->d_buf = NULL; d->d_off = 0; d->d_align = sh_align; d->d_size = msz * count; d->d_type = elftype; d->d_version = e->e_version; + if (sh_type == SHT_NOBITS) + return (d); + + if ((d->d_buf = malloc(msz*count)) == NULL) { + (void) _libelf_release_data(d); + LIBELF_SET_ERROR(RESOURCE, 0); + return (NULL); + } + d->d_flags |= LIBELF_F_MALLOCED; STAILQ_INSERT_TAIL(&s->s_data, d, d_next); @@ -149,14 +154,10 @@ elf_newdata(Elf_Scn *s) if (elf_getdata(s, NULL) == NULL) return (NULL); - if ((d = malloc(sizeof(Elf_Data))) == NULL) { - LIBELF_SET_ERROR(RESOURCE, errno); + if ((d = _libelf_allocate_data(s)) == NULL) return (NULL); - } STAILQ_INSERT_TAIL(&s->s_data, d, d_next); - d->d_flags = 0; - d->d_scn = s; d->d_align = 1; d->d_buf = NULL; @@ -180,6 +181,7 @@ elf_rawdata(Elf_Scn *s, Elf_Data *d) { Elf *e; int elf_class; + uint32_t sh_type; uint64_t sh_align, sh_offset, sh_size; if (s == NULL || (e = s->s_elf) == NULL || @@ -199,19 +201,24 @@ elf_rawdata(Elf_Scn *s, Elf_Data *d) assert(elf_class == ELFCLASS32 || elf_class == ELFCLASS64); if (elf_class == ELFCLASS32) { + sh_type = s->s_shdr.s_shdr32.sh_type; sh_offset = (uint64_t) s->s_shdr.s_shdr32.sh_offset; sh_size = (uint64_t) s->s_shdr.s_shdr32.sh_size; sh_align = (uint64_t) s->s_shdr.s_shdr32.sh_addralign; } else { + sh_type = s->s_shdr.s_shdr64.sh_type; sh_offset = s->s_shdr.s_shdr64.sh_offset; sh_size = s->s_shdr.s_shdr64.sh_size; sh_align = s->s_shdr.s_shdr64.sh_addralign; } + if (sh_type == SHT_NULL) + return (NULL); + if ((d = _libelf_allocate_data(s)) == NULL) return (NULL); - d->d_buf = e->e_rawfile + sh_offset; + d->d_buf = sh_type == SHT_NOBITS ? NULL : e->e_rawfile + sh_offset; d->d_off = 0; d->d_align = sh_align; d->d_size = sh_size; Modified: head/lib/libelf/elf_getdata.3 ============================================================================== --- head/lib/libelf/elf_getdata.3 Wed Jul 21 08:51:38 2010 (r210323) +++ head/lib/libelf/elf_getdata.3 Wed Jul 21 08:54:46 2010 (r210324) @@ -1,4 +1,4 @@ -.\" Copyright (c) 2006 Joseph Koshy. All rights reserved. +.\" Copyright (c) 2006,2008 Joseph Koshy. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions @@ -142,6 +142,32 @@ always returns .Vt Elf_Data structures of type .Dv ELF_T_BYTE . +.Ss Special handling of SHT_NOBITS sections +For sections of type +.Dv SHT_NOBITS , +the functions +.Fn elf_getdata +and +.Fn elf_rawdata +return a pointer to a valid +.Vt Elf_Data +structure that has its +.Va d_buf +member set to NULL and its +.Va d_size +member set to the size of the section. +.Pp +If an application wishes to create a section of type +.Dv SHT_NOBITS , +it should add a data buffer to the section using function +.Fn elf_newdata . +It should then set the +.Va d_buf +and +.Va d_size +members of the returned +.Vt Elf_Data +structure to NULL and the desired size of the section respectively. .Sh RETURN VALUES These functions return a valid pointer to a data descriptor if successful, or NULL if an error occurs. From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 08:56:08 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABE3E1065675; Wed, 21 Jul 2010 08:56:08 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (lev.vlakno.cz [77.93.215.190]) by mx1.freebsd.org (Postfix) with ESMTP id 61E728FC15; Wed, 21 Jul 2010 08:56:07 +0000 (UTC) Received: from lev.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id EB20D9CB083; Wed, 21 Jul 2010 10:51:17 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by lev.vlakno.cz (lev.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id T0Jv-YfS2A9x; Wed, 21 Jul 2010 10:51:17 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 7EF8A9CB28F; Wed, 21 Jul 2010 10:51:17 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.14.3/8.14.3/Submit) id o6L8pHY9028778; Wed, 21 Jul 2010 10:51:17 +0200 (CEST) (envelope-from rdivacky) Date: Wed, 21 Jul 2010 10:51:17 +0200 From: Roman Divacky To: Kai Wang Message-ID: <20100721085117.GA28722@freebsd.org> References: <201007210854.o6L8skIl067227@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201007210854.o6L8skIl067227@svn.freebsd.org> User-Agent: Mutt/1.4.2.3i Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r210324 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 08:56:08 -0000 On Wed, Jul 21, 2010 at 08:54:46AM +0000, Kai Wang wrote: > Author: kaiw > Date: Wed Jul 21 08:54:46 2010 > New Revision: 210324 > URL: http://svn.freebsd.org/changeset/base/210324 > > Log: > - Correctly handle sections of type SHT_NOBITS. For these sections: > - elf_getdata() and elf_rawdata() should return an "Elf_Data" structure > that has its "d_buf" member set to NULL and "d_size" member set to > the nominal 'size' of the section. [1] > - Update the manual page for these functions. > - Fix a memory leak in an error handling path inside elf_getdata(). > - Use _libelf_allocate_data() in elf_newdata() for consistency. this is the fix that fixes -flto with gcc45? From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 08:58:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CD1A106566C; Wed, 21 Jul 2010 08:58:52 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 52FCB8FC14; Wed, 21 Jul 2010 08:58:52 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L8wqQP068182; Wed, 21 Jul 2010 08:58:52 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L8wqHe068178; Wed, 21 Jul 2010 08:58:52 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007210858.o6L8wqHe068178@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 08:58:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210325 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 08:58:52 -0000 Author: kaiw Date: Wed Jul 21 08:58:52 2010 New Revision: 210325 URL: http://svn.freebsd.org/changeset/base/210325 Log: Bug fix: when updating headers using the gelf_update_*() functions, the appropriate `dirty' bit needs to be set for both the Elf32 and Elf64 case. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/gelf_ehdr.c head/lib/libelf/gelf_phdr.c head/lib/libelf/gelf_shdr.c Modified: head/lib/libelf/gelf_ehdr.c ============================================================================== --- head/lib/libelf/gelf_ehdr.c Wed Jul 21 08:54:46 2010 (r210324) +++ head/lib/libelf/gelf_ehdr.c Wed Jul 21 08:58:52 2010 (r210325) @@ -137,6 +137,8 @@ gelf_update_ehdr(Elf *e, GElf_Ehdr *s) if ((ehdr = _libelf_ehdr(e, ec, 0)) == NULL) return (0); + (void) elf_flagehdr(e, ELF_C_SET, ELF_F_DIRTY); + if (ec == ELFCLASS64) { eh64 = (Elf64_Ehdr *) ehdr; *eh64 = *s; @@ -161,7 +163,5 @@ gelf_update_ehdr(Elf *e, GElf_Ehdr *s) eh32->e_shnum = s->e_shnum; eh32->e_shstrndx = s->e_shstrndx; - (void) elf_flagehdr(e, ELF_C_SET, ELF_F_DIRTY); - return (1); } Modified: head/lib/libelf/gelf_phdr.c ============================================================================== --- head/lib/libelf/gelf_phdr.c Wed Jul 21 08:54:46 2010 (r210324) +++ head/lib/libelf/gelf_phdr.c Wed Jul 21 08:58:52 2010 (r210325) @@ -155,6 +155,8 @@ gelf_update_phdr(Elf *e, int ndx, GElf_P return (0); } + (void) elf_flagphdr(e, ELF_C_SET, ELF_F_DIRTY); + if (ec == ELFCLASS64) { ph64 = e->e_u.e_elf.e_phdr.e_phdr64 + ndx; *ph64 = *s; @@ -172,7 +174,5 @@ gelf_update_phdr(Elf *e, int ndx, GElf_P LIBELF_COPY_U32(ph32, s, p_memsz); LIBELF_COPY_U32(ph32, s, p_align); - (void) elf_flagphdr(e, ELF_C_SET, ELF_F_DIRTY); - return (1); } Modified: head/lib/libelf/gelf_shdr.c ============================================================================== --- head/lib/libelf/gelf_shdr.c Wed Jul 21 08:54:46 2010 (r210324) +++ head/lib/libelf/gelf_shdr.c Wed Jul 21 08:58:52 2010 (r210325) @@ -107,6 +107,8 @@ gelf_update_shdr(Elf_Scn *scn, GElf_Shdr return (0); } + (void) elf_flagscn(scn, ELF_C_SET, ELF_F_DIRTY); + if (ec == ELFCLASS64) { scn->s_shdr.s_shdr64 = *s; return (1); @@ -125,7 +127,5 @@ gelf_update_shdr(Elf_Scn *scn, GElf_Shdr LIBELF_COPY_U32(sh32, s, sh_addralign); LIBELF_COPY_U32(sh32, s, sh_entsize); - (void) elf_flagscn(scn, ELF_C_SET, ELF_F_DIRTY); - return (1); } From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:04:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3761A1065675; Wed, 21 Jul 2010 09:04:59 +0000 (UTC) (envelope-from ivoras@gmail.com) Received: from mail-ww0-f51.google.com (mail-ww0-f51.google.com [74.125.82.51]) by mx1.freebsd.org (Postfix) with ESMTP id 46A348FC1C; Wed, 21 Jul 2010 09:04:57 +0000 (UTC) Received: by wwb22 with SMTP id 22so613483wwb.8 for ; Wed, 21 Jul 2010 02:04:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:mime-version:sender:received :in-reply-to:references:from:date:x-google-sender-auth:message-id :subject:to:cc:content-type:content-transfer-encoding; bh=NKF26/icjuF+uinYRejPl7MeooPmpOfk2+SJ3hsJLLs=; b=AtIf8rxm2CsvWt8TwUqkW8swuJvBicP465sQ6RTnVVwgCBMWGzHGG8Ni1crxEsGQbv 8WhdzFhONr8d0CfdRXBHPsMdFJnGKg4yqv46nGZ+zhz5Vy7Ee/ikQHxO8V8WxMCcLtWP q/7iNKs9Pk5iQqhCDZOT77TBG8utifWp1/pEQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=NrOD+5QCb8WJSz/lbs/QdcmVd7XWeScleFL8Cu4qEErKOVbYGHKJLbed2TeXkS+Uwo haLCM7bI3rabunCf6EakoSukIhxmYu5GPY51h/6QGhPB2/ZgEVc73zGffDynAFvKgMs0 jp4r/hbnjMF4C2FjLExB8yAPUyVd5LsF3kiQ8= Received: by 10.216.145.99 with SMTP id o77mr6443268wej.113.1279703097118; Wed, 21 Jul 2010 02:04:57 -0700 (PDT) MIME-Version: 1.0 Sender: ivoras@gmail.com Received: by 10.216.87.206 with HTTP; Wed, 21 Jul 2010 02:04:37 -0700 (PDT) In-Reply-To: <20100721134319.E7228@delplex.bde.org> References: <201007181015.o6IAFXvK018739@svn.freebsd.org> <201007190829.21995.jhb@freebsd.org> <20100721134319.E7228@delplex.bde.org> From: Ivan Voras Date: Wed, 21 Jul 2010 11:04:37 +0200 X-Google-Sender-Auth: GxH2EOCxwPk7RNzTKM0rjVjrFHM Message-ID: To: Bruce Evans Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin Subject: Re: svn commit: r210217 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:04:59 -0000 On 21 July 2010 06:18, Bruce Evans wrote: > On Mon, 19 Jul 2010, John Baldwin wrote: > >>> Log: >>> =C2=A0In keeping with the Age-of-the-fruitbat theme, scale up hirunning= space >>> on >>> =C2=A0machines which can clearly afford the memory. >>> >>> =C2=A0This is a somewhat conservative version of the patch - more fine = tuning >>> may be >>> =C2=A0necessary. >>> >>> =C2=A0Idea from: Thread on hackers@ >>> =C2=A0Discussed with: alc > > Sorry I didn't look at the thread, but I wonder if you should increase > lorunningspace similarly. The previous ratio of lorunningspace to hirunningspace was 1/2 - is this still a good target? > There is a possibly related problem with writing through file systems to > high-latency disk devices like dvds. =C2=A0getblk() often takes many seco= nds, > and occasionally takes a couple of _minutes_. =C2=A0dvd's aren't quite th= at > slow, and can easily write hirunningspace =3D 1MB in 1 second, except > possibly if the file system is not designed for high-latency devices > (like most including cd9660 and udf are :-() so it does lots of random > i/o). > > The above is mostly for 1 active file system... It does seem like there would be more benefitial to hang these variables per mount-point or something similar but I'm content that they are tunable and that the new values help high-end machines, probably in cooperation with tagged (NCQ-like) IO. >> Presumably you could use 'lmax(lmin(..., 16 * 1024 * 1024), 1024 * >> 1024))'? > > Better. > Normal formatting is sometimes broken to avoid lines longer than 80 > characters. =C2=A0This works here. =C2=A0I don't like this. Yes, this was the reason for the original patch's formatting :) From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:05:52 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64989106564A; Wed, 21 Jul 2010 09:05:52 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 5F2A68FC25; Wed, 21 Jul 2010 09:05:51 +0000 (UTC) Received: by eyh6 with SMTP id 6so1780638eyh.13 for ; Wed, 21 Jul 2010 02:05:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=5VSiORzxeNTua39ZGUjvq7fecBmQbmtuXgBk9gX/hos=; b=dxciV3IKBByPbdRlkT5NUcq5bborEhoHb/qoU7JOtfYUgHj+H4P4Yo7lINuEMiUDwa zldMEO5InQdOGLoVVi6uZ7sRY0HdQ1CiSsA7Nqp2dx5bgRKUkn7MWscZS0Us3q2Bc1GT JXdGnawP4bpOML8izh1fRbPl61o3cgUzc2hwo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; b=UO9KerSCi9alCYHbZQ+DQHpxGcxpE1rLiBi7QQFgvTnz7grRid7JYvk4cwv/JvubIg M0g1CDCAYFwGW9SF1/OFTPJR4P5hyOhSyFWe4j12PFWUvKFWMQAaDwBY5mj8JkqWQBTT WKmMVf6FrjiHX/05IOqNux4Tr+Ebt0YMkQkJs= Received: by 10.213.17.7 with SMTP id q7mr5850035eba.2.1279703150200; Wed, 21 Jul 2010 02:05:50 -0700 (PDT) Received: from localhost (81-233-38-26-no36.tbcn.telia.com [81.233.38.26]) by mx.google.com with ESMTPS id v8sm53053416eeh.8.2010.07.21.02.05.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 21 Jul 2010 02:05:49 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=localhost.my.domain) by localhost with esmtp (Exim 4.71 (FreeBSD)) (envelope-from ) id 1ObVFL-00014b-RU; Wed, 21 Jul 2010 11:05:47 +0200 Received: (from kaiw@localhost) by localhost.my.domain (8.14.3/8.14.3/Submit) id o6L95lYI004128; Wed, 21 Jul 2010 11:05:47 +0200 (CEST) (envelope-from kaiwang27@gmail.com) X-Authentication-Warning: localhost.my.domain: kaiw set sender to kaiwang27@gmail.com using -f Date: Wed, 21 Jul 2010 11:05:47 +0200 From: Kai Wang To: Roman Divacky Message-ID: <20100721090547.GA2532@viskning> References: <201007210854.o6L8skIl067227@svn.freebsd.org> <20100721085117.GA28722@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20100721085117.GA28722@freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r210324 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:05:52 -0000 On Wed, Jul 21, 2010 at 10:51:17AM +0200, Roman Divacky wrote: > On Wed, Jul 21, 2010 at 08:54:46AM +0000, Kai Wang wrote: > > Author: kaiw > > Date: Wed Jul 21 08:54:46 2010 > > New Revision: 210324 > > URL: http://svn.freebsd.org/changeset/base/210324 > > > > Log: > > - Correctly handle sections of type SHT_NOBITS. For these sections: > > - elf_getdata() and elf_rawdata() should return an "Elf_Data" structure > > that has its "d_buf" member set to NULL and "d_size" member set to > > the nominal 'size' of the section. [1] > > - Update the manual page for these functions. > > - Fix a memory leak in an error handling path inside elf_getdata(). > > - Use _libelf_allocate_data() in elf_newdata() for consistency. > > this is the fix that fixes -flto with gcc45? No. This fixes is irrelevant to gcc LTO. Actually, this partially fixed the empty section problem reported by kan@. I'll write you and kan@ a private mail about kan@'s patch later. Kai From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:06:23 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id E2FFF1065674; Wed, 21 Jul 2010 09:06:23 +0000 (UTC) Date: Wed, 21 Jul 2010 09:06:23 +0000 From: Alexey Dokuchaev To: Kai Wang Message-ID: <20100721090623.GA21607@FreeBSD.org> References: <201007210843.o6L8hmo5064622@svn.freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201007210843.o6L8hmo5064622@svn.freebsd.org> User-Agent: Mutt/1.4.2.1i Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210321 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:06:24 -0000 On Wed, Jul 21, 2010 at 08:43:48AM +0000, Kai Wang wrote: > Author: kaiw > Date: Wed Jul 21 08:43:48 2010 > New Revision: 210321 > URL: http://svn.freebsd.org/changeset/base/210321 > > Log: > Remove a superfluous comment. > > Obtained from: elftoolchain > MFC after: 1 month (Just picking random of the similar commits): guys, please, try to uniformly align commit meta tags: Obtained from: somewhere MFC after: sometime Foo bar: baz qux ... Broken alignment considerably pessimizes commit log grasping, as it requires more post-processing work after reading it off. Thanks. ./danfe From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:12:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6A84F106566C; Wed, 21 Jul 2010 09:12:10 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from mx0.hoeg.nl (unknown [IPv6:2a01:4f8:101:5343::aa]) by mx1.freebsd.org (Postfix) with ESMTP id 030228FC1B; Wed, 21 Jul 2010 09:12:10 +0000 (UTC) Received: by mx0.hoeg.nl (Postfix, from userid 1000) id D685B2A2A8D6; Wed, 21 Jul 2010 11:12:08 +0200 (CEST) Date: Wed, 21 Jul 2010 11:12:08 +0200 From: Ed Schouten To: Alexey Dokuchaev Message-ID: <20100721091208.GG1742@hoeg.nl> References: <201007210843.o6L8hmo5064622@svn.freebsd.org> <20100721090623.GA21607@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gi8aKAu241S2WqNd" Content-Disposition: inline In-Reply-To: <20100721090623.GA21607@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Kai Wang Subject: Re: svn commit: r210321 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:12:10 -0000 --gi8aKAu241S2WqNd Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Alexey Dokuchaev wrote: > (Just picking random of the similar commits): guys, please, try to > uniformly align commit meta tags: I guess it was aligned properly using tabs, but the whitespace added to the beginning of the line causes it to jump one tab forward. --=20 Ed Schouten WWW: http://80386.nl/ --gi8aKAu241S2WqNd Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.15 (FreeBSD) iEYEARECAAYFAkxGuegACgkQ52SDGA2eCwXiAACfSNA2LLmzhITka9Wjihh3Hpmy Wq8AnjYvB/yI5MhOieVDp/51SDeluA/K =UrdG -----END PGP SIGNATURE----- --gi8aKAu241S2WqNd-- From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:14:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 94BDD1065676; Wed, 21 Jul 2010 09:14:37 +0000 (UTC) (envelope-from kaiwang27@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 9824D8FC1B; Wed, 21 Jul 2010 09:14:36 +0000 (UTC) Received: by eyh6 with SMTP id 6so1782797eyh.13 for ; Wed, 21 Jul 2010 02:14:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:received :x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=M18prd2HYoyMRPzPry5r6p3u336YhbglLxxYEtz+8Ik=; b=dsE/XI5G1dBFxWuhrwlgxHpi6rfziH1V/jSvZCgrmpTBvvc47eNGWqPLG7l1prT7iG 5NyRorDfLGgP9JsYkWjDK9/rPsG1PXPUn4hG77M1BAj1CK0S/1rGaAdFXoNd86lZynX9 UL7g2OYdIk/8OKXR3mNoar0Wsjrr9KrbmJboU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=x-authentication-warning:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; b=TCXyKH0wiaJWyv7Ni7bTmF3dnzZrfz1Z4DKvAUh4DR0OjqmAnTujV0EB67P83u5L5a Ku74ArHeOYr44w7Ujy4Pmfo8QnUwvnACw734HA1ARMLWfMLhX0dXZki+tHTKvYsKKZCU CsHxhrxoybDneEIUAI6LXB9fUEVqtZ7lVbx/8= Received: by 10.213.30.15 with SMTP id s15mr5919746ebc.56.1279703675664; Wed, 21 Jul 2010 02:14:35 -0700 (PDT) Received: from localhost (81-233-38-26-no36.tbcn.telia.com [81.233.38.26]) by mx.google.com with ESMTPS id v8sm53092295eeh.2.2010.07.21.02.14.34 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 21 Jul 2010 02:14:34 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=localhost.my.domain) by localhost with esmtp (Exim 4.71 (FreeBSD)) (envelope-from ) id 1ObVNp-00015I-Jx; Wed, 21 Jul 2010 11:14:33 +0200 Received: (from kaiw@localhost) by localhost.my.domain (8.14.3/8.14.3/Submit) id o6L9EXa7004171; Wed, 21 Jul 2010 11:14:33 +0200 (CEST) (envelope-from kaiwang27@gmail.com) X-Authentication-Warning: localhost.my.domain: kaiw set sender to kaiwang27@gmail.com using -f Date: Wed, 21 Jul 2010 11:14:33 +0200 From: Kai Wang To: Alexey Dokuchaev Message-ID: <20100721091433.GB2532@viskning> References: <201007210843.o6L8hmo5064622@svn.freebsd.org> <20100721090623.GA21607@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20100721090623.GA21607@FreeBSD.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r210321 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:14:37 -0000 On Wed, Jul 21, 2010 at 09:06:23AM +0000, Alexey Dokuchaev wrote: > On Wed, Jul 21, 2010 at 08:43:48AM +0000, Kai Wang wrote: > > Author: kaiw > > Date: Wed Jul 21 08:43:48 2010 > > New Revision: 210321 > > URL: http://svn.freebsd.org/changeset/base/210321 > > > > Log: > > Remove a superfluous comment. > > > > Obtained from: elftoolchain > > MFC after: 1 month > > (Just picking random of the similar commits): guys, please, try to > uniformly align commit meta tags: > > Obtained from: somewhere > MFC after: sometime > Foo bar: baz qux ... > > Broken alignment considerably pessimizes commit log grasping, as it > requires more post-processing work after reading it off. My bad for this one... I actually aligned it in editor at first. However, since I was using hard tabs and commit log prepends two spaces for each line, the resulted commit log became unaligned... Kai From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:20:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AE321065674; Wed, 21 Jul 2010 09:20:41 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0A72B8FC18; Wed, 21 Jul 2010 09:20:41 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L9Ketc073153; Wed, 21 Jul 2010 09:20:40 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L9KeQ1073151; Wed, 21 Jul 2010 09:20:40 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007210920.o6L9KeQ1073151@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 09:20:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210326 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:20:41 -0000 Author: kaiw Date: Wed Jul 21 09:20:40 2010 New Revision: 210326 URL: http://svn.freebsd.org/changeset/base/210326 Log: Improve compatibility with other implementations of the ELF(3) API: when an output file has no program headers, set the 'e_phentsize' field of the ELF executable header to zero. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/elf_update.c Modified: head/lib/libelf/elf_update.c ============================================================================== --- head/lib/libelf/elf_update.c Wed Jul 21 08:58:52 2010 (r210325) +++ head/lib/libelf/elf_update.c Wed Jul 21 09:20:40 2010 (r210326) @@ -422,8 +422,8 @@ _libelf_resync_elf(Elf *e) (E)->e_ident[EI_VERSION] = (V); \ (E)->e_ehsize = _libelf_fsize(ELF_T_EHDR, (EC), (V), \ (size_t) 1); \ - (E)->e_phentsize = _libelf_fsize(ELF_T_PHDR, (EC), (V), \ - (size_t) 1); \ + (E)->e_phentsize = (phnum == 0) ? 0 : _libelf_fsize( \ + ELF_T_PHDR, (EC), (V), (size_t) 1); \ (E)->e_shentsize = _libelf_fsize(ELF_T_SHDR, (EC), (V), \ (size_t) 1); \ } while (0) From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:27:00 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9F61B106566C; Wed, 21 Jul 2010 09:27:00 +0000 (UTC) (envelope-from jchandra@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CE598FC15; Wed, 21 Jul 2010 09:27:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L9R0Zo074585; Wed, 21 Jul 2010 09:27:00 GMT (envelope-from jchandra@svn.freebsd.org) Received: (from jchandra@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L9R07L074578; Wed, 21 Jul 2010 09:27:00 GMT (envelope-from jchandra@svn.freebsd.org) Message-Id: <201007210927.o6L9R07L074578@svn.freebsd.org> From: "Jayachandran C." Date: Wed, 21 Jul 2010 09:27:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210327 - in head/sys: mips/include mips/mips vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:27:00 -0000 Author: jchandra Date: Wed Jul 21 09:27:00 2010 New Revision: 210327 URL: http://svn.freebsd.org/changeset/base/210327 Log: Redo the page table page allocation on MIPS, as suggested by alc@. The UMA zone based allocation is replaced by a scheme that creates a new free page list for the KSEG0 region, and a new function in sys/vm that allocates pages from a specific free page list. This also fixes a race condition introduced by the UMA based page table page allocation code. Dropping the page queue and pmap locks before the call to uma_zfree, and re-acquiring them afterwards will introduce a race condtion(noted by alc@). The changes are : - Revert the earlier changes in MIPS pmap.c that added UMA zone for page table pages. - Add a new freelist VM_FREELIST_HIGHMEM to MIPS vmparam.h for memory that is not directly mapped (in 32bit kernel). Normal page allocations will first try the HIGHMEM freelist and then the default(direct mapped) freelist. - Add a new function 'vm_page_t vm_page_alloc_freelist(int flind, int order, int req)' to vm/vm_page.c to allocate a page from a specified freelist. The MIPS page table pages will be allocated using this function from the freelist containing direct mapped pages. - Move the page initialization code from vm_phys_alloc_contig() to a new function vm_page_alloc_init(), and use this function to initialize pages in vm_page_alloc_freelist() too. - Split the function vm_phys_alloc_pages(int pool, int order) to create vm_phys_alloc_freelist_pages(int flind, int pool, int order), and use this function from both vm_page_alloc_freelist() and vm_phys_alloc_pages(). Reviewed by: alc Modified: head/sys/mips/include/vmparam.h head/sys/mips/mips/pmap.c head/sys/vm/vm_page.c head/sys/vm/vm_page.h head/sys/vm/vm_phys.c head/sys/vm/vm_phys.h Modified: head/sys/mips/include/vmparam.h ============================================================================== --- head/sys/mips/include/vmparam.h Wed Jul 21 09:20:40 2010 (r210326) +++ head/sys/mips/include/vmparam.h Wed Jul 21 09:27:00 2010 (r210327) @@ -125,7 +125,6 @@ #define VM_NRESERVLEVEL 0 #endif - /* virtual sizes (bytes) for various kernel submaps */ #ifndef VM_KMEM_SIZE #define VM_KMEM_SIZE (12 * 1024 * 1024) @@ -174,13 +173,24 @@ #define VM_FREEPOOL_DIRECT 1 /* - * we support 1 free list: + * we support 2 free lists: * - * - DEFAULT for all systems + * - DEFAULT for direct mapped (KSEG0) pages. + * Note: This usage of DEFAULT may be misleading because we use + * DEFAULT for allocating direct mapped pages. The normal page + * allocations use HIGHMEM if available, and then DEFAULT. + * - HIGHMEM for other pages */ - +#ifdef __mips_n64 #define VM_NFREELIST 1 #define VM_FREELIST_DEFAULT 0 +#else +#define VM_NFREELIST 2 +#define VM_FREELIST_DEFAULT 1 +#define VM_FREELIST_HIGHMEM 0 +#define VM_FREELIST_DIRECT VM_FREELIST_DEFAULT +#define VM_HIGHMEM_ADDRESS ((vm_paddr_t)0x20000000) +#endif /* * The largest allocation size is 1MB. Modified: head/sys/mips/mips/pmap.c ============================================================================== --- head/sys/mips/mips/pmap.c Wed Jul 21 09:20:40 2010 (r210326) +++ head/sys/mips/mips/pmap.c Wed Jul 21 09:27:00 2010 (r210327) @@ -187,8 +187,8 @@ static vm_page_t pmap_allocpte(pmap_t pm static vm_page_t _pmap_allocpte(pmap_t pmap, unsigned ptepindex, int flags); static int pmap_unuse_pt(pmap_t, vm_offset_t, vm_page_t); static int init_pte_prot(vm_offset_t va, vm_page_t m, vm_prot_t prot); -static vm_page_t pmap_alloc_pte_page(pmap_t, unsigned int, int, vm_offset_t *); -static void pmap_release_pte_page(vm_page_t); +static vm_page_t pmap_alloc_pte_page(unsigned int index, int req); +static void pmap_grow_pte_page_cache(void); #ifdef SMP static void pmap_invalidate_page_action(void *arg); @@ -196,10 +196,6 @@ static void pmap_invalidate_all_action(v static void pmap_update_page_action(void *arg); #endif -static void pmap_ptpgzone_dtor(void *mem, int size, void *arg); -static void *pmap_ptpgzone_allocf(uma_zone_t, int, u_int8_t *, int); -static uma_zone_t ptpgzone; - #if !defined(__mips_n64) struct local_sysmaps { vm_offset_t base; @@ -539,10 +535,6 @@ pmap_init(void) pv_entry_max = PMAP_SHPGPERPROC * maxproc + cnt.v_page_count; pv_entry_high_water = 9 * (pv_entry_max / 10); uma_zone_set_obj(pvzone, &pvzone_obj, pv_entry_max); - - ptpgzone = uma_zcreate("PT ENTRY", PAGE_SIZE, NULL, pmap_ptpgzone_dtor, - NULL, NULL, PAGE_SIZE - 1, UMA_ZONE_NOFREE | UMA_ZONE_ZINIT); - uma_zone_set_allocf(ptpgzone, pmap_ptpgzone_allocf); } /*************************************************** @@ -882,12 +874,8 @@ _pmap_unwire_pte_hold(pmap_t pmap, vm_pa /* * If the page is finally unwired, simply free it. */ + vm_page_free_zero(m); atomic_subtract_int(&cnt.v_wire_count, 1); - PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); - pmap_release_pte_page(m); - vm_page_lock_queues(); - PMAP_LOCK(pmap); return (1); } @@ -947,95 +935,30 @@ pmap_pinit0(pmap_t pmap) } static void -pmap_ptpgzone_dtor(void *mem, int size, void *arg) +pmap_grow_pte_page_cache() { -#ifdef INVARIANTS - static char zeropage[PAGE_SIZE]; - KASSERT(size == PAGE_SIZE, - ("pmap_ptpgzone_dtor: invalid size %d", size)); - KASSERT(bcmp(mem, zeropage, PAGE_SIZE) == 0, - ("pmap_ptpgzone_dtor: freeing a non-zeroed page")); -#endif + vm_contig_grow_cache(3, 0, MIPS_KSEG0_LARGEST_PHYS); } -static void * -pmap_ptpgzone_allocf(uma_zone_t zone, int bytes, u_int8_t *flags, int wait) -{ - vm_page_t m; - vm_paddr_t paddr; - int tries; - - KASSERT(bytes == PAGE_SIZE, - ("pmap_ptpgzone_allocf: invalid allocation size %d", bytes)); - - *flags = UMA_SLAB_PRIV; - tries = 0; -retry: - m = vm_phys_alloc_contig(1, 0, MIPS_KSEG0_LARGEST_PHYS, - PAGE_SIZE, PAGE_SIZE); - if (m == NULL) { - if (tries < ((wait & M_NOWAIT) != 0 ? 1 : 3)) { - vm_contig_grow_cache(tries, 0, MIPS_KSEG0_LARGEST_PHYS); - tries++; - goto retry; - } else - return (NULL); - } - - paddr = VM_PAGE_TO_PHYS(m); - return ((void *)MIPS_PHYS_TO_KSEG0(paddr)); -} - static vm_page_t -pmap_alloc_pte_page(pmap_t pmap, unsigned int index, int wait, vm_offset_t *vap) +pmap_alloc_pte_page(unsigned int index, int req) { - vm_paddr_t paddr; - void *va; vm_page_t m; - int locked; - locked = mtx_owned(&pmap->pm_mtx); - if (locked) { - mtx_assert(&vm_page_queue_mtx, MA_OWNED); - PMAP_UNLOCK(pmap); - vm_page_unlock_queues(); - } - va = uma_zalloc(ptpgzone, wait); - if (locked) { - vm_page_lock_queues(); - PMAP_LOCK(pmap); - } - if (va == NULL) + m = vm_page_alloc_freelist(VM_FREELIST_DIRECT, 0, req); + if (m == NULL) return (NULL); - paddr = MIPS_KSEG0_TO_PHYS(va); - m = PHYS_TO_VM_PAGE(paddr); - - if (!locked) - vm_page_lock_queues(); - m->pindex = index; - m->valid = VM_PAGE_BITS_ALL; - m->wire_count = 1; - if (!locked) - vm_page_unlock_queues(); + if ((m->flags & PG_ZERO) == 0) + pmap_zero_page(m); + m->pindex = index; atomic_add_int(&cnt.v_wire_count, 1); - *vap = (vm_offset_t)va; + m->wire_count = 1; return (m); } -static void -pmap_release_pte_page(vm_page_t m) -{ - void *va; - vm_paddr_t paddr; - - paddr = VM_PAGE_TO_PHYS(m); - va = (void *)MIPS_PHYS_TO_KSEG0(paddr); - uma_zfree(ptpgzone, va); -} - /* * Initialize a preallocated and zeroed pmap structure, * such as one in a vmspace structure. @@ -1052,10 +975,10 @@ pmap_pinit(pmap_t pmap) /* * allocate the page directory page */ - ptdpg = pmap_alloc_pte_page(pmap, NUSERPGTBLS, M_WAITOK, &ptdva); - if (ptdpg == NULL) - return (0); + while ((ptdpg = pmap_alloc_pte_page(NUSERPGTBLS, VM_ALLOC_NORMAL)) == NULL) + pmap_grow_pte_page_cache(); + ptdva = MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(ptdpg)); pmap->pm_segtab = (pd_entry_t *)ptdva; pmap->pm_active = 0; pmap->pm_ptphint = NULL; @@ -1086,15 +1009,28 @@ _pmap_allocpte(pmap_t pmap, unsigned pte /* * Find or fabricate a new pagetable page */ - m = pmap_alloc_pte_page(pmap, ptepindex, flags, &pteva); - if (m == NULL) + if ((m = pmap_alloc_pte_page(ptepindex, VM_ALLOC_NORMAL)) == NULL) { + if (flags & M_WAITOK) { + PMAP_UNLOCK(pmap); + vm_page_unlock_queues(); + pmap_grow_pte_page_cache(); + vm_page_lock_queues(); + PMAP_LOCK(pmap); + } + + /* + * Indicate the need to retry. While waiting, the page + * table page may have been allocated. + */ return (NULL); + } /* * Map the pagetable page into the process address space, if it * isn't already there. */ + pteva = MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(m)); pmap->pm_stats.resident_count++; pmap->pm_segtab[ptepindex] = (pd_entry_t)pteva; @@ -1190,7 +1126,7 @@ pmap_release(pmap_t pmap) ptdpg->wire_count--; atomic_subtract_int(&cnt.v_wire_count, 1); - pmap_release_pte_page(ptdpg); + vm_page_free_zero(ptdpg); PMAP_LOCK_DESTROY(pmap); } @@ -1200,7 +1136,6 @@ pmap_release(pmap_t pmap) void pmap_growkernel(vm_offset_t addr) { - vm_offset_t pageva; vm_page_t nkpg; pt_entry_t *pte; int i; @@ -1235,14 +1170,13 @@ pmap_growkernel(vm_offset_t addr) /* * This index is bogus, but out of the way */ - nkpg = pmap_alloc_pte_page(kernel_pmap, nkpt, M_NOWAIT, &pageva); - + nkpg = pmap_alloc_pte_page(nkpt, VM_ALLOC_INTERRUPT); if (!nkpg) panic("pmap_growkernel: no memory to grow kernel"); nkpt++; - pte = (pt_entry_t *)pageva; - segtab_pde(kernel_segmap, kernel_vm_end) = pte; + pte = (pt_entry_t *)MIPS_PHYS_TO_KSEG0(VM_PAGE_TO_PHYS(nkpg)); + segtab_pde(kernel_segmap, kernel_vm_end) = (pd_entry_t)pte; /* * The R[4-7]?00 stores only one copy of the Global bit in Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Wed Jul 21 09:20:40 2010 (r210326) +++ head/sys/vm/vm_page.c Wed Jul 21 09:27:00 2010 (r210327) @@ -1355,6 +1355,95 @@ vm_page_alloc(vm_object_t object, vm_pin } /* + * Initialize a page that has been freshly dequeued from a freelist. + * The caller has to drop the vnode returned, if it is not NULL. + * + * To be called with vm_page_queue_free_mtx held. + */ +struct vnode * +vm_page_alloc_init(vm_page_t m) +{ + struct vnode *drop; + vm_object_t m_object; + + KASSERT(m->queue == PQ_NONE, + ("vm_page_alloc_init: page %p has unexpected queue %d", + m, m->queue)); + KASSERT(m->wire_count == 0, + ("vm_page_alloc_init: page %p is wired", m)); + KASSERT(m->hold_count == 0, + ("vm_page_alloc_init: page %p is held", m)); + KASSERT(m->busy == 0, + ("vm_page_alloc_init: page %p is busy", m)); + KASSERT(m->dirty == 0, + ("vm_page_alloc_init: page %p is dirty", m)); + KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT, + ("vm_page_alloc_init: page %p has unexpected memattr %d", + m, pmap_page_get_memattr(m))); + mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); + drop = NULL; + if ((m->flags & PG_CACHED) != 0) { + m->valid = 0; + m_object = m->object; + vm_page_cache_remove(m); + if (m_object->type == OBJT_VNODE && + m_object->cache == NULL) + drop = m_object->handle; + } else { + KASSERT(VM_PAGE_IS_FREE(m), + ("vm_page_alloc_init: page %p is not free", m)); + KASSERT(m->valid == 0, + ("vm_page_alloc_init: free page %p is valid", m)); + cnt.v_free_count--; + } + if (m->flags & PG_ZERO) + vm_page_zero_count--; + /* Don't clear the PG_ZERO flag; we'll need it later. */ + m->flags = PG_UNMANAGED | (m->flags & PG_ZERO); + m->oflags = 0; + /* Unmanaged pages don't use "act_count". */ + return (drop); +} + +/* + * vm_page_alloc_freelist: + * + * Allocate a page from the specified freelist with specified order. + * Only the ALLOC_CLASS values in req are honored, other request flags + * are ignored. + */ +vm_page_t +vm_page_alloc_freelist(int flind, int order, int req) +{ + struct vnode *drop; + vm_page_t m; + int page_req; + + m = NULL; + page_req = req & VM_ALLOC_CLASS_MASK; + mtx_lock(&vm_page_queue_free_mtx); + /* + * Do not allocate reserved pages unless the req has asked for it. + */ + if (cnt.v_free_count + cnt.v_cache_count > cnt.v_free_reserved || + (page_req == VM_ALLOC_SYSTEM && + cnt.v_free_count + cnt.v_cache_count > cnt.v_interrupt_free_min) || + (page_req == VM_ALLOC_INTERRUPT && + cnt.v_free_count + cnt.v_cache_count > 0)) { + m = vm_phys_alloc_freelist_pages(flind, VM_FREEPOOL_DIRECT, order); + } + if (m == NULL) { + mtx_unlock(&vm_page_queue_free_mtx); + return (NULL); + } + drop = vm_page_alloc_init(m); + mtx_unlock(&vm_page_queue_free_mtx); + if (drop) + vdrop(drop); + return (m); +} + +/* * vm_wait: (also see VM_WAIT macro) * * Block until free pages are available for allocation Modified: head/sys/vm/vm_page.h ============================================================================== --- head/sys/vm/vm_page.h Wed Jul 21 09:20:40 2010 (r210326) +++ head/sys/vm/vm_page.h Wed Jul 21 09:27:00 2010 (r210327) @@ -262,6 +262,7 @@ extern struct vpglocks pa_lock[]; * */ +struct vnode; extern int vm_page_zero_count; extern vm_page_t vm_page_array; /* First resident page in table */ @@ -339,6 +340,8 @@ void vm_pageq_remove(vm_page_t m); void vm_page_activate (vm_page_t); vm_page_t vm_page_alloc (vm_object_t, vm_pindex_t, int); +vm_page_t vm_page_alloc_freelist(int, int, int); +struct vnode *vm_page_alloc_init(vm_page_t); vm_page_t vm_page_grab (vm_object_t, vm_pindex_t, int); void vm_page_cache(vm_page_t); void vm_page_cache_free(vm_object_t, vm_pindex_t, vm_pindex_t); Modified: head/sys/vm/vm_phys.c ============================================================================== --- head/sys/vm/vm_phys.c Wed Jul 21 09:20:40 2010 (r210326) +++ head/sys/vm/vm_phys.c Wed Jul 21 09:27:00 2010 (r210327) @@ -301,49 +301,67 @@ vm_phys_add_page(vm_paddr_t pa) vm_page_t vm_phys_alloc_pages(int pool, int order) { + vm_page_t m; + int flind; + + for (flind = 0; flind < vm_nfreelists; flind++) { + m = vm_phys_alloc_freelist_pages(flind, pool, order); + if (m != NULL) + return (m); + } + return (NULL); +} + +/* + * Find and dequeue a free page on the given free list, with the + * specified pool and order + */ +vm_page_t +vm_phys_alloc_freelist_pages(int flind, int pool, int order) +{ struct vm_freelist *fl; struct vm_freelist *alt; - int flind, oind, pind; + int oind, pind; vm_page_t m; + KASSERT(flind < VM_NFREELIST, + ("vm_phys_alloc_freelist_pages: freelist %d is out of range", flind)); KASSERT(pool < VM_NFREEPOOL, - ("vm_phys_alloc_pages: pool %d is out of range", pool)); + ("vm_phys_alloc_freelist_pages: pool %d is out of range", pool)); KASSERT(order < VM_NFREEORDER, - ("vm_phys_alloc_pages: order %d is out of range", order)); + ("vm_phys_alloc_freelist_pages: order %d is out of range", order)); mtx_assert(&vm_page_queue_free_mtx, MA_OWNED); - for (flind = 0; flind < vm_nfreelists; flind++) { - fl = vm_phys_free_queues[flind][pool]; - for (oind = order; oind < VM_NFREEORDER; oind++) { - m = TAILQ_FIRST(&fl[oind].pl); + fl = vm_phys_free_queues[flind][pool]; + for (oind = order; oind < VM_NFREEORDER; oind++) { + m = TAILQ_FIRST(&fl[oind].pl); + if (m != NULL) { + TAILQ_REMOVE(&fl[oind].pl, m, pageq); + fl[oind].lcnt--; + m->order = VM_NFREEORDER; + vm_phys_split_pages(m, oind, fl, order); + return (m); + } + } + + /* + * The given pool was empty. Find the largest + * contiguous, power-of-two-sized set of pages in any + * pool. Transfer these pages to the given pool, and + * use them to satisfy the allocation. + */ + for (oind = VM_NFREEORDER - 1; oind >= order; oind--) { + for (pind = 0; pind < VM_NFREEPOOL; pind++) { + alt = vm_phys_free_queues[flind][pind]; + m = TAILQ_FIRST(&alt[oind].pl); if (m != NULL) { - TAILQ_REMOVE(&fl[oind].pl, m, pageq); - fl[oind].lcnt--; + TAILQ_REMOVE(&alt[oind].pl, m, pageq); + alt[oind].lcnt--; m->order = VM_NFREEORDER; + vm_phys_set_pool(pool, m, oind); vm_phys_split_pages(m, oind, fl, order); return (m); } } - - /* - * The given pool was empty. Find the largest - * contiguous, power-of-two-sized set of pages in any - * pool. Transfer these pages to the given pool, and - * use them to satisfy the allocation. - */ - for (oind = VM_NFREEORDER - 1; oind >= order; oind--) { - for (pind = 0; pind < VM_NFREEPOOL; pind++) { - alt = vm_phys_free_queues[flind][pind]; - m = TAILQ_FIRST(&alt[oind].pl); - if (m != NULL) { - TAILQ_REMOVE(&alt[oind].pl, m, pageq); - alt[oind].lcnt--; - m->order = VM_NFREEORDER; - vm_phys_set_pool(pool, m, oind); - vm_phys_split_pages(m, oind, fl, order); - return (m); - } - } - } } return (NULL); } @@ -592,7 +610,7 @@ vm_phys_alloc_contig(unsigned long npage { struct vm_freelist *fl; struct vm_phys_seg *seg; - vm_object_t m_object; + struct vnode *vp; vm_paddr_t pa, pa_last, size; vm_page_t deferred_vdrop_list, m, m_ret; int flind, i, oind, order, pind; @@ -687,50 +705,19 @@ done: vm_phys_split_pages(m_ret, oind, fl, order); for (i = 0; i < npages; i++) { m = &m_ret[i]; - KASSERT(m->queue == PQ_NONE, - ("vm_phys_alloc_contig: page %p has unexpected queue %d", - m, m->queue)); - KASSERT(m->wire_count == 0, - ("vm_phys_alloc_contig: page %p is wired", m)); - KASSERT(m->hold_count == 0, - ("vm_phys_alloc_contig: page %p is held", m)); - KASSERT(m->busy == 0, - ("vm_phys_alloc_contig: page %p is busy", m)); - KASSERT(m->dirty == 0, - ("vm_phys_alloc_contig: page %p is dirty", m)); - KASSERT(pmap_page_get_memattr(m) == VM_MEMATTR_DEFAULT, - ("vm_phys_alloc_contig: page %p has unexpected memattr %d", - m, pmap_page_get_memattr(m))); - if ((m->flags & PG_CACHED) != 0) { - m->valid = 0; - m_object = m->object; - vm_page_cache_remove(m); - if (m_object->type == OBJT_VNODE && - m_object->cache == NULL) { - /* - * Enqueue the vnode for deferred vdrop(). - * - * Unmanaged pages don't use "pageq", so it - * can be safely abused to construct a short- - * lived queue of vnodes. - */ - m->pageq.tqe_prev = m_object->handle; - m->pageq.tqe_next = deferred_vdrop_list; - deferred_vdrop_list = m; - } - } else { - KASSERT(VM_PAGE_IS_FREE(m), - ("vm_phys_alloc_contig: page %p is not free", m)); - KASSERT(m->valid == 0, - ("vm_phys_alloc_contig: free page %p is valid", m)); - cnt.v_free_count--; + vp = vm_page_alloc_init(m); + if (vp != NULL) { + /* + * Enqueue the vnode for deferred vdrop(). + * + * Unmanaged pages don't use "pageq", so it + * can be safely abused to construct a short- + * lived queue of vnodes. + */ + m->pageq.tqe_prev = (void *)vp; + m->pageq.tqe_next = deferred_vdrop_list; + deferred_vdrop_list = m; } - if (m->flags & PG_ZERO) - vm_page_zero_count--; - /* Don't clear the PG_ZERO flag; we'll need it later. */ - m->flags = PG_UNMANAGED | (m->flags & PG_ZERO); - m->oflags = 0; - /* Unmanaged pages don't use "act_count". */ } for (; i < roundup2(npages, 1 << imin(oind, order)); i++) { m = &m_ret[i]; Modified: head/sys/vm/vm_phys.h ============================================================================== --- head/sys/vm/vm_phys.h Wed Jul 21 09:20:40 2010 (r210326) +++ head/sys/vm/vm_phys.h Wed Jul 21 09:27:00 2010 (r210327) @@ -44,6 +44,7 @@ void vm_phys_add_page(vm_paddr_t pa); vm_page_t vm_phys_alloc_contig(unsigned long npages, vm_paddr_t low, vm_paddr_t high, unsigned long alignment, unsigned long boundary); +vm_page_t vm_phys_alloc_freelist_pages(int flind, int pool, int order); vm_page_t vm_phys_alloc_pages(int pool, int order); vm_paddr_t vm_phys_bootstrap_alloc(vm_size_t size, unsigned long alignment); void vm_phys_free_pages(vm_page_t m, int order); From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:27:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 381DA1065676; Wed, 21 Jul 2010 09:27:17 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 274FE8FC1F; Wed, 21 Jul 2010 09:27:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L9RHjI074692; Wed, 21 Jul 2010 09:27:17 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L9RHp0074690; Wed, 21 Jul 2010 09:27:17 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007210927.o6L9RHp0074690@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 09:27:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210328 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:27:17 -0000 Author: kaiw Date: Wed Jul 21 09:27:16 2010 New Revision: 210328 URL: http://svn.freebsd.org/changeset/base/210328 Log: Bug fix: permit the creation of zero-sized sections. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/elf_update.c Modified: head/lib/libelf/elf_update.c ============================================================================== --- head/lib/libelf/elf_update.c Wed Jul 21 09:27:00 2010 (r210327) +++ head/lib/libelf/elf_update.c Wed Jul 21 09:27:16 2010 (r210328) @@ -534,22 +534,24 @@ _libelf_write_scn(Elf *e, char *nf, Elf_ int ec; size_t fsz, msz, nobjects; uint32_t sh_type; - uint64_t sh_off; + uint64_t sh_off, sh_size; int elftype; Elf_Data *d, dst; - if ((ec = e->e_class) == ELFCLASS32) + if ((ec = e->e_class) == ELFCLASS32) { sh_type = s->s_shdr.s_shdr32.sh_type; - else + sh_size = (uint64_t) s->s_shdr.s_shdr32.sh_size; + } else { sh_type = s->s_shdr.s_shdr64.sh_type; + sh_size = s->s_shdr.s_shdr64.sh_size; + } /* * Ignore sections that do not allocate space in the file. */ - if (sh_type == SHT_NOBITS || sh_type == SHT_NULL) + if (sh_type == SHT_NOBITS || sh_type == SHT_NULL || sh_size == 0) return (rc); - elftype = _libelf_xlate_shtype(sh_type); assert(elftype >= ELF_T_FIRST && elftype <= ELF_T_LAST); From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:33:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B17CE1065673; Wed, 21 Jul 2010 09:33:45 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A144E8FC13; Wed, 21 Jul 2010 09:33:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L9XjAv076186; Wed, 21 Jul 2010 09:33:45 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L9Xj6b076184; Wed, 21 Jul 2010 09:33:45 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007210933.o6L9Xj6b076184@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 09:33:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210329 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:33:45 -0000 Author: kaiw Date: Wed Jul 21 09:33:45 2010 New Revision: 210329 URL: http://svn.freebsd.org/changeset/base/210329 Log: Use to declare the prototype for ftruncate(). Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/elf_begin.c Modified: head/lib/libelf/elf_begin.c ============================================================================== --- head/lib/libelf/elf_begin.c Wed Jul 21 09:27:16 2010 (r210328) +++ head/lib/libelf/elf_begin.c Wed Jul 21 09:33:45 2010 (r210329) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include "_libelf.h" From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:44:21 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9BC471065677; Wed, 21 Jul 2010 09:44:21 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id 2BD8B8FC21; Wed, 21 Jul 2010 09:44:20 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6L9iHBW015493 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Jul 2010 19:44:18 +1000 Date: Wed, 21 Jul 2010 19:44:17 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Ivan Voras In-Reply-To: Message-ID: <20100721193900.L7531@delplex.bde.org> References: <201007181015.o6IAFXvK018739@svn.freebsd.org> <201007190829.21995.jhb@freebsd.org> <20100721134319.E7228@delplex.bde.org> MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="0-1262108218-1279705457=:7531" Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, John Baldwin , Bruce Evans Subject: Re: svn commit: r210217 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:44:21 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --0-1262108218-1279705457=:7531 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Wed, 21 Jul 2010, Ivan Voras wrote: > On 21 July 2010 06:18, Bruce Evans wrote: >> On Mon, 19 Jul 2010, John Baldwin wrote: >> >>>> Log: >>>> =C2=A0In keeping with the Age-of-the-fruitbat theme, scale up hirunnin= gspace >>>> on >>>> =C2=A0machines which can clearly afford the memory. >>>> >>>> =C2=A0This is a somewhat conservative version of the patch - more fine= tuning >>>> may be >>>> =C2=A0necessary. >>>> >>>> =C2=A0Idea from: Thread on hackers@ >>>> =C2=A0Discussed with: alc >> >> Sorry I didn't look at the thread, but I wonder if you should increase >> lorunningspace similarly. > > The previous ratio of lorunningspace to hirunningspace was 1/2 - is > this still a good target? I don't know if the ratio is more important than difference. Maybe neither is very important once the difference is not very small. > It does seem like there would be more benefitial to hang these > variables per mount-point or something similar but I'm content that > they are tunable and that the new values help high-end machines, > probably in cooperation with tagged (NCQ-like) IO. So the high end machine owners are less capable of tuning? :-) This might be the case even if they also have higher end money and support, since the higher end is bleeding edge. Bruce --0-1262108218-1279705457=:7531-- From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:47:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 335021065692; Wed, 21 Jul 2010 09:47:15 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 090728FC16; Wed, 21 Jul 2010 09:47:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L9lEfi079238; Wed, 21 Jul 2010 09:47:14 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L9lELb079234; Wed, 21 Jul 2010 09:47:14 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007210947.o6L9lELb079234@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 09:47:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210330 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:47:15 -0000 Author: kaiw Date: Wed Jul 21 09:47:14 2010 New Revision: 210330 URL: http://svn.freebsd.org/changeset/base/210330 Log: Allow an application that updates only the ELF Ehdr to work. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/_libelf.h head/lib/libelf/elf_scn.c head/lib/libelf/elf_update.c Modified: head/lib/libelf/_libelf.h ============================================================================== --- head/lib/libelf/_libelf.h Wed Jul 21 09:33:45 2010 (r210329) +++ head/lib/libelf/_libelf.h Wed Jul 21 09:47:14 2010 (r210330) @@ -176,6 +176,7 @@ void (*_libelf_get_translator(Elf_Type _ void *_libelf_getphdr(Elf *_e, int _elfclass); void *_libelf_getshdr(Elf_Scn *_scn, int _elfclass); void _libelf_init_elf(Elf *_e, Elf_Kind _kind); +int _libelf_load_scn(Elf *e, void *ehdr); int _libelf_malign(Elf_Type _t, int _elfclass); size_t _libelf_msize(Elf_Type _t, int _elfclass, unsigned int _version); void *_libelf_newphdr(Elf *_e, int _elfclass, size_t _count); Modified: head/lib/libelf/elf_scn.c ============================================================================== --- head/lib/libelf/elf_scn.c Wed Jul 21 09:33:45 2010 (r210329) +++ head/lib/libelf/elf_scn.c Wed Jul 21 09:47:14 2010 (r210330) @@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$"); /* * Load an ELF section table and create a list of Elf_Scn structures. */ -static int +int _libelf_load_scn(Elf *e, void *ehdr) { int ec, swapbytes; Modified: head/lib/libelf/elf_update.c ============================================================================== --- head/lib/libelf/elf_update.c Wed Jul 21 09:33:45 2010 (r210329) +++ head/lib/libelf/elf_update.c Wed Jul 21 09:47:14 2010 (r210330) @@ -472,6 +472,11 @@ _libelf_resync_elf(Elf *e) * file. */ + if (e->e_cmd != ELF_C_WRITE && + (e->e_flags & LIBELF_F_SHDRS_LOADED) == 0 && + _libelf_load_scn(e, ehdr) == 0) + return ((off_t) -1); + if ((rc = _libelf_resync_sections(e, rc)) < 0) return ((off_t) -1); @@ -726,14 +731,9 @@ _libelf_write_elf(Elf *e, off_t newsize) assert(phoff % _libelf_falign(ELF_T_PHDR, ec) == 0); assert(fsz > 0); + src.d_buf = _libelf_getphdr(e, ec); src.d_version = dst.d_version = e->e_version; src.d_type = ELF_T_PHDR; - - if (ec == ELFCLASS32) - src.d_buf = e->e_u.e_elf.e_phdr.e_phdr32; - else - src.d_buf = e->e_u.e_elf.e_phdr.e_phdr64; - src.d_size = phnum * _libelf_msize(ELF_T_PHDR, ec, e->e_version); From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:51:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 32CAC1065670; Wed, 21 Jul 2010 09:51:25 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 223D58FC0C; Wed, 21 Jul 2010 09:51:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L9pPFb080187; Wed, 21 Jul 2010 09:51:25 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L9pPG8080185; Wed, 21 Jul 2010 09:51:25 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007210951.o6L9pPG8080185@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 09:51:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210331 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:51:25 -0000 Author: kaiw Date: Wed Jul 21 09:51:24 2010 New Revision: 210331 URL: http://svn.freebsd.org/changeset/base/210331 Log: Add a new ELF type denoting GNU style hash tables. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/libelf.h Modified: head/lib/libelf/libelf.h ============================================================================== --- head/lib/libelf/libelf.h Wed Jul 21 09:47:14 2010 (r210330) +++ head/lib/libelf/libelf.h Wed Jul 21 09:51:24 2010 (r210331) @@ -75,6 +75,7 @@ typedef enum { ELF_T_VNEED, ELF_T_WORD, ELF_T_XWORD, + ELF_T_GNUHASH, /* GNU style hash tables. */ ELF_T_NUM } Elf_Type; From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:51:53 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B8C91065675; Wed, 21 Jul 2010 09:51:53 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail08.syd.optusnet.com.au (mail08.syd.optusnet.com.au [211.29.132.189]) by mx1.freebsd.org (Postfix) with ESMTP id B9AA68FC12; Wed, 21 Jul 2010 09:51:52 +0000 (UTC) Received: from c122-106-145-25.carlnfd1.nsw.optusnet.com.au (c122-106-145-25.carlnfd1.nsw.optusnet.com.au [122.106.145.25]) by mail08.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o6L9pncg027535 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Jul 2010 19:51:50 +1000 Date: Wed, 21 Jul 2010 19:51:49 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Alexey Dokuchaev In-Reply-To: <20100721090623.GA21607@FreeBSD.org> Message-ID: <20100721194659.L7533@delplex.bde.org> References: <201007210843.o6L8hmo5064622@svn.freebsd.org> <20100721090623.GA21607@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Kai Wang Subject: Re: svn commit: r210321 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:51:53 -0000 On Wed, 21 Jul 2010, Alexey Dokuchaev wrote: > On Wed, Jul 21, 2010 at 08:43:48AM +0000, Kai Wang wrote: >> Log: >> Remove a superfluous comment. >> >> Obtained from: elftoolchain >> MFC after: 1 month > > (Just picking random of the similar commits): guys, please, try to > uniformly align commit meta tags: It is perfectly aligned with tabs (and no 2-char commit mail indentation, and no N-char mailer quoting). > Obtained from: somewhere > MFC after: sometime > Foo bar: baz qux ... > > Broken alignment considerably pessimizes commit log grasping, as it > requires more post-processing work after reading it off. Do you mean for human grasping and automated post-processing? The automation should have no problems with the whitespace but might with the mailer quoting. "tags" should mean the part before the ":". Aligning those by making them all of the same length would help. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 09:56:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84A2A1065676; Wed, 21 Jul 2010 09:56:42 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5A9858FC0A; Wed, 21 Jul 2010 09:56:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6L9ugbE081422; Wed, 21 Jul 2010 09:56:42 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6L9ugTM081418; Wed, 21 Jul 2010 09:56:42 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007210956.o6L9ugTM081418@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 09:56:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210332 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 09:56:42 -0000 Author: kaiw Date: Wed Jul 21 09:56:42 2010 New Revision: 210332 URL: http://svn.freebsd.org/changeset/base/210332 Log: Changes for supporting GNU Hash sections. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/libelf_align.c head/lib/libelf/libelf_fsize.m4 head/lib/libelf/libelf_msize.m4 Modified: head/lib/libelf/libelf_align.c ============================================================================== --- head/lib/libelf/libelf_align.c Wed Jul 21 09:51:24 2010 (r210331) +++ head/lib/libelf/libelf_align.c Wed Jul 21 09:56:42 2010 (r210332) @@ -51,6 +51,10 @@ struct align { .a32 = 0, \ .a64 = __alignof__(Elf64_##V) \ } +#define MALIGN_WORD() { \ + .a32 = __alignof__(int32_t), \ + .a64 = __alignof__(int64_t) \ + } #else #error Need the __alignof__ builtin. #endif @@ -92,7 +96,10 @@ static struct align malign[ELF_T_NUM] = [ELF_T_VNEED] = MALIGN(Verneed), #endif [ELF_T_WORD] = MALIGN(Word), - [ELF_T_XWORD] = MALIGN64(Xword) + [ELF_T_XWORD] = MALIGN64(Xword), +#if __FreeBSD_version >= 800062 + [ELF_T_GNUHASH] = MALIGN_WORD() +#endif }; int @@ -140,7 +147,10 @@ static struct align falign[ELF_T_NUM] = [ELF_T_VNEED] = FALIGN(4,4), #endif [ELF_T_WORD] = FALIGN(4,4), - [ELF_T_XWORD] = FALIGN(0,8) + [ELF_T_XWORD] = FALIGN(0,8), +#if __FreeBSD_version >= 800062 + [ELF_T_GNUHASH] = FALIGN(4,8) +#endif }; int Modified: head/lib/libelf/libelf_fsize.m4 ============================================================================== --- head/lib/libelf/libelf_fsize.m4 Wed Jul 21 09:51:24 2010 (r210331) +++ head/lib/libelf/libelf_fsize.m4 Wed Jul 21 09:56:42 2010 (r210332) @@ -45,6 +45,7 @@ include(SRCDIR`/elf_types.m4') /* `Basic' types */ define(`BYTE_SIZE', 1) +define(`GNUHASH_SIZE', 1) /* Elf_GNU_Hash_Header structures vary in length. */ define(`IDENT_SIZE', `EI_NIDENT') define(`NOTE_SIZE', 1) /* Elf_Note structures have variable length. */ Modified: head/lib/libelf/libelf_msize.m4 ============================================================================== --- head/lib/libelf/libelf_msize.m4 Wed Jul 21 09:51:24 2010 (r210331) +++ head/lib/libelf/libelf_msize.m4 Wed Jul 21 09:56:42 2010 (r210332) @@ -49,6 +49,7 @@ divert(-1) include(SRCDIR`/elf_types.m4') define(BYTE_SIZE, 1) +define(GNUHASH_SIZE, 1) define(NOTE_SIZE, 1) /* From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 10:02:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CD41F1065673; Wed, 21 Jul 2010 10:02:59 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id BCD138FC1A; Wed, 21 Jul 2010 10:02:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6LA2xR9082887; Wed, 21 Jul 2010 10:02:59 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6LA2xpe082885; Wed, 21 Jul 2010 10:02:59 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007211002.o6LA2xpe082885@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 10:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210333 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 10:02:59 -0000 Author: kaiw Date: Wed Jul 21 10:02:59 2010 New Revision: 210333 URL: http://svn.freebsd.org/changeset/base/210333 Log: Note that the *_fsize() functions are only defined for ELF types that have a fixed size. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/gelf_fsize.3 Modified: head/lib/libelf/gelf_fsize.3 ============================================================================== --- head/lib/libelf/gelf_fsize.3 Wed Jul 21 09:56:42 2010 (r210332) +++ head/lib/libelf/gelf_fsize.3 Wed Jul 21 10:02:59 2010 (r210333) @@ -47,6 +47,9 @@ These functions return the size in bytes .Ar count numbers of objects of ELF type .Ar type . +Argument +.Ar type +must be one that has a fixed size file representation. .Pp Functions .Fn elf32_fsize @@ -80,6 +83,10 @@ had an unknown ELF class. Argument .Ar type contained an illegal value. +.It Bq Er ELF_E_ARGUMENT +Argument +.Ar type +denoted an ELF type with variable size. .It Bq Er ELF_E_UNIMPL Support for ELF type .Ar type From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 10:05:08 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 71A90106566C; Wed, 21 Jul 2010 10:05:08 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 5EBBA8FC1C; Wed, 21 Jul 2010 10:05:08 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6LA58cT083444; Wed, 21 Jul 2010 10:05:08 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6LA58rT083435; Wed, 21 Jul 2010 10:05:08 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201007211005.o6LA58rT083435@svn.freebsd.org> From: Attilio Rao Date: Wed, 21 Jul 2010 10:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210334 - in head/sys: dev/cas dev/gem dev/hme sparc64/include sparc64/sparc64 sun4v/include sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 10:05:08 -0000 Author: attilio Date: Wed Jul 21 10:05:07 2010 New Revision: 210334 URL: http://svn.freebsd.org/changeset/base/210334 Log: KTR_CTx are long time aliased by existing classes so they can't serve their purpose anymore. Axe them out. Sponsored by: Sandvine Incorporated Discussed with: jhb, emaste Possible MFC: TBD Modified: head/sys/dev/cas/if_cas.c head/sys/dev/gem/if_gem.c head/sys/dev/hme/if_hme.c head/sys/sparc64/include/bus.h head/sys/sparc64/sparc64/pmap.c head/sys/sparc64/sparc64/tsb.c head/sys/sun4v/include/bus.h head/sys/sys/ktr.h Modified: head/sys/dev/cas/if_cas.c ============================================================================== --- head/sys/dev/cas/if_cas.c Wed Jul 21 10:02:59 2010 (r210333) +++ head/sys/dev/cas/if_cas.c Wed Jul 21 10:05:07 2010 (r210334) @@ -176,7 +176,7 @@ MODULE_DEPEND(cas, miibus, 1, 1, 1); #ifdef CAS_DEBUG #include -#define KTR_CAS KTR_CT2 +#define KTR_CAS KTR_SPARE2 #endif static int Modified: head/sys/dev/gem/if_gem.c ============================================================================== --- head/sys/dev/gem/if_gem.c Wed Jul 21 10:02:59 2010 (r210333) +++ head/sys/dev/gem/if_gem.c Wed Jul 21 10:05:07 2010 (r210334) @@ -136,7 +136,7 @@ MODULE_DEPEND(gem, miibus, 1, 1, 1); #ifdef GEM_DEBUG #include -#define KTR_GEM KTR_CT2 +#define KTR_GEM KTR_SPARE2 #endif #define GEM_BANK1_BITWAIT(sc, r, clr, set) \ Modified: head/sys/dev/hme/if_hme.c ============================================================================== --- head/sys/dev/hme/if_hme.c Wed Jul 21 10:02:59 2010 (r210333) +++ head/sys/dev/hme/if_hme.c Wed Jul 21 10:05:07 2010 (r210334) @@ -64,7 +64,7 @@ __FBSDID("$FreeBSD$"); #if 0 #define HMEDEBUG #endif -#define KTR_HME KTR_CT2 /* XXX */ +#define KTR_HME KTR_SPARE2 /* XXX */ #include #include Modified: head/sys/sparc64/include/bus.h ============================================================================== --- head/sys/sparc64/include/bus.h Wed Jul 21 10:02:59 2010 (r210333) +++ head/sys/sparc64/include/bus.h Wed Jul 21 10:05:07 2010 (r210334) @@ -194,7 +194,7 @@ bus_space_subregion(bus_space_tag_t t, b #define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */ #ifdef BUS_SPACE_DEBUG -#define KTR_BUS KTR_CT2 +#define KTR_BUS KTR_SPARE2 #define __BUS_DEBUG_ACCESS(h, o, desc, sz) do { \ CTR4(KTR_BUS, "bus space: %s %d: handle %#lx, offset %#lx", \ (desc), (sz), (h), (o)); \ Modified: head/sys/sparc64/sparc64/pmap.c ============================================================================== --- head/sys/sparc64/sparc64/pmap.c Wed Jul 21 10:02:59 2010 (r210333) +++ head/sys/sparc64/sparc64/pmap.c Wed Jul 21 10:05:07 2010 (r210334) @@ -899,7 +899,7 @@ pmap_kenter(vm_offset_t va, vm_page_t m) CTR4(KTR_PMAP, "pmap_kenter: va=%#lx pa=%#lx tp=%p data=%#lx", va, VM_PAGE_TO_PHYS(m), tp, tp->tte_data); if (DCACHE_COLOR(VM_PAGE_TO_PHYS(m)) != DCACHE_COLOR(va)) { - CTR5(KTR_CT2, + CTR5(KTR_SPARE2, "pmap_kenter: off colour va=%#lx pa=%#lx o=%p ot=%d pi=%#lx", va, VM_PAGE_TO_PHYS(m), m->object, m->object ? m->object->type : -1, Modified: head/sys/sparc64/sparc64/tsb.c ============================================================================== --- head/sys/sparc64/sparc64/tsb.c Wed Jul 21 10:02:59 2010 (r210333) +++ head/sys/sparc64/sparc64/tsb.c Wed Jul 21 10:05:07 2010 (r210334) @@ -118,7 +118,7 @@ tsb_tte_enter(pmap_t pm, vm_page_t m, vm int i; if (DCACHE_COLOR(VM_PAGE_TO_PHYS(m)) != DCACHE_COLOR(va)) { - CTR5(KTR_CT2, + CTR5(KTR_SPARE2, "tsb_tte_enter: off colour va=%#lx pa=%#lx o=%p ot=%d pi=%#lx", va, VM_PAGE_TO_PHYS(m), m->object, m->object ? m->object->type : -1, Modified: head/sys/sun4v/include/bus.h ============================================================================== --- head/sys/sun4v/include/bus.h Wed Jul 21 10:02:59 2010 (r210333) +++ head/sys/sun4v/include/bus.h Wed Jul 21 10:05:07 2010 (r210334) @@ -194,7 +194,7 @@ bus_space_subregion(bus_space_tag_t t, b #define BUS_SPACE_BARRIER_WRITE 0x02 /* force write barrier */ #ifdef BUS_SPACE_DEBUG -#define KTR_BUS KTR_CT2 +#define KTR_BUS KTR_SPARE2 #define __BUS_DEBUG_ACCESS(h, o, desc, sz) do { \ CTR4(KTR_BUS, "bus space: %s %d: handle %#lx, offset %#lx", \ (desc), (sz), (h), (o)); \ Modified: head/sys/sys/ktr.h ============================================================================== --- head/sys/sys/ktr.h Wed Jul 21 10:02:59 2010 (r210333) +++ head/sys/sys/ktr.h Wed Jul 21 10:05:07 2010 (r210334) @@ -77,19 +77,6 @@ #define KTR_BUF 0x40000000 /* Buffer cache */ #define KTR_ALL 0x7fffffff -/* - * Trace classes which can be assigned to particular use at compile time - * These must remain in high 22 as some assembly code counts on it - */ -#define KTR_CT1 0x01000000 -#define KTR_CT2 0x02000000 -#define KTR_CT3 0x04000000 -#define KTR_CT4 0x08000000 -#define KTR_CT5 0x10000000 -#define KTR_CT6 0x20000000 -#define KTR_CT7 0x40000000 -#define KTR_CT8 0x80000000 - /* Trace classes to compile in */ #ifdef KTR #ifndef KTR_COMPILE From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 10:08:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D690106566C; Wed, 21 Jul 2010 10:08:26 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0CD7A8FC13; Wed, 21 Jul 2010 10:08:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6LA8Pd7084181; Wed, 21 Jul 2010 10:08:25 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6LA8PgG084179; Wed, 21 Jul 2010 10:08:25 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007211008.o6LA8PgG084179@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 10:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210335 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 10:08:26 -0000 Author: kaiw Date: Wed Jul 21 10:08:25 2010 New Revision: 210335 URL: http://svn.freebsd.org/changeset/base/210335 Log: - Return zero for file sizes of ELF types that have a variable size. - Neaten a few comments. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/libelf_fsize.m4 Modified: head/lib/libelf/libelf_fsize.m4 ============================================================================== --- head/lib/libelf/libelf_fsize.m4 Wed Jul 21 10:05:07 2010 (r210334) +++ head/lib/libelf/libelf_fsize.m4 Wed Jul 21 10:08:25 2010 (r210335) @@ -43,16 +43,18 @@ include(SRCDIR`/elf_types.m4') * representations. */ -/* `Basic' types */ +/* `Basic' types. */ define(`BYTE_SIZE', 1) -define(`GNUHASH_SIZE', 1) /* Elf_GNU_Hash_Header structures vary in length. */ define(`IDENT_SIZE', `EI_NIDENT') -define(`NOTE_SIZE', 1) /* Elf_Note structures have variable length. */ -/* Currently unimplemented types */ +/* Types that have variable length. */ +define(`GNUHASH_SIZE', 0) /* Elf_GNU_Hash_Header structures vary in length. */ +define(`NOTE_SIZE', 0) /* Elf_Note structures have variable length. */ + +/* Currently unimplemented types. */ define(`MOVEP_SIZE', 0) -/* Overrides for 32 bit types that do not exist */ +/* Overrides for 32 bit types that do not exist. */ define(`XWORD_SIZE32', 0) define(`SXWORD_SIZE32', 0) @@ -143,7 +145,8 @@ _libelf_fsize(Elf_Type t, int ec, unsign sz = 0; if (v != EV_CURRENT) LIBELF_SET_ERROR(VERSION, 0); - else if ((int) t < ELF_T_FIRST || t > ELF_T_LAST) + else if ((int) t < ELF_T_FIRST || t > ELF_T_LAST || + t == ELF_T_NOTE || t == ELF_T_GNUHASH) LIBELF_SET_ERROR(ARGUMENT, 0); else { sz = ec == ELFCLASS64 ? fsize[t].fsz64 : fsize[t].fsz32; From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 10:11:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 97B4B1065677; Wed, 21 Jul 2010 10:11:46 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 874948FC1C; Wed, 21 Jul 2010 10:11:46 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6LABkRZ084990; Wed, 21 Jul 2010 10:11:46 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6LABk0I084988; Wed, 21 Jul 2010 10:11:46 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007211011.o6LABk0I084988@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 10:11:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210336 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 10:11:46 -0000 Author: kaiw Date: Wed Jul 21 10:11:46 2010 New Revision: 210336 URL: http://svn.freebsd.org/changeset/base/210336 Log: Reduce verbosity. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/libelf_fsize.m4 Modified: head/lib/libelf/libelf_fsize.m4 ============================================================================== --- head/lib/libelf/libelf_fsize.m4 Wed Jul 21 10:08:25 2010 (r210335) +++ head/lib/libelf/libelf_fsize.m4 Wed Jul 21 10:11:46 2010 (r210336) @@ -48,8 +48,8 @@ define(`BYTE_SIZE', 1) define(`IDENT_SIZE', `EI_NIDENT') /* Types that have variable length. */ -define(`GNUHASH_SIZE', 0) /* Elf_GNU_Hash_Header structures vary in length. */ -define(`NOTE_SIZE', 0) /* Elf_Note structures have variable length. */ +define(`GNUHASH_SIZE', 0) +define(`NOTE_SIZE', 0) /* Currently unimplemented types. */ define(`MOVEP_SIZE', 0) From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 10:14:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C28E1065670; Wed, 21 Jul 2010 10:14:06 +0000 (UTC) (envelope-from attilio@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 072DF8FC19; Wed, 21 Jul 2010 10:14:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6LAE4Ai085530; Wed, 21 Jul 2010 10:14:04 GMT (envelope-from attilio@svn.freebsd.org) Received: (from attilio@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6LAE4QR085528; Wed, 21 Jul 2010 10:14:04 GMT (envelope-from attilio@svn.freebsd.org) Message-Id: <201007211014.o6LAE4QR085528@svn.freebsd.org> From: Attilio Rao Date: Wed, 21 Jul 2010 10:14:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210337 - head/sys/kern X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 10:14:06 -0000 Author: attilio Date: Wed Jul 21 10:14:04 2010 New Revision: 210337 URL: http://svn.freebsd.org/changeset/base/210337 Log: Probabilly defaulting to KTR_GEN is not the right decision when KTR_MASK is not defined at all because KTR_GEN is still a valid class and some traces may fit in. Default to 0, instead, and block any tracing. As long as this is a POLA violation (some thirdy-part code, even if that may be a questionable choice, could be rely on that feature) a MFC possibility might be carefully evaluated. Sponsored by: Sandvine Incorporated Modified: head/sys/kern/kern_ktr.c Modified: head/sys/kern/kern_ktr.c ============================================================================== --- head/sys/kern/kern_ktr.c Wed Jul 21 10:11:46 2010 (r210336) +++ head/sys/kern/kern_ktr.c Wed Jul 21 10:14:04 2010 (r210337) @@ -65,7 +65,7 @@ __FBSDID("$FreeBSD$"); #endif #ifndef KTR_MASK -#define KTR_MASK (KTR_GEN) +#define KTR_MASK (0) #endif #ifndef KTR_CPUMASK From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 10:25:02 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8586B1065678; Wed, 21 Jul 2010 10:25:02 +0000 (UTC) (envelope-from kaiw@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 735198FC18; Wed, 21 Jul 2010 10:25:02 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6LAP21v088035; Wed, 21 Jul 2010 10:25:02 GMT (envelope-from kaiw@svn.freebsd.org) Received: (from kaiw@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6LAP2S9088027; Wed, 21 Jul 2010 10:25:02 GMT (envelope-from kaiw@svn.freebsd.org) Message-Id: <201007211025.o6LAP2S9088027@svn.freebsd.org> From: Kai Wang Date: Wed, 21 Jul 2010 10:25:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210338 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 10:25:02 -0000 Author: kaiw Date: Wed Jul 21 10:25:02 2010 New Revision: 210338 URL: http://svn.freebsd.org/changeset/base/210338 Log: Perform additional checks when translating between file and memory representations of ELF types. The ELF(3) API allows applications to request a conversion that is `in-place', i.e., with source and destinations data buffers being the same. However, the file and memory sizes of ELF sections that have additional internal structure, such as those of type `Elf_Note', or `Elf_GNU_Hash_Header', can be determined only known after the type-specific headers that comprise the first few words in these sections are read and translated. Pass in the size of destination buffer to type translation routines in "libelf_convert.m4" and have these routines return an error code if the translated data would not fit inside the destination buffer. Obtained from: elftoolchain MFC after: 1 month Modified: head/lib/libelf/_libelf.h head/lib/libelf/elf_data.c head/lib/libelf/elf_scn.c head/lib/libelf/libelf_convert.m4 head/lib/libelf/libelf_ehdr.c head/lib/libelf/libelf_phdr.c head/lib/libelf/libelf_xlate.c Modified: head/lib/libelf/_libelf.h ============================================================================== --- head/lib/libelf/_libelf.h Wed Jul 21 10:14:04 2010 (r210337) +++ head/lib/libelf/_libelf.h Wed Jul 21 10:25:02 2010 (r210338) @@ -171,8 +171,8 @@ void *_libelf_ehdr(Elf *_e, int _elfclas int _libelf_falign(Elf_Type _t, int _elfclass); size_t _libelf_fsize(Elf_Type _t, int _elfclass, unsigned int _version, size_t count); -void (*_libelf_get_translator(Elf_Type _t, int _direction, int _elfclass)) - (char *_dst, char *_src, size_t _cnt, int _byteswap); +int (*_libelf_get_translator(Elf_Type _t, int _direction, int _elfclass)) + (char *_dst, size_t dsz, char *_src, size_t _cnt, int _byteswap); void *_libelf_getphdr(Elf *_e, int _elfclass); void *_libelf_getshdr(Elf_Scn *_scn, int _elfclass); void _libelf_init_elf(Elf *_e, Elf_Kind _kind); Modified: head/lib/libelf/elf_data.c ============================================================================== --- head/lib/libelf/elf_data.c Wed Jul 21 10:14:04 2010 (r210337) +++ head/lib/libelf/elf_data.c Wed Jul 21 10:25:02 2010 (r210338) @@ -43,7 +43,7 @@ elf_getdata(Elf_Scn *s, Elf_Data *d) int elfclass, elftype; unsigned int sh_type; uint64_t sh_align, sh_offset, sh_size; - void (*xlate)(char *_d, char *_s, size_t _c, int _swap); + int (*xlate)(char *_d, size_t _dsz, char *_s, size_t _c, int _swap); if (s == NULL || (e = s->s_elf) == NULL || e->e_kind != ELF_K_ELF || (d != NULL && s != d->d_scn)) { @@ -125,11 +125,16 @@ elf_getdata(Elf_Scn *s, Elf_Data *d) } d->d_flags |= LIBELF_F_MALLOCED; - STAILQ_INSERT_TAIL(&s->s_data, d, d_next); xlate = _libelf_get_translator(elftype, ELF_TOMEMORY, elfclass); - (*xlate)(d->d_buf, e->e_rawfile + sh_offset, count, e->e_byteorder != - LIBELF_PRIVATE(byteorder)); + if (!(*xlate)(d->d_buf, d->d_size, e->e_rawfile + sh_offset, count, + e->e_byteorder != LIBELF_PRIVATE(byteorder))) { + _libelf_release_data(d); + LIBELF_SET_ERROR(DATA, 0); + return (NULL); + } + + STAILQ_INSERT_TAIL(&s->s_data, d, d_next); return (d); } Modified: head/lib/libelf/elf_scn.c ============================================================================== --- head/lib/libelf/elf_scn.c Wed Jul 21 10:14:04 2010 (r210337) +++ head/lib/libelf/elf_scn.c Wed Jul 21 10:25:02 2010 (r210338) @@ -48,7 +48,7 @@ _libelf_load_scn(Elf *e, void *ehdr) Elf32_Ehdr *eh32; Elf64_Ehdr *eh64; Elf_Scn *scn; - void (*xlator)(char *_d, char *_s, size_t _c, int _swap); + int (*xlator)(char *_d, size_t _dsz, char *_s, size_t _c, int _swap); assert(e != NULL); assert(ehdr != NULL); @@ -101,7 +101,8 @@ _libelf_load_scn(Elf *e, void *ehdr) if ((scn = _libelf_allocate_scn(e, i)) == NULL) return (0); - (*xlator)((char *) &scn->s_shdr, src, (size_t) 1, swapbytes); + (*xlator)((char *) &scn->s_shdr, sizeof(scn->s_shdr), src, + (size_t) 1, swapbytes); if (ec == ELFCLASS32) { scn->s_offset = scn->s_rawoff = Modified: head/lib/libelf/libelf_convert.m4 ============================================================================== --- head/lib/libelf/libelf_convert.m4 Wed Jul 21 10:14:04 2010 (r210337) +++ head/lib/libelf/libelf_convert.m4 Wed Jul 21 10:25:02 2010 (r210338) @@ -236,6 +236,7 @@ IGNORE(MOVEP) IGNORE(NOTE) define(IGNORE_BYTE, 1) /* 'lator, leave 'em bytes alone */ +define(IGNORE_GNUHASH, 1) define(IGNORE_NOTE, 1) define(IGNORE_SXWORD32, 1) define(IGNORE_XWORD32, 1) @@ -274,18 +275,18 @@ define(`SIZEDEP_OFF', 1) * `$4': ELF class specifier for types, one of [`32', `64'] */ define(`MAKEPRIM_TO_F',` -static void -libelf_cvt_$1$3_tof(char *dst, char *src, size_t count, int byteswap) +static int +libelf_cvt_$1$3_tof(char *dst, size_t dsz, char *src, size_t count, + int byteswap) { Elf$4_$2 t, *s = (Elf$4_$2 *) (uintptr_t) src; size_t c; - if (dst == src && !byteswap) - return; + (void) dsz; if (!byteswap) { (void) memcpy(dst, src, count * sizeof(*s)); - return; + return (1); } for (c = 0; c < count; c++) { @@ -293,22 +294,25 @@ libelf_cvt_$1$3_tof(char *dst, char *src SWAP_$1$3(t); WRITE_$1$3(dst,t); } + + return (1); } ') define(`MAKEPRIM_TO_M',` -static void -libelf_cvt_$1$3_tom(char *dst, char *src, size_t count, int byteswap) +static int +libelf_cvt_$1$3_tom(char *dst, size_t dsz, char *src, size_t count, + int byteswap) { Elf$4_$2 t, *d = (Elf$4_$2 *) (uintptr_t) dst; size_t c; - if (dst == src && !byteswap) - return; + if (dsz < count * sizeof(Elf$4_$2)) + return (0); if (!byteswap) { (void) memcpy(dst, src, count * sizeof(*d)); - return; + return (1); } for (c = 0; c < count; c++) { @@ -316,6 +320,8 @@ libelf_cvt_$1$3_tom(char *dst, char *src SWAP_$1$3(t); *d++ = t; } + + return (1); } ') @@ -392,12 +398,15 @@ define(`READ_STRUCT', define(`MAKE_TO_F', `ifdef(`IGNORE_'$1$3,`',` -static void -libelf_cvt$3_$1_tof(char *dst, char *src, size_t count, int byteswap) +static int +libelf_cvt$3_$1_tof(char *dst, size_t dsz, char *src, size_t count, + int byteswap) { Elf$3_$2 t, *s; size_t c; + (void) dsz; + s = (Elf$3_$2 *) (uintptr_t) src; for (c = 0; c < count; c++) { t = *s++; @@ -406,13 +415,16 @@ libelf_cvt$3_$1_tof(char *dst, char *src } WRITE_STRUCT($2,$3) } + + return (1); } ')') define(`MAKE_TO_M', `ifdef(`IGNORE_'$1$3,`',` -static void -libelf_cvt$3_$1_tom(char *dst, char *src, size_t count, int byteswap) +static int +libelf_cvt$3_$1_tom(char *dst, size_t dsz, char *src, size_t count, + int byteswap) { Elf$3_$2 t, *d; unsigned char *s,*s0; @@ -422,6 +434,9 @@ libelf_cvt$3_$1_tom(char *dst, char *src d = ((Elf$3_$2 *) (uintptr_t) dst) + (count - 1); s0 = (unsigned char *) src + (count - 1) * fsz; + if (dsz < count * sizeof(Elf$3_$2)) + return (0); + while (count--) { s = s0; READ_STRUCT($2,$3) @@ -430,6 +445,8 @@ libelf_cvt$3_$1_tom(char *dst, char *src } *d-- = t; s0 -= fsz; } + + return (1); } ')') @@ -475,12 +492,16 @@ divert(0) * simple memcpy suffices for both directions of conversion. */ -static void -libelf_cvt_BYTE_tox(char *dst, char *src, size_t count, int byteswap) +static int +libelf_cvt_BYTE_tox(char *dst, size_t dsz, char *src, size_t count, + int byteswap) { (void) byteswap; + if (dsz < count) + return (0); if (dst != src) (void) memcpy(dst, src, count); + return (1); } /* @@ -490,69 +511,81 @@ libelf_cvt_BYTE_tox(char *dst, char *src * * Argument `count' denotes the total number of bytes to be converted. */ -static void -libelf_cvt_NOTE_tom(char *dst, char *src, size_t count, int byteswap) +static int +libelf_cvt_NOTE_tom(char *dst, size_t dsz, char *src, size_t count, + int byteswap) { uint32_t namesz, descsz, type; Elf_Note *en; - size_t sz; + size_t sz, hdrsz; + + if (dsz < count) /* Destination buffer is too small. */ + return (0); - if (dst == src && !byteswap) - return; + hdrsz = 3 * sizeof(uint32_t); + if (count < hdrsz) /* Source too small. */ + return (0); if (!byteswap) { (void) memcpy(dst, src, count); - return; + return (1); } - while (count > sizeof(Elf_Note)) { - + /* Process all notes in the section. */ + while (count > hdrsz) { + /* Read the note header. */ READ_WORD(src, namesz); READ_WORD(src, descsz); READ_WORD(src, type); - if (byteswap) { - SWAP_WORD(namesz); - SWAP_WORD(descsz); - SWAP_WORD(type); - } + /* Translate. */ + SWAP_WORD(namesz); + SWAP_WORD(descsz); + SWAP_WORD(type); + /* Copy out the translated note header. */ en = (Elf_Note *) (uintptr_t) dst; en->n_namesz = namesz; en->n_descsz = descsz; en->n_type = type; + dsz -= sizeof(Elf_Note); dst += sizeof(Elf_Note); + count -= hdrsz; ROUNDUP2(namesz, 4); ROUNDUP2(descsz, 4); sz = namesz + descsz; - if (count < sz) - sz = count; + if (count < sz || dsz < sz) /* Buffers are too small. */ + return (0); (void) memcpy(dst, src, sz); src += sz; dst += sz; + count -= sz; } + + return (1); } -static void -libelf_cvt_NOTE_tof(char *dst, char *src, size_t count, int byteswap) +static int +libelf_cvt_NOTE_tof(char *dst, size_t dsz, char *src, size_t count, + int byteswap) { uint32_t namesz, descsz, type; Elf_Note *en; size_t sz; - if (dst == src && !byteswap) - return; + if (dsz < count) + return (0); if (!byteswap) { (void) memcpy(dst, src, count); - return; + return (1); } while (count > sizeof(Elf_Note)) { @@ -562,12 +595,9 @@ libelf_cvt_NOTE_tof(char *dst, char *src descsz = en->n_descsz; type = en->n_type; - if (byteswap) { - SWAP_WORD(namesz); - SWAP_WORD(descsz); - SWAP_WORD(type); - } - + SWAP_WORD(namesz); + SWAP_WORD(descsz); + SWAP_WORD(type); WRITE_WORD(dst, namesz); WRITE_WORD(dst, descsz); @@ -589,15 +619,21 @@ libelf_cvt_NOTE_tof(char *dst, char *src dst += sz; count -= sz; } + + return (1); } MAKE_TYPE_CONVERTERS(ELF_TYPE_LIST) struct converters { - void (*tof32)(char *dst, char *src, size_t cnt, int byteswap); - void (*tom32)(char *dst, char *src, size_t cnt, int byteswap); - void (*tof64)(char *dst, char *src, size_t cnt, int byteswap); - void (*tom64)(char *dst, char *src, size_t cnt, int byteswap); + int (*tof32)(char *dst, size_t dsz, char *src, size_t cnt, + int byteswap); + int (*tom32)(char *dst, size_t dsz, char *src, size_t cnt, + int byteswap); + int (*tof64)(char *dst, size_t dsz, char *src, size_t cnt, + int byteswap); + int (*tom64)(char *dst, size_t dsz, char *src, size_t cnt, + int byteswap); }; divert(-1) @@ -647,8 +683,8 @@ CONVERTER_NAMES(ELF_TYPE_LIST) } }; -void (*_libelf_get_translator(Elf_Type t, int direction, int elfclass)) - (char *_dst, char *_src, size_t _cnt, int _byteswap) +int (*_libelf_get_translator(Elf_Type t, int direction, int elfclass)) + (char *_dst, size_t dsz, char *_src, size_t _cnt, int _byteswap) { assert(elfclass == ELFCLASS32 || elfclass == ELFCLASS64); assert(direction == ELF_TOFILE || direction == ELF_TOMEMORY); Modified: head/lib/libelf/libelf_ehdr.c ============================================================================== --- head/lib/libelf/libelf_ehdr.c Wed Jul 21 10:14:04 2010 (r210337) +++ head/lib/libelf/libelf_ehdr.c Wed Jul 21 10:25:02 2010 (r210338) @@ -46,7 +46,7 @@ _libelf_load_extended(Elf *e, int ec, ui { Elf_Scn *scn; size_t fsz; - void (*xlator)(char *_d, char *_s, size_t _c, int _swap); + int (*xlator)(char *_d, size_t _dsz, char *_s, size_t _c, int _swap); uint32_t shtype; assert(STAILQ_EMPTY(&e->e_u.e_elf.e_scn)); @@ -63,7 +63,8 @@ _libelf_load_extended(Elf *e, int ec, ui return (0); xlator = _libelf_get_translator(ELF_T_SHDR, ELF_TOMEMORY, ec); - (*xlator)((char *) &scn->s_shdr, e->e_rawfile + shoff, (size_t) 1, + (*xlator)((char *) &scn->s_shdr, sizeof(scn->s_shdr), + e->e_rawfile + shoff, (size_t) 1, e->e_byteorder != LIBELF_PRIVATE(byteorder)); #define GET_SHDR_MEMBER(M) ((ec == ELFCLASS32) ? scn->s_shdr.s_shdr32.M : \ @@ -105,7 +106,7 @@ _libelf_ehdr(Elf *e, int ec, int allocat size_t fsz, msz; uint16_t phnum, shnum, strndx; uint64_t shoff; - void (*xlator)(char *_d, char *_s, size_t _c, int _swap); + int (*xlator)(char *_d, size_t _dsz, char *_s, size_t _c, int _swap); assert(ec == ELFCLASS32 || ec == ELFCLASS64); @@ -167,7 +168,7 @@ _libelf_ehdr(Elf *e, int ec, int allocat return (ehdr); xlator = _libelf_get_translator(ELF_T_EHDR, ELF_TOMEMORY, ec); - (*xlator)(ehdr, e->e_rawfile, (size_t) 1, + (*xlator)(ehdr, msz, e->e_rawfile, (size_t) 1, e->e_byteorder != LIBELF_PRIVATE(byteorder)); /* Modified: head/lib/libelf/libelf_phdr.c ============================================================================== --- head/lib/libelf/libelf_phdr.c Wed Jul 21 10:14:04 2010 (r210337) +++ head/lib/libelf/libelf_phdr.c Wed Jul 21 10:25:02 2010 (r210338) @@ -45,7 +45,7 @@ _libelf_getphdr(Elf *e, int ec) Elf32_Ehdr *eh32; Elf64_Ehdr *eh64; void *ehdr, *phdr; - void (*xlator)(char *_d, char *_s, size_t _c, int _swap); + int (*xlator)(char *_d, size_t _dsz, char *_s, size_t _c, int _swap); assert(ec == ELFCLASS32 || ec == ELFCLASS64); @@ -103,7 +103,7 @@ _libelf_getphdr(Elf *e, int ec) xlator = _libelf_get_translator(ELF_T_PHDR, ELF_TOMEMORY, ec); - (*xlator)(phdr, e->e_rawfile + phoff, phnum, + (*xlator)(phdr, phnum * msz, e->e_rawfile + phoff, phnum, e->e_byteorder != LIBELF_PRIVATE(byteorder)); return (phdr); Modified: head/lib/libelf/libelf_xlate.c ============================================================================== --- head/lib/libelf/libelf_xlate.c Wed Jul 21 10:14:04 2010 (r210337) +++ head/lib/libelf/libelf_xlate.c Wed Jul 21 10:25:02 2010 (r210338) @@ -48,6 +48,7 @@ Elf_Data * _libelf_xlate(Elf_Data *dst, const Elf_Data *src, unsigned int encoding, int elfclass, int direction) { + int byteswap; size_t cnt, dsz, fsz, msz; uintptr_t sb, se, db, de; @@ -132,12 +133,17 @@ _libelf_xlate(Elf_Data *dst, const Elf_D dst->d_type = src->d_type; dst->d_size = dsz; + byteswap = encoding != LIBELF_PRIVATE(byteorder); + if (src->d_size == 0 || - (db == sb && encoding == LIBELF_PRIVATE(byteorder) && fsz == msz)) + (db == sb && !byteswap && fsz == msz)) return (dst); /* nothing more to do */ - (_libelf_get_translator(src->d_type, direction, elfclass))(dst->d_buf, - src->d_buf, cnt, encoding != LIBELF_PRIVATE(byteorder)); + if (!(_libelf_get_translator(src->d_type, direction, elfclass)) + (dst->d_buf, dsz, src->d_buf, cnt, byteswap)) { + LIBELF_SET_ERROR(DATA, 0); + return (NULL); + } return (dst); } From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 10:34:03 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C84151065674; Wed, 21 Jul 2010 10:34:03 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 7BB318FC27; Wed, 21 Jul 2010 10:34:03 +0000 (UTC) Received: from ds4.des.no (des.no [84.49.246.2]) by smtp.des.no (Postfix) with ESMTP id 7D45E1FFC34; Wed, 21 Jul 2010 10:34:02 +0000 (UTC) Received: by ds4.des.no (Postfix, from userid 1001) id 58BB884513; Wed, 21 Jul 2010 12:34:02 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Alexey Dokuchaev References: <201007210843.o6L8hmo5064622@svn.freebsd.org> <20100721090623.GA21607@FreeBSD.org> Date: Wed, 21 Jul 2010 12:34:01 +0200 In-Reply-To: <20100721090623.GA21607@FreeBSD.org> (Alexey Dokuchaev's message of "Wed, 21 Jul 2010 09:06:23 +0000") Message-ID: <86sk3dqg2u.fsf@ds4.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Kai Wang Subject: Re: svn commit: r210321 - head/lib/libelf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 10:34:03 -0000 Alexey Dokuchaev writes: > Obtained from: somewhere > MFC after: sometime > Foo bar: baz qux ... > > Broken alignment considerably pessimizes commit log grasping, as it > requires more post-processing work after reading it off. my ($tag, $value) =3D split(/:\s*/); but perhaps it's complicated in inferior programming languages? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 10:36:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 57084106566B; Wed, 21 Jul 2010 10:36:28 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 440348FC1B; Wed, 21 Jul 2010 10:36:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6LAaSSE090625; Wed, 21 Jul 2010 10:36:28 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6LAaSMx090623; Wed, 21 Jul 2010 10:36:28 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007211036.o6LAaSMx090623@svn.freebsd.org> From: Hiroki Sato Date: Wed, 21 Jul 2010 10:36:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210339 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 10:36:28 -0000 Author: hrs Date: Wed Jul 21 10:36:27 2010 New Revision: 210339 URL: http://svn.freebsd.org/changeset/base/210339 Log: Add relnotes item for 8.1R (first round): ddb(4) show mount improved, fcntl(2) F_READAHEAD and F_RDAHEAD added, lindev(4) added, more dtrace probes, SMP support in PowerPC G5, ULE %CPU fix, VIMAGE + SCTP build fix, vfs.root.mountfrom space-separated list support added, loader(8) memory range selection improved, zfsloader added, zfsboot and gptboot added, adb(4) supports taps on ADB touchpad, apt(4) added, uart(4) NetMos NM9865 support added, bge(4) 5761, 5784, 57780 support added, cxgb(4) updated to T3 firmware 7.8.0, msk(4) 88E8042, 88E8057 and DGE-560SX support added, re(4) unnecessary reinitialization eliminated, tsec(4) now supports ALTQ, urtw(4) now supports RTL8187B, net.inet.ipcomp.ipcomp_enable=1 by default, IPV6_V6ONLY by default for IPv6 sockets in Linux emulation, gmirror(8) priority change support, gmirror(8) "load" balancing algorithm improved and now used as default, "option ATA_CAM" added, ata(4) fix for interrupt storms/command timeouts added, ata(4) umass support removed, ahd(4) error counter improved, cam(3) SATA/PATA support improved, bsnmpd(1) high CPU load issue fixed, bzip2(1) multi-session bzip2 file handling fixed, ee(1) crach fixed, factor(6) performance issue fixed, fetch(1) NO_PROXY handling fixed, ifconfig(8) now supports NDP flag handling, ntpd(8) no longer attempts to bind IPv6 anycast addresses, unifdef(1) updated to 1.188, ENOTCAPABLE new errno, rc.d/static_arp added, and ISC BIND 9.6.1-P2. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Jul 21 10:25:02 2010 (r210338) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Jul 21 10:36:27 2010 (r210339) @@ -201,16 +201,94 @@ + The show mount command in the + &man.ddb.4; debugger now prints active string mount + options. + + Two commands to enable/disable read-ahead has been added + to &man.fcntl.2; system call: + + + + F_READAHEAD specifies the amount + for sequential access. The amount is specified in bytes and is + rounded up to nearest block size. + + + + F_RDAHEAD is a Darwin compatible + version that use 128KB as the sequential access + size. + + + + Note that the read-ahead amount is also constrainted by + sysctl variable vfs.read_max, which may + need to be raised in order to better utilize this + feature. + + The &man.lindev.4; driver has been added. This is for + supporting various linux-specific pseudo devices such as + /dev/full. Note that this is not + included in GENERIC kernel. + + New SDT (Statically Defined Tracing) probes such as ones + for opencrypto have been added to &os; &man.dtrace.1; + subsystem. + + &os; now supports SMP in PowerPC G5 + systems. Note that SMP support is disabled by default in + GENERIC kernel. + + A bug in the &man.sched.ule.4; scheduler which prevented + process usage (%CPU) from working correctly + has been fixed. + + The VIMAGE &man.jail.8; virtualization container can work + with &man.sctp.4; now. Note that the VIMAGE is not enabled by + default in GENERIC kernel. + Boot Loader Changes + A kernel environment variable + vfs.root.mountfrom now supports + multiple elements for root file system in a space-separated + list. Each list element will be tried in order and the + first available one will be mounted. + + The algorithm the &man.loader.8; uses has + been improved to choose a memory range for its heap when + using a range above 1MB. This fixes a symptom that the + loader fails to load a kernel. + + The zfsloader has been added. This + is a separate &man.zfs.8; enabled loader. Note that a ZFS + bootcode (zfsboot or + gptzfsboot) need to be installed + to use this new loader. + + The zfsboot and + gptzfsboot bootcode now fully support + 64-bit LBAs for disk addresses. This allows booting from + large volumes. + Hardware Support - + The adb driver now + supports for interpreting taps on ADB touchpads as a button + click. + + The apt driver for + the Apple Touchpad present on MacBook has been added to + GENERIC kernel. + + The &man.uart.4; driver now supports NetMos NM9865 + family of Serial/Parallel ports. Multimedia Support @@ -222,6 +300,24 @@ Network Interface Support + + The &man.bge.4; driver now supports 5761, 5784, and + 57780-based devices. + + The &man.cxgb.4; driver has been updated to T3 + firmware 7.8.0. + + The &man.msk.4; driver now supports Marvell Yukon + 88E8042, 88E8057 devices and DGE-560SX (Yukon XL). + + The &man.re.4; driver no longer performs an + unnecessary interface up/down during getting IP address + via DHCP. + + The tsec(4) driver now supports &man.altq.4;. + + The &man.urtw.4; driver has been improved and now + supports RTL8187B-based devices. @@ -229,12 +325,82 @@ Network Protocols + + IPcomp (IP Payload Compression Protocol defined in RFC + 2393) protocol is now enabled by default. Note that this + requires in the kernel + configuration file and GENERIC kernel + does not include it. This functionality can be disabled by + using a sysctl variable + net.inet.ipcomp.ipcomp_enable. + + IPv6 sockets in Linux emulation environment are + unconditionally set as IPV6_V6ONLY + regardless of net.inet6.ip6.v6only sysctl + variable.
Disks and Storage + + The &man.gmirror.8; utility now supports + configure + priority command to + change the providers priority. + + The balancing mode algorithm load + used in the &man.gmirror.8; utility has been changed and it + is now the default one instead of + split: + + + + Instead of measuring last request execution time for + each drive and choosing one with smallest time, use + averaged number of requests, running on each drive. This + information is more accurate and timely. It allows to + distribute load between drives in more even and + predictable way. + + + + For each drive track offset of the last submitted + request. If new request offset matches previous one or + close for some drive, prefer that drive. It allows to + significantly speedup simultaneous sequential reads. + + + + A new kernel option has + been added. This turns &man.ata.4; controller drivers into + &man.cam.4; interface modules. When enabled, this option + deprecates all &man.ata.4; peripheral drivers and interfaces + such as ad and + acd, and allows &man.cam.4; drivers + ada, and cd and + interfaces to be natively used instead. Note that this is + not enabled by default in the GENERIC + kernel. + + A bug in the &man.ata.4; driver which can lead to + interrupt storms and command timeouts. + + USB mass storage device support in the &man.ata.4; + driver has been removed. Note that this was not used in + GENERIC kernel and the &man.umass.4; + driver supports such devices for a long time. + + The &man.ahd.4; driver now supports three separated + error counters for correctable, uncorrectable, and fatal, in + &man.sysctl.8; MIB. + + SATA and PATA support of &os; &man.cam.3; SCSI framework + has been improved and it now recognizes more detail device + capabilities. For example, the &man.ahci.4; and + &man.siis.4; driver now reports maximum tag number to the + framework to optimize the NCQ handling. @@ -247,12 +413,47 @@ Userland Changes - + A bug in &man.bsnmpd.1; program which leads to high CPU + consumption on a loaded system has been fixed. + + A bug in &man.bzip2.1; utility which prevented it from + working with multi-session bzip2 files. + + A bug in &man.ee.1; utility which can crash the + program has been fixed. + + A bug in &man.factor.6; utility which leads to performance + degradation has been fixed. + + A bug in &man.fetch.1; utility which incorrectly evaluates + a variable NO_PROXY has been fixed. + + The &man.ifconfig.8; utility now supports manipulation of + NDP flags handled by &man.ndp.8;. + + The &man.ntpd.8; program no longer tries to bind to an + IPv6 anycast address. + + The &man.unifdef.1; utility has been updated to version + 1.188. It now supports a new flag to + compress blank lines around a deleted section to prevent blank + lines around paragraphs of code from getting doubled. + + A new errno ENOTCAPABLE has been added. + This is to be returned when a process requests an operation on + a file descriptor that is not authorized by the descriptor's + capability flags. <filename>/etc/rc.d</filename> Scripts + + A new rc.d script + static_arp has been added. This allows + the administrator to statically define mappings of MAC + address to IPv4 at boot time. See also the &man.rc.conf.5; + manual page for more details. @@ -260,9 +461,10 @@ Contributed Software + + ISC BIND has been updated to + version 9.6.1-P2.
From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 20:38:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B25A41065679; Wed, 21 Jul 2010 20:38:45 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A12248FC18; Wed, 21 Jul 2010 20:38:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6LKcj6s032097; Wed, 21 Jul 2010 20:38:45 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6LKcjg2032095; Wed, 21 Jul 2010 20:38:45 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007212038.o6LKcjg2032095@svn.freebsd.org> From: Hiroki Sato Date: Wed, 21 Jul 2010 20:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210360 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 20:38:45 -0000 Author: hrs Date: Wed Jul 21 20:38:45 2010 New Revision: 210360 URL: http://svn.freebsd.org/changeset/base/210360 Log: Fix missing words. Spotted by: pluknet at gmail.com Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Jul 21 20:32:22 2010 (r210359) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Jul 21 20:38:45 2010 (r210360) @@ -669,7 +669,7 @@ consumption on a loaded system has been fixed.
A bug in &man.bzip2.1; utility which prevented it from - working with multi-session bzip2 files. + working with multi-session bzip2 files has been fixed. The &man.camcontrol.8; utility now supports a flag in the subcommand From owner-svn-src-all@FreeBSD.ORG Wed Jul 21 21:23:24 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 343DD106564A; Wed, 21 Jul 2010 21:23:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 2390F8FC13; Wed, 21 Jul 2010 21:23:24 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6LLNOKE042086; Wed, 21 Jul 2010 21:23:24 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6LLNONb042084; Wed, 21 Jul 2010 21:23:24 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201007212123.o6LLNONb042084@svn.freebsd.org> From: Andrew Turner Date: Wed, 21 Jul 2010 21:23:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210361 - head/share/misc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jul 2010 21:23:24 -0000 Author: andrew Date: Wed Jul 21 21:23:23 2010 New Revision: 210361 URL: http://svn.freebsd.org/changeset/base/210361 Log: - Add myself to committers-src.dot Approved by: imp (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Wed Jul 21 20:38:45 2010 (r210360) +++ head/share/misc/committers-src.dot Wed Jul 21 21:23:23 2010 (r210361) @@ -58,6 +58,7 @@ akiyama [label="Shunsuke Akiyama\nakiyam ambrisko [label="Doug Ambrisko\nambrisko@FreeBSD.org\n2001/12/19"] anchie [label="Ana Kukec\nanchie@FreeBSD.org\n2010/04/14"] andre [label="Andre Oppermann\nandre@FreeBSD.org\n2003/11/12"] +andrew [label="Andrew Turner\nandrew@FreeBSD.org\n2010/07/19"] anholt [label="Eric Anholt\nanholt@FreeBSD.org\n2002/04/22"] antoine [label="Antoine Brodin\nantoine@FreeBSD.org\n2008/02/03"] ariff [label="Ariff Abdullah\nariff@FreeBSD.org\n2005/11/14"] From owner-svn-src-all@FreeBSD.ORG Thu Jul 22 01:01:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 086421065674; Thu, 22 Jul 2010 01:01:17 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E8A5B8FC12; Thu, 22 Jul 2010 01:01:16 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6M11G0g090507; Thu, 22 Jul 2010 01:01:16 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6M11Guh090505; Thu, 22 Jul 2010 01:01:16 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007220101.o6M11Guh090505@svn.freebsd.org> From: Hiroki Sato Date: Thu, 22 Jul 2010 01:01:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210362 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 01:01:17 -0000 Author: hrs Date: Thu Jul 22 01:01:16 2010 New Revision: 210362 URL: http://svn.freebsd.org/changeset/base/210362 Log: New release notes: ddb(4) show vnetrcrs, sched_4bsd race fix, pfil(9) virtualization, ahci(4) Marvell 88SE912x support, ahci(4) FBS support in PM, ata(4) PUIS support, cam(3) kern.cam.boot_delay, error recovery improvement, gmultipath(8) destroy subcommand added, isp(4) improved, siis(4) Max Read Request Size increased, nfsiod(8) race fixed, ffs(7) inode number is now unsigned, cp(1) -x added, fsck_ffs(8) UFS1 last cylinder group issue fixed, ifconfig(8) description support added, netstat(1) -q option added, restore(8) -P shot read issue fixed, rtsold(8) -a improved, strsignal(3) thread-safe, sysctl(8) -i added, rc.d/rtsold added, firewall_coscripts in rc.conf added, and ISC BIND 9.6.1-P3. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Wed Jul 21 21:23:23 2010 (r210361) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jul 22 01:01:16 2010 (r210362) @@ -205,6 +205,11 @@ &man.ddb.4; debugger now prints active string mount options. + The &man.ddb.4; now supports show + vnetrcrs command to dump the whole log of + distinctive curvnet recursion + events. + The default &man.devfs.5; rules now expose the upper 256 of &man.pty.4; device nodes. @@ -267,6 +272,9 @@ timestamp for the sleeping operation is not cleaned up on the wakeup has been fixed. + A race condition in the &man.sched.4bsd.4; scheduler has + been fixed. + A bug in the &man.sched.ule.4; scheduler which prevented process usage (%CPU) from working correctly has been fixed. @@ -521,6 +529,10 @@ check. This feature is in the latest version of pf. + The &man.pfil.9; framework for packet filtering in &os; + kernel now supports separate packet filtering instances like + &man.ipfw.4; for each VIMAGE jail. + A bug that proxy ARP entries cannot be added over point-to-point link types has been fixed. @@ -551,6 +563,70 @@ /dev/ada1, for example. + The &man.ahci.4; driver now supports SATA part of + Marvell 88SE912x controllers. + + The &man.ahci.4; driver now supports FIS-based (Frame + Information Structure) switching of port multiplier on + supported controlers. + + The &man.ahd.4; driver now supports three separated + error counters for correctable, uncorrectable, and fatal, in + &man.sysctl.8; MIB. + + A new kernel option has + been added. This turns &man.ata.4; controller drivers into + &man.cam.4; interface modules. When enabled, this option + deprecates all &man.ata.4; peripheral drivers and interfaces + such as ad and + acd, and allows &man.cam.4; drivers + ada, and cd and + interfaces to be natively used instead. Note that this is + not enabled by default in the GENERIC + kernel. + + A bug in the &man.ata.4; driver which can lead to + interrupt storms and command timeouts has been fixed. + + The &man.ata.4; driver now supports Power-Up In Stand-by + (PUIS). The PUIS is a configudation of SATA or PATA drives + to prevent them from automatic spin-up when power is + applied. This feature can be controled via &man.cam.3; + framework (a typical application is staggered + spin-up). + + USB mass storage device support in the &man.ata.4; + driver has been removed. Note that this was not used in + GENERIC kernel and the &man.umass.4; + driver supports such devices for a long time. + + &os; &man.cam.3; SCSI framework has been improved: + + + + SATA and PATA support has been improved and it now + recognizes more detail device capabilities. For example, + the &man.ahci.4; and &man.siis.4; driver now reports maximum + tag number to the framework to optimize the NCQ + handling. + + + + A loader tunable + kern.cam.boot_delay has been added. + This controls the delay time before &man.cam.3; probes + the attached devices. + + + + SCSI error recovery for devices on buses without + automatic sense reporting has been improved. Typical + devices are on ATAPI and USB. For example, this allows + &man.cam.3; to wait, while CD drive loads disk, instead + of immediately return error status. + + + A bug in the &man.fdc.4; driver which prevents the kernel module from unloading has been fixed. @@ -588,6 +664,9 @@ + The &man.gmultipath.8; utility now supports + destroy command. + A bug in the &man.graid3.8; which causes a panic when a large request arrives has been fixed. This happens when MAXPHYS is set as larger than 128k. @@ -595,34 +674,12 @@ The default block size of &man.gstripe.8; has been increased from 4k to 64k. - A new kernel option has - been added. This turns &man.ata.4; controller drivers into - &man.cam.4; interface modules. When enabled, this option - deprecates all &man.ata.4; peripheral drivers and interfaces - such as ad and - acd, and allows &man.cam.4; drivers - ada, and cd and - interfaces to be natively used instead. Note that this is - not enabled by default in the GENERIC - kernel. + The &man.isp.4; driver has been improved in + stability. - A bug in the &man.ata.4; driver which can lead to - interrupt storms and command timeouts has been fixed. - - USB mass storage device support in the &man.ata.4; - driver has been removed. Note that this was not used in - GENERIC kernel and the &man.umass.4; - driver supports such devices for a long time. - - The &man.ahd.4; driver now supports three separated - error counters for correctable, uncorrectable, and fatal, in - &man.sysctl.8; MIB. - - SATA and PATA support of &os; &man.cam.3; SCSI framework - has been improved and it now recognizes more detail device - capabilities. For example, the &man.ahci.4; and - &man.siis.4; driver now reports maximum tag number to the - framework to optimize the NCQ handling. + The Max Read Request Size in the &man.siis.4; driver for + PCIe chips has been increased from 512 to 1024 bytes for + better performance. @@ -639,6 +696,20 @@ to 0 disables negative name caching for the mount point. + A race condition in &os; NFS subsystem that occurs when + &man.nfsiod.8; threads are being created has been fixed. + This also fixes an interoperability issue found in + combination of a &os; NFS client and a Linux NFS + server. + + The inode number handling in &man.ffs.7; file system is + now unsigned. Previously some large inode numbers can be + treated as negative, and this issue shows up at file systems + with the size of more than 16Tb in 16k block case. The + &man.newfs.8; utility never create a file system with more + than 2^32 inodes by cutting back on the number of inodes per + cylinder group if necessary to stay under the limit. + &os; &man.VFS.9; subsystem now supports a new sysctl variable vfs.vlru_allow_cache_src. This allow vnlru kernel thread to reclaim @@ -676,6 +747,9 @@ identify. It displays whole of identify data block. + The &man.cp.1; now supports a flag to + make it not traverse across multiple mount points. + The &man.cp.1;, &man.find.1;, &man.getfacl.1;, &man.mv.1;, and &man.setfacl.1; utilities now support NFSv4 ACL. @@ -695,15 +769,36 @@ A bug in &man.fetch.1; utility which incorrectly evaluates a variable NO_PROXY has been fixed. + A bug in the &man.fsck.ffs.8; utility which causes the + last cylinder group of a UFS1 file system is always reported + as broken even after it is fixed. + The &man.gcore.1; utility now recognizes threads in the process and handles dumps on a thread scope. The &man.ifconfig.8; utility now supports manipulation of NDP flags handled by &man.ndp.8;. + The &man.ifconfig.8; utility now supports a + description + value command to add a + description value to the specified + interface. + + The &man.mount.nfs.8; utility now supports + [ipaddr]:path + notation in addition to the existing one. This allows IPv6 + address in the address field, and a path including + : to be mounted. + The &man.netstat.1; utility now supports ARP information in statistics shown by the flag. + The &man.netstat.1; utility now supports a option to specify + the number of outputs. This is used in conjunction with + option. + The &man.newsyslog.8; utility does not consider non-existence of a PID file as an error now. A new flag reverts it to the old behavior. @@ -715,6 +810,15 @@ to the Solaris utility of the same name, and waits for any process to terminate. + A bug in the &man.restore.8; utility which caused short + reads when a option was used has been + fixed. + + The &man.rtsold.8; flag now excludes + the interfaces which IPv6 or accepting ICMPv6 Router + Advertisement message is disabled from the auto-probed + interface list. + The &man.scandir.3; and &man.alphasort.3; functions has been updated to conform POSIX.1-2008 (IEEE Std 1003.1-2008). @@ -736,6 +840,15 @@ available memory becomes short. This kind of process termination happens in a swap-intensive workload. + The &man.strsignal.3; function is now thread-safe. + + The &man.sysctl.8; utility now supports a + flag to ignore failures while retrieving + individual OIDs. This allows the same list of OIDs to be + passed to &man.sysctl.8; across different systems where + particular OIDs may not exist, and still get as much + information as possible from them. + The &man.traceroute.8; utility now performs source address selection correctly even in a VIMAGE &man.jail.8; environment. @@ -774,11 +887,20 @@ rc.d system. A new rc.d script + rtsold has been added. This handles + &man.rtsold.8; daemon. + + A new rc.d script static_arp has been added. This allows the administrator to statically define mappings of MAC address to IPv4 at boot time. See also the &man.rc.conf.5; manual page for more details. + The &man.rc.conf.5; now supports a + firewall_coscripts variable. This should + contain a list of commands which should be excuted after + firewall starts or stops. + The &man.rc.conf.5; now supports configuring &man.vlan.4; interfaces as child devices similar to &man.wlan.4; interfaces. &man.vlan.4; interfaces are listed @@ -807,7 +929,7 @@ the 23 October 2007 release to the 26 November 2009 release. ISC BIND has been updated to - version 9.6.1-P2. + version 9.6.1-P3. netcat has been updated to version 4.6. From owner-svn-src-all@FreeBSD.ORG Thu Jul 22 01:14:34 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D862106566C; Thu, 22 Jul 2010 01:14:34 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1B8EA8FC21; Thu, 22 Jul 2010 01:14:34 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6M1EXY3093470; Thu, 22 Jul 2010 01:14:33 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6M1EXBN093468; Thu, 22 Jul 2010 01:14:33 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007220114.o6M1EXBN093468@svn.freebsd.org> From: Hiroki Sato Date: Thu, 22 Jul 2010 01:14:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210363 - stable/8/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 01:14:34 -0000 Author: hrs Date: Thu Jul 22 01:14:33 2010 New Revision: 210363 URL: http://svn.freebsd.org/changeset/base/210363 Log: Document two possible errata. Modified: stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Thu Jul 22 01:01:16 2010 (r210362) +++ stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Thu Jul 22 01:14:33 2010 (r210363) @@ -216,6 +216,17 @@ Late-Breaking News and Corrections - No news. + A deadlock can occur in UFS with the QUOTA enabled due to a + lock order reversal. This problem has been fixed in r209367 + (HEAD). An Errata Notice for &release.bugfix; is + planned. + + A legacy device detection in the &man.ata.4; can fail in + some cases. Specifically, Marvell 88SX6141 controllers can + cause attach failure or panic. This problem has been fixed in + r210168 + (HEAD). An Errata Notice for &release.bugfix; is + planned. From owner-svn-src-all@FreeBSD.ORG Thu Jul 22 00:11:16 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8530010656B6; Thu, 22 Jul 2010 00:11:16 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 14EB98FC19; Thu, 22 Jul 2010 00:11:15 +0000 (UTC) Received: by pzk7 with SMTP id 7so2795431pzk.13 for ; Wed, 21 Jul 2010 17:11:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=Wi1Lf0Mfu6hr5RuFG9TQhgU9Az2IFuzybsHBpkaxXe8=; b=FQLFtoe/aeQV5BD+vH7Hj952mUlNxZ3vRuhQHR+Hmsh96hIm3KLi8Mj22HWVNXfi/F 8GfE8vJlgrCxtLsNVCt2cDnjcAC2ZBdyljvTu7wIv7yMH2pV7kD2kwfUQeWpwG8/6TYs lhDQHYy6D+lvRArlXix61SyV4VQWIhBaOFLbs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=Bjri2RpFKWQyyhoxBwJBWgsx84aVxSopRqioefCIdOX1OQhDJg8Fxnx9RsE3lVv43K p4n9V9v6XqXvedTRfc7nbx79aa1zQjer4r0eh0eW2IaP8k1HYi9F+WH9IGO7cBmTsMiA SUePXAkOnORLTWZx4fy14Nvs5bYhkxXIarZu0= Received: by 10.142.164.14 with SMTP id m14mr1189826wfe.152.1279757475291; Wed, 21 Jul 2010 17:11:15 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id 23sm9684968wfa.10.2010.07.21.17.11.13 (version=TLSv1/SSLv3 cipher=RC4-MD5); Wed, 21 Jul 2010 17:11:13 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Wed, 21 Jul 2010 17:10:25 -0700 From: Pyun YongHyeon Date: Wed, 21 Jul 2010 17:10:25 -0700 To: Anders Nordby Message-ID: <20100722001025.GF10798@michelle.cdnetworks.com> References: <201006101804.o5AI4PEX024259@svn.freebsd.org> <20100629074831.GA75332@fupp.net> <1277820825.55649.7.camel@bauer.cse.buffalo.edu> <20100701215218.GC7090@michelle.cdnetworks.com> <20100720215224.GA47151@fupp.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100720215224.GA47151@fupp.net> User-Agent: Mutt/1.4.2.3i X-Mailman-Approved-At: Thu, 22 Jul 2010 01:20:48 +0000 Cc: src-committers@freebsd.org, re@FreeBSD.org, Ken Smith , jdc@parodius.com, svn-src-stable@freebsd.org, svn-src-all@freebsd.org, svn-src-stable-7@freebsd.org, marcel@freebsd.org, Pyun YongHyeon Subject: Re: svn commit: r208995 - stable/7/sys/dev/bge X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 00:11:16 -0000 On Tue, Jul 20, 2010 at 11:52:24PM +0200, Anders Nordby wrote: > Hi, > > On Thu, Jul 01, 2010 at 02:52:18PM -0700, Pyun YongHyeon wrote: > >> > Is it possible to get this fix into FreeBSD 7.3-RELEASE? > >> We typically rely on developers to decide if fixes might warrant > >> consideration as an Errata Notice and send email to re@ suggesting > >> it. It's hard for us to judge on our own - factors include things > >> like the individual developers' confidence level in the fix, etc. > > Even though I didn't receive positive feedback from jumbo frame > > users I'm pretty sure the change set will fix regression introduced > > in r199011. As you might know, the bug was not detected for a very > > long time(about 6 months) so I think it's better to wait 2 or 3 > > weeks to get more confidence on the patch. > > Ok, so it's been 19 days since your mail. And much longer since june 10, > when you fixed it in RELENG_7 and RELENG_8. Do you feel OK with the > patch by now? My experience with the patch on production systems is > entirely positive. > > Would be great to have this fix in 7.3. Only 7.3 has this bug. I can > send the reports of my problems to re@ if you are OK with putting this > into the release. > Ok, thanks for reminding this. I also agree that bge(4) errata for 7.3-RELEASE would be good thing. Do I need to send another official mail to re@ for the details of bug(CCed to re@)? From owner-svn-src-all@FreeBSD.ORG Thu Jul 22 01:23:39 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDC6B106566C; Thu, 22 Jul 2010 01:23:39 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id B29158FC16; Thu, 22 Jul 2010 01:23:39 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6M1Ndwi095558; Thu, 22 Jul 2010 01:23:39 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6M1NdVu095555; Thu, 22 Jul 2010 01:23:39 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201007220123.o6M1NdVu095555@svn.freebsd.org> From: Ed Maste Date: Thu, 22 Jul 2010 01:23:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210364 - stable/8/games/pom X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 01:23:40 -0000 Author: emaste Date: Thu Jul 22 01:23:39 2010 New Revision: 210364 URL: http://svn.freebsd.org/changeset/base/210364 Log: MFC r210089: Add -p option to have pom(6) print just the percentage, without extra text. PR: bin/51070 Submitted by: Matt Koivisto mkoivisto sandvine com Modified: stable/8/games/pom/pom.6 stable/8/games/pom/pom.c Directory Properties: stable/8/games/pom/ (props changed) Modified: stable/8/games/pom/pom.6 ============================================================================== --- stable/8/games/pom/pom.6 Thu Jul 22 01:14:33 2010 (r210363) +++ stable/8/games/pom/pom.6 Thu Jul 22 01:23:39 2010 (r210364) @@ -32,7 +32,7 @@ .\" @(#)pom.6 8.1 (Berkeley) 5/31/93 .\" $FreeBSD$ .\" -.Dd May 31, 1993 +.Dd July 14, 2010 .Dt POM 6 .UC 7 .Sh NAME @@ -40,6 +40,7 @@ .Nd display the phase of the moon .Sh SYNOPSIS .Nm +.Op Fl p .Op Fl d Ar yyyy.mm.dd .Op Fl t Ar hh:mm:ss .Sh DESCRIPTION @@ -49,6 +50,10 @@ utility displays the current phase of th Useful for selecting software completion target dates and predicting managerial behavior. .Pp +Use the +.Fl p +option to print just the phase as a percentage. +.Pp Use the arguments .Fl d and Modified: stable/8/games/pom/pom.c ============================================================================== --- stable/8/games/pom/pom.c Thu Jul 22 01:14:33 2010 (r210363) +++ stable/8/games/pom/pom.c Thu Jul 22 01:23:39 2010 (r210364) @@ -88,14 +88,17 @@ main(int argc, char **argv) time_t tt; struct tm GMT, tmd; double days, today, tomorrow; - int ch, cnt; + int ch, cnt, pflag = 0; char *odate = NULL, *otime = NULL; - while ((ch = getopt(argc, argv, "d:t:")) != -1) + while ((ch = getopt(argc, argv, "d:pt:")) != -1) switch (ch) { case 'd': odate = optarg; break; + case 'p': + pflag = 1; + break; case 't': otime = optarg; break; @@ -138,6 +141,10 @@ main(int argc, char **argv) for (cnt = EPOCH; cnt < GMT.tm_year; ++cnt) days += isleap(1900 + cnt) ? 366 : 365; today = potm(days) + .5; + if (pflag) { + (void)printf("%1.0f\n", today); + return (0); + } (void)printf("The Moon is "); if ((int)today == 100) (void)printf("Full\n"); @@ -231,6 +238,7 @@ static void usage(char *progname) { - fprintf(stderr, "Usage: %s [-d yyyy.mm.dd] [-t hh:mm:ss]\n", progname); + fprintf(stderr, "Usage: %s [-p] [-d yyyy.mm.dd] [-t hh:mm:ss]\n", + progname); exit(EX_USAGE); } From owner-svn-src-all@FreeBSD.ORG Thu Jul 22 05:42:30 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B608106566C; Thu, 22 Jul 2010 05:42:30 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 30C488FC08; Thu, 22 Jul 2010 05:42:30 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6M5gUtK053424; Thu, 22 Jul 2010 05:42:30 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6M5gUia053418; Thu, 22 Jul 2010 05:42:30 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007220542.o6M5gUia053418@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 22 Jul 2010 05:42:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210365 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 05:42:30 -0000 Author: trasz Date: Thu Jul 22 05:42:29 2010 New Revision: 210365 URL: http://svn.freebsd.org/changeset/base/210365 Log: Remove spurious '/*-' marks and fix some other style problems. Submitted by: bde@ Modified: head/sys/kern/init_main.c head/sys/kern/uipc_usrreq.c head/sys/sys/disk.h head/sys/sys/kthread.h head/sys/sys/signal.h head/sys/sys/types.h Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Thu Jul 22 01:23:39 2010 (r210364) +++ head/sys/kern/init_main.c Thu Jul 22 05:42:29 2010 (r210365) @@ -539,10 +539,9 @@ proc0_init(void *dummy __unused) vm_map_init(&vmspace0.vm_map, vmspace_pmap(&vmspace0), p->p_sysent->sv_minuser, p->p_sysent->sv_maxuser); - /*- - * call the init and ctor for the new thread and proc - * we wait to do this until all other structures - * are fairly sane. + /* + * Call the init and ctor for the new thread and proc. We wait + * to do this until all other structures are fairly sane. */ EVENTHANDLER_INVOKE(process_init, p); EVENTHANDLER_INVOKE(thread_init, td); Modified: head/sys/kern/uipc_usrreq.c ============================================================================== --- head/sys/kern/uipc_usrreq.c Thu Jul 22 01:23:39 2010 (r210364) +++ head/sys/kern/uipc_usrreq.c Thu Jul 22 05:42:29 2010 (r210365) @@ -165,7 +165,7 @@ SYSCTL_ULONG(_net_local_seqpacket, OID_A SYSCTL_INT(_net_local, OID_AUTO, inflight, CTLFLAG_RD, &unp_rights, 0, "File descriptors in flight."); -/*- +/* * Locking and synchronization: * * Three types of locks exit in the local domain socket implementation: a Modified: head/sys/sys/disk.h ============================================================================== --- head/sys/sys/disk.h Thu Jul 22 01:23:39 2010 (r210364) +++ head/sys/sys/disk.h Thu Jul 22 05:42:29 2010 (r210365) @@ -25,41 +25,41 @@ void disk_err(struct bio *bp, const char #endif -#define DIOCGSECTORSIZE _IOR('d', 128, u_int) - /*- - * Get the sectorsize of the device in bytes. The sectorsize is the - * smallest unit of data which can be transfered from this device. - * Usually this is a power of two but it may not be. (ie: CDROM audio) +#define DIOCGSECTORSIZE _IOR('d', 128, u_int) + /* + * Get the sector size of the device in bytes. The sector size is the + * smallest unit of data which can be transferred from this device. + * Usually this is a power of 2 but it might not be (i.e. CDROM audio). */ -#define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */ - /*- +#define DIOCGMEDIASIZE _IOR('d', 129, off_t) /* Get media size in bytes */ + /* * Get the size of the entire device in bytes. This should be a - * multiple of the sectorsize. + * multiple of the sector size. */ -#define DIOCGFWSECTORS _IOR('d', 130, u_int) /* Get firmware sectorcount */ - /*- - * Get the firmwares notion of number of sectors per track. This +#define DIOCGFWSECTORS _IOR('d', 130, u_int) /* Get firmware's sectorcount */ + /* + * Get the firmware's notion of number of sectors per track. This * value is mostly used for compatibility with various ill designed * disk label formats. Don't use it unless you have to. */ -#define DIOCGFWHEADS _IOR('d', 131, u_int) /* Get firmware headcount */ - /*- +#define DIOCGFWHEADS _IOR('d', 131, u_int) /* Get firmware's headcount */ + /* * Get the firmwares notion of number of heads per cylinder. This * value is mostly used for compatibility with various ill designed * disk label formats. Don't use it unless you have to. */ -#define DIOCSKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */ - /*- +#define DIOCSKERNELDUMP _IOW('d', 133, u_int) /* Set/Clear kernel dumps */ + /* * Enable/Disable (the argument is boolean) the device for kernel * core dumps. */ -#define DIOCGFRONTSTUFF _IOR('d', 134, off_t) - /*- +#define DIOCGFRONTSTUFF _IOR('d', 134, off_t) + /* * Many disk formats have some amount of space reserved at the * start of the disk to hold bootblocks, various disklabels and * similar stuff. This ioctl returns the number of such bytes @@ -67,12 +67,12 @@ void disk_err(struct bio *bp, const char */ #define DIOCGFLUSH _IO('d', 135) /* Flush write cache */ - /*- + /* * Flush write cache of the device. */ #define DIOCGDELETE _IOW('d', 136, off_t[2]) /* Delete data */ - /*- + /* * Mark data on the device as unused. */ @@ -98,22 +98,22 @@ void disk_err(struct bio *bp, const char * - ident is optional and applications can't relay on its presence. */ -#define DIOCGPROVIDERNAME _IOR('d', 138, char[MAXPATHLEN]) - /*- +#define DIOCGPROVIDERNAME _IOR('d', 138, char[MAXPATHLEN]) + /* * Store the provider name, given a device path, in a buffer. The buffer * must be at least MAXPATHLEN bytes long. */ -#define DIOCGSTRIPESIZE _IOR('d', 139, off_t) /* Get stripe size in bytes */ - /*- +#define DIOCGSTRIPESIZE _IOR('d', 139, off_t) /* Get stripe size in bytes */ + /* * Get the size of the device's optimal access block in bytes. - * This should be a multiple of the sectorsize. + * This should be a multiple of the sector size. */ -#define DIOCGSTRIPEOFFSET _IOR('d', 140, off_t) /* Get stripe offset in bytes */ - /*- +#define DIOCGSTRIPEOFFSET _IOR('d', 140, off_t) /* Get stripe offset in bytes */ + /* * Get the offset of the first device's optimal access block in bytes. - * This should be a multiple of the sectorsize. + * This should be a multiple of the sector size. */ #endif /* _SYS_DISK_H_ */ Modified: head/sys/sys/kthread.h ============================================================================== --- head/sys/sys/kthread.h Thu Jul 22 01:23:39 2010 (r210364) +++ head/sys/sys/kthread.h Thu Jul 22 05:42:29 2010 (r210365) @@ -31,7 +31,7 @@ #include -/*- +/* * A kernel process descriptor; used to start "internal" daemons. * * Note: global_procpp may be NULL for no global save area. Modified: head/sys/sys/signal.h ============================================================================== --- head/sys/sys/signal.h Thu Jul 22 01:23:39 2010 (r210364) +++ head/sys/sys/signal.h Thu Jul 22 05:42:29 2010 (r210365) @@ -122,7 +122,7 @@ /* #define SIG_CATCH ((__sighandler_t *)2) See signalvar.h */ #define SIG_HOLD ((__sighandler_t *)3) -/*- +/* * Type of a signal handling function. * * Language spec sez signal handlers take exactly one arg, even though we Modified: head/sys/sys/types.h ============================================================================== --- head/sys/sys/types.h Thu Jul 22 01:23:39 2010 (r210364) +++ head/sys/sys/types.h Thu Jul 22 05:42:29 2010 (r210365) @@ -287,12 +287,14 @@ typedef int boolean_t; typedef struct device *device_t; typedef __intfptr_t intfptr_t; -/*- +/* * XXX this is fixed width for historical reasons. It should have had type * __int_fast32_t. Fixed-width types should not be used unless binary * compatibility is essential. Least-width types should be used even less * since they provide smaller benefits. + * * XXX should be MD. + * * XXX this is bogus in -current, but still used for spl*(). */ typedef __uint32_t intrmask_t; /* Interrupt mask (spl, xxx_imask...) */ From owner-svn-src-all@FreeBSD.ORG Thu Jul 22 05:53:12 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B548C1065676; Thu, 22 Jul 2010 05:53:12 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9936D8FC16; Thu, 22 Jul 2010 05:53:12 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6M5rCfl055818; Thu, 22 Jul 2010 05:53:12 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6M5rCTU055816; Thu, 22 Jul 2010 05:53:12 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007220553.o6M5rCTU055816@svn.freebsd.org> From: Hiroki Sato Date: Thu, 22 Jul 2010 05:53:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210366 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jul 2010 05:53:12 -0000 Author: hrs Date: Thu Jul 22 05:53:12 2010 New Revision: 210366 URL: http://svn.freebsd.org/changeset/base/210366 Log: New relnotes item: syscons(4) history handling improved, X86BIOS added on i386/amd64, loader(8) U-Boot storage support [powerpc], smu(4) thermal management and monitoring [powerpc], tnt4882(4) now supports TNT5004, acpi_video(4) LCD brightness control notify handler support, acpi_sony(4) now supports brightness, wired LAN power, bass gain, ath(4) supports AR9285, bge(4) ASF heartbeat sending fixed, vlan(4) IFCAP_VLAN_HWTSO, ciss(4) livelock fixed, find(1) -newerXB fixed, procstat(1) -i/-j added, and tzdata2010e. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jul 22 05:42:29 2010 (r210365) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Thu Jul 22 05:53:12 2010 (r210366) @@ -221,7 +221,7 @@ kernel configuration file and recompilation of the kernel. - Two commands to enable/disable read-ahead has been added + Two commands to enable/disable read-ahead have been added to &man.fcntl.2; system call: @@ -279,6 +279,17 @@ process usage (%CPU) from working correctly has been fixed. + The &man.syscons.4; driver has been improved. The history + buffer can be fully saved/restored in the VESA mode switching + via a loader tunable + hint.sc.0.vesa_mode. + + An x86 real mode emulator based on + OpenBSD's x86emu implementation has been added to improve real + mode BIOS call support on both &arch.i386; and &arch.amd64;. + The &man.atkbdc.4;, &man.dpms.4;, vesa(4), &man.vga.4; driver + now use this emulator and work on the both platforms. + The VIMAGE &man.jail.8; virtualization container can work with &man.sctp.4; now. Note that the VIMAGE is not enabled by default in GENERIC kernel. @@ -306,6 +317,9 @@ default value of currdev. This option can be set by the EFI boot manager. + The &man.loader.8; program now supports + U-Boot storage. + A kernel environment variable vfs.root.mountfrom now supports multiple elements for root file system in a space-separated @@ -355,6 +369,15 @@ JBus to PCIe bridge (called as Fire) found in the Sun Fire V215/V245 and Sun Ultra 25/45 machines. + The &man.smu.4; driver now provides + thermal management and monitoring features. This allows fan + control and thermal monitoring on SMU-based Apple G5 + machines, as well as an &man.led.4; interface to control the + sleep LED. + + The &man.tnt4882.4; driver for IEEE-488 (GPIB) bus now + supports National Instruments TNT5004 chip. + The &man.uart.4; driver now supports NetMos NM9865 family of Serial/Parallel ports. @@ -366,6 +389,13 @@ + The &man.acpi.video.4; driver now supports LCD + brightness control notify handler. + + The &man.acpi.sony.4; helper driver now supports + default display brightness, wired LAN power, and bass + gain. + The &man.agp.4; driver has been improved. It includes a fix for aparture size calculation issue which prevents some graphics cards from working. @@ -387,13 +417,23 @@ + The &man.ath.4; driver now supports Atheros + AR9285-based devices. + + A bug in the &man.ath.4; driver which causes a problem + of AR5416-based chipsets including AR9285 has been fixed. + The &man.bge.4; driver now supports BCM5761, BCM5784, and BCM57780-based devices. The &man.bge.4; driver now supports TSO (TCP - segmentation offloading) on BCM5755 or newer + Segmentation Offloading) on BCM5755 or newer contollers. + A long-standing bug in the &man.bge.4; driver which + was related to ASF heartbeat sending has been + fixed. + A long-standing stability issue of the &man.bce.4; and &man.bge.4; driver due to a hardware bug in its DMA handling when the system has more than 4GB memory has been @@ -539,6 +579,12 @@ The &man.vlan.4; pseudo interface has been added to GENERIC kernel. + The &man.vlan.4; pseudo interface now supports TSO (TCP + Segmentation Offloading). The capability flag is named as + IFCAP_VLAN_HWTSO and it is separated from + IFCAP_VLAN_HWTAGGING. The &man.mxge.4; + driver supports this feature. + The &man.vlan.4; pseudo interface for IEEE 802.1Q VLAN now ignore renaming of the parent's interface name. The configured VLAN interfaces continue to work with the new @@ -627,6 +673,9 @@ + A livelock issue of the &man.ciss.4; driver under a high + load has been fixed. + A bug in the &man.fdc.4; driver which prevents the kernel module from unloading has been fixed. @@ -769,6 +818,10 @@ A bug in &man.fetch.1; utility which incorrectly evaluates a variable NO_PROXY has been fixed. + A bug in &man.find.1; utility has been fixed. An option + was interpreted as the same as + . + A bug in the &man.fsck.ffs.8; utility which causes the last cylinder group of a UFS1 file system is always reported as broken even after it is fixed. @@ -806,6 +859,11 @@ The &man.ntpd.8; program no longer tries to bind to an IPv6 anycast address. + The &man.procstat.1; utility now supports two new flags + and to display + information about signal disposition and pending/blocked + status for signals. + The &man.pwait.1; utility has been added. This is similar to the Solaris utility of the same name, and waits for any process to terminate. @@ -938,7 +996,7 @@ version 8.14.4. The timezone database has been updated to the - tzdata2010b release. + tzdata2010e release. - - - - Ports/Packages Collection Infrastructure - - + tzdata2010j release. From owner-svn-src-all@FreeBSD.ORG Fri Jul 23 21:51:42 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1B2F71065670; Fri, 23 Jul 2010 21:51:42 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 085C08FC08; Fri, 23 Jul 2010 21:51:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6NLpf8H027095; Fri, 23 Jul 2010 21:51:41 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6NLpf3v027093; Fri, 23 Jul 2010 21:51:41 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007232151.o6NLpf3v027093@svn.freebsd.org> From: Hiroki Sato Date: Fri, 23 Jul 2010 21:51:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210434 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 21:51:42 -0000 Author: hrs Date: Fri Jul 23 21:51:41 2010 New Revision: 210434 URL: http://svn.freebsd.org/changeset/base/210434 Log: - Spelling correction. - Remove 64-bit quota entry; it was not merged[*]. Spotted by: kib[*] Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 21:38:26 2010 (r210433) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 21:51:41 2010 (r210434) @@ -247,7 +247,7 @@ A new kernel thread called deadlock resolver has been added. This can be used to detect possible deadlock by using information of thread state and - heuristical analysis. This is not enabled by default. To + heuristic analysis. This is not enabled by default. To enable this, an option in kernel configuration file and recompilation of the kernel. @@ -269,13 +269,13 @@ - Note that the read-ahead amount is also constrainted by + Note that the read-ahead amount is also limited by sysctl variable vfs.read_max, which may need to be raised in order to better utilize this feature. The &man.lindev.4; driver has been added. This is for - supporting various linux-specific pseudo devices such as + supporting various Linux-specific pseudo devices such as /dev/full. Note that this is not included in GENERIC kernel. @@ -444,7 +444,7 @@ gain. The &man.agp.4; driver has been improved. It includes - a fix for aparture size calculation issue which prevents + a fix for aperture size calculation issue which prevents some graphics cards from working. The &man.snd.hda.4; driver now allows AD1981HD codecs @@ -452,7 +452,7 @@ The &man.snd.hda.4; driver now supports multichannel (4.0 and 7.1) playback support. The 5.1 mode support is - disabled now due to unidentified synchonization problem. + disabled now due to unidentified synchronization problem. Devices which supports the 7.1 mode can handle the 5.1 operation via software upmix done by &man.sound.4;. Note that stereo stream is no longer duplicated to all @@ -477,7 +477,7 @@ The &man.bge.4; driver now supports TSO (TCP Segmentation Offloading) on BCM5755 or newer - contollers. + controllers. A long-standing bug in the &man.bge.4; driver which was related to ASF heartbeat sending has been @@ -514,7 +514,7 @@ filtering based on inspection of L2/L3/L4 headers. Filtering based on source IP address, destination IP address, source port number, destination port number, - 802.1q VLAN frame tag, UDP, TCP, and MAC address addr is + 802.1q VLAN frame tag, UDP, TCP, and MAC address is possible. The configuration can be done by the cxgbtool(8) utility. Note that cxgbtool(8) is in src/usr.sbin/cxgbtool but not @@ -578,7 +578,7 @@ via DHCP. The &man.re.4; driver now uses 2048 - as PCIe Maximuim Read Request Size. This improves bulk + as PCIe Maximum Read Request Size. This improves bulk transfer performance. The &man.run.4; driver for Ralink @@ -692,7 +692,7 @@ interface has changed, and lets stacked interfaces such as &man.vlan.4; detect that their lower interface has changed and adjust things in order to keep working. This fixes an - issue of &man.lagg.4; and &man.vlan.4; configulation. + issue of &man.lagg.4; and &man.vlan.4; configuration. IPcomp (IP Payload Compression Protocol defined in RFC 2393) protocol is now enabled by default. Note that this @@ -766,7 +766,7 @@ A memory alignment issue in the &man.ng.ksocket.4; and &man.ng.ppp.4;, Netgraph node drivers have been fixed. This - fixes kernel panics due to the misalightment. + fixes kernel panics due to the misalignment. The &man.ng.bridge.4; and &man.ng.hub.4; Netgraph node drivers now supports a flag persistent. @@ -831,7 +831,7 @@ The &man.ahci.4; driver now supports FIS-based (Frame Information Structure) switching of port multiplier on - supported controlers. + supported controllers. The &man.ahd.4; driver now supports three separated error counters for correctable, uncorrectable, and fatal, in @@ -997,7 +997,7 @@ kern.geom.label.gpt.enable The userland part consists of &man.hastd.8;, - &man.hastctl.8;, and &man.hast.conf.5;. More datails + &man.hastctl.8;, and &man.hast.conf.5;. More details can be found at . @@ -1060,16 +1060,6 @@ kern.geom.label.gpt.enableThe UFS file system (&man.ffs.7;) now supports NFSv4 ACL. - The UFS file system (&man.ffs.7;) now supports both - 32-bit and 64-bit &man.quota.1;. The command - quotacheck -c 64 converts the 32-bit - quota to 64-bit. Note that the traditional 32-bit quota - still works with no problem for sizes smaller than 2Tb, and - the quota subsystem is not compilied in - GENERIC kernel by default. To enable - it, an option in the kernel - configuration file and recompilation of the kernel. - &os; &man.VFS.9; subsystem now supports a new sysctl variable vfs.vlru_allow_cache_src. This allow vnlru kernel thread to reclaim @@ -1251,7 +1241,7 @@ kern.geom.label.gpt.enable The &man.ln.1; utility now removes trailing slash - characters when creating a link to a directory. The followin + characters when creating a link to a directory. The following command sequence reported an error in the previous releases: @@ -1394,7 +1384,7 @@ kern.geom.label.gpt.enableThe &man.whois.1; utility now supports searching IPv6 addresses just like IPv4 without specifying the ARIN server. - A flag has been removed becuase it is now + A flag has been removed because it is now obsolete. A new errno ENOTCAPABLE has been added. @@ -1449,7 +1439,7 @@ kern.geom.label.gpt.enableThe &man.rc.conf.5; now supports a firewall_coscripts variable. This should - contain a list of commands which should be excuted after + contain a list of commands which should be executed after firewall starts or stops. The &man.rc.conf.5; now supports configuring From owner-svn-src-all@FreeBSD.ORG Fri Jul 23 22:00:20 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4FCF31065670; Fri, 23 Jul 2010 22:00:20 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3CCDA8FC18; Fri, 23 Jul 2010 22:00:20 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6NM0KY9029141; Fri, 23 Jul 2010 22:00:20 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6NM0K3L029139; Fri, 23 Jul 2010 22:00:20 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007232200.o6NM0K3L029139@svn.freebsd.org> From: Hiroki Sato Date: Fri, 23 Jul 2010 22:00:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210435 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 22:00:20 -0000 Author: hrs Date: Fri Jul 23 22:00:19 2010 New Revision: 210435 URL: http://svn.freebsd.org/changeset/base/210435 Log: Sort entries. Cosmetic changes only. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 21:51:41 2010 (r210434) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:00:19 2010 (r210435) @@ -241,9 +241,6 @@ - The default &man.devfs.5; rules now expose the upper 256 - of &man.pty.4; device nodes. - A new kernel thread called deadlock resolver has been added. This can be used to detect possible deadlock by using information of thread state and @@ -252,6 +249,9 @@ kernel configuration file and recompilation of the kernel. + The default &man.devfs.5; rules now expose the upper 256 + of &man.pty.4; device nodes. + Two commands to enable/disable read-ahead have been added to &man.fcntl.2; system call: @@ -287,6 +287,17 @@ INCLUDE_CONFIG_FILE has been added to GENERIC kernel by default. + A bug in the &man.sched.4bsd.4; scheduler that the + timestamp for the sleeping operation is not cleaned up on the + wakeup has been fixed. + + A race condition in the &man.sched.4bsd.4; scheduler has + been fixed. + + A bug in the &man.sched.ule.4; scheduler which prevented + process usage (%CPU) from working correctly + has been fixed. + New SDT (Statically Defined Tracing) probes such as ones for opencrypto and vnet have been added to &os; &man.dtrace.1; subsystem. @@ -299,26 +310,15 @@ &os; now supports UltraSPARC IV, IV+, and SPARC64 V CPUs. - A bug in the &man.tty.4; driver that - TIOCSTI did not work has been fixed. This - affects applications like &man.mail.1;. - - A bug in the &man.sched.4bsd.4; scheduler that the - timestamp for the sleeping operation is not cleaned up on the - wakeup has been fixed. - - A race condition in the &man.sched.4bsd.4; scheduler has - been fixed. - - A bug in the &man.sched.ule.4; scheduler which prevented - process usage (%CPU) from working correctly - has been fixed. - The &man.syscons.4; driver has been improved. The history buffer can be fully saved/restored in the VESA mode switching via a loader tunable hint.sc.0.vesa_mode. + A bug in the &man.tty.4; driver that + TIOCSTI did not work has been fixed. This + affects applications like &man.mail.1;. + An x86 real mode emulator based on OpenBSD's x86emu implementation has been added to improve real mode BIOS call support on both &arch.i386; and &arch.amd64;. @@ -355,17 +355,17 @@ The &man.loader.8; program now supports U-Boot storage. + The algorithm the &man.loader.8; uses has + been improved to choose a memory range for its heap when + using a range above 1MB. This fixes a symptom that the + loader fails to load a kernel. + A kernel environment variable vfs.root.mountfrom now supports multiple elements for root file system in a space-separated list. Each list element will be tried in order and the first available one will be mounted. - The algorithm the &man.loader.8; uses has - been improved to choose a memory range for its heap when - using a range above 1MB. This fixes a symptom that the - loader fails to load a kernel. - The zfsloader has been added. This is a separate &man.zfs.8; enabled loader. Note that a ZFS bootcode (zfsboot or @@ -402,6 +402,25 @@ JBus to PCIe bridge (called as Fire) found in the Sun Fire V215/V245 and Sun Ultra 25/45 machines. + The &man.smu.4; driver now provides + thermal management and monitoring features. This allows fan + control and thermal monitoring on SMU-based Apple G5 + machines, as well as an &man.led.4; interface to control the + sleep LED. + + The &man.tnt4882.4; driver for IEEE-488 (GPIB) bus now + supports National Instruments TNT5004 chip. + + The &man.uart.4; driver now supports NetMos NM9865 + family of Serial/Parallel ports. + + The &man.uep.4; driver for USB onscreen touch panel + from eGalax has been added. This driver is supported by + x11-drivers/xf86-input-egalax. + + A bug in the &man.uftdi.4; driver that can allow to send + a zero length packet has been fixed. + The &man.usb.4; subsystem now reports &man.devd.8; notify events with the device properties instead of attach events. The following is an @@ -418,21 +437,6 @@ action "/path/to/command -flag"; }; - The &man.smu.4; driver now provides - thermal management and monitoring features. This allows fan - control and thermal monitoring on SMU-based Apple G5 - machines, as well as an &man.led.4; interface to control the - sleep LED. - - The &man.tnt4882.4; driver for IEEE-488 (GPIB) bus now - supports National Instruments TNT5004 chip. - - The &man.uart.4; driver now supports NetMos NM9865 - family of Serial/Parallel ports. - - A bug in the &man.uftdi.4; driver that can allow to send - a zero length packet has been fixed. - Multimedia Support @@ -457,10 +461,6 @@ operation via software upmix done by &man.sound.4;. Note that stereo stream is no longer duplicated to all ports. - - The &man.uep.4; driver for USB onscreen touch panel - from eGalax has been added. This driver is supported by - x11-drivers/xf86-input-egalax. @@ -520,12 +520,12 @@ src/usr.sbin/cxgbtool but not compilied by default. - The et(4) driver now supports MSI and Tx checksum - offloading of IPv4, TCP, and UDP. - The &man.em.4; driver has been updated to version 7.0.0. + The et(4) driver now supports MSI and Tx checksum + offloading of IPv4, TCP, and UDP. + The &man.fxp.4; driver now exports the hardware MAC statistics via sysctl variables. @@ -881,18 +881,22 @@ &man.cam.3; to wait, while CD drive loads disk, instead of immediately return error status. - - The &man.cam.4; ATA transport layer now supports - Power-Up In Stand-by (PUIS). The PUIS is a configuration of - SATA or PATA drives to prevent them from automatic spin-up - when power is applied. A typical application is staggered - spin-up. - - The &man.cam.4; ATA transport layer now supports - negotiating and enabling additional SATA features such as - device initiated power management, Automatic Partial to - Slumber mode transition, and DMA auto-activation. + + The &man.cam.4; ATA transport layer now supports + Power-Up In Stand-by (PUIS). The PUIS is a configuration of + SATA or PATA drives to prevent them from automatic spin-up + when power is applied. A typical application is staggered + spin-up. + + + + The &man.cam.4; ATA transport layer now supports + negotiating and enabling additional SATA features such as + device initiated power management, Automatic Partial to + Slumber mode transition, and DMA auto-activation. + + A livelock issue of the &man.ciss.4; driver under a high load has been fixed. From owner-svn-src-all@FreeBSD.ORG Fri Jul 23 22:18:05 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E36F01065676; Fri, 23 Jul 2010 22:18:05 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id D1D908FC18; Fri, 23 Jul 2010 22:18:05 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6NMI5xM033255; Fri, 23 Jul 2010 22:18:05 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6NMI58v033253; Fri, 23 Jul 2010 22:18:05 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007232218.o6NMI58v033253@svn.freebsd.org> From: Hiroki Sato Date: Fri, 23 Jul 2010 22:18:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210436 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 22:18:06 -0000 Author: hrs Date: Fri Jul 23 22:18:05 2010 New Revision: 210436 URL: http://svn.freebsd.org/changeset/base/210436 Log: Fix a typo. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:00:19 2010 (r210435) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:18:05 2010 (r210436) @@ -973,7 +973,7 @@ kern.geom.label.gpt.enable - The HAST (Highly Avalable STorage) franework has been + The HAST (Highly Avalable STorage) framework has been added: From owner-svn-src-all@FreeBSD.ORG Fri Jul 23 22:20:26 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B91311065677; Fri, 23 Jul 2010 22:20:26 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A74AC8FC24; Fri, 23 Jul 2010 22:20:26 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6NMKQJr033836; Fri, 23 Jul 2010 22:20:26 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6NMKQZm033834; Fri, 23 Jul 2010 22:20:26 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007232220.o6NMKQZm033834@svn.freebsd.org> From: Hiroki Sato Date: Fri, 23 Jul 2010 22:20:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210437 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 22:20:26 -0000 Author: hrs Date: Fri Jul 23 22:20:26 2010 New Revision: 210437 URL: http://svn.freebsd.org/changeset/base/210437 Log: Fix a typo. Spotted by: np Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:18:05 2010 (r210436) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:20:26 2010 (r210437) @@ -518,7 +518,7 @@ possible. The configuration can be done by the cxgbtool(8) utility. Note that cxgbtool(8) is in src/usr.sbin/cxgbtool but not - compilied by default. + compiled by default. The &man.em.4; driver has been updated to version 7.0.0. From owner-svn-src-all@FreeBSD.ORG Fri Jul 23 22:24:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B1E3E1065676; Fri, 23 Jul 2010 22:24:25 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id A0F0D8FC15; Fri, 23 Jul 2010 22:24:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6NMOPCk034748; Fri, 23 Jul 2010 22:24:25 GMT (envelope-from np@svn.freebsd.org) Received: (from np@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6NMOPUd034746; Fri, 23 Jul 2010 22:24:25 GMT (envelope-from np@svn.freebsd.org) Message-Id: <201007232224.o6NMOPUd034746@svn.freebsd.org> From: Navdeep Parhar Date: Fri, 23 Jul 2010 22:24:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210438 - head/cddl/contrib/opensolaris/tools/ctf/cvt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 22:24:25 -0000 Author: np Date: Fri Jul 23 22:24:25 2010 New Revision: 210438 URL: http://svn.freebsd.org/changeset/base/210438 Log: Catch up with r210324. d_buf will be NULL for SHT_NOBITS sections, do not attempt to copy from it in that case. MFC after: 1 month Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c Fri Jul 23 22:20:26 2010 (r210437) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c Fri Jul 23 22:24:25 2010 (r210438) @@ -644,7 +644,7 @@ write_file(Elf *src, const char *srcname } #if !defined(sun) - if (ddata->d_buf == NULL) { + if (ddata->d_buf == NULL && sdata->d_buf != NULL) { ddata->d_buf = xmalloc(shdr.sh_size); bcopy(sdata->d_buf, ddata->d_buf, shdr.sh_size); } From owner-svn-src-all@FreeBSD.ORG Fri Jul 23 22:49:25 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0EB81065673; Fri, 23 Jul 2010 22:49:25 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id DF3AD8FC0C; Fri, 23 Jul 2010 22:49:25 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6NMnPLo040544; Fri, 23 Jul 2010 22:49:25 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6NMnP62040542; Fri, 23 Jul 2010 22:49:25 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007232249.o6NMnP62040542@svn.freebsd.org> From: Hiroki Sato Date: Fri, 23 Jul 2010 22:49:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210439 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jul 2010 22:49:26 -0000 Author: hrs Date: Fri Jul 23 22:49:25 2010 New Revision: 210439 URL: http://svn.freebsd.org/changeset/base/210439 Log: Add ale(4) to the IFCAP_VLAN_HWTSO-supported device list. Spotted by: yongari Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:24:25 2010 (r210438) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Fri Jul 23 22:49:25 2010 (r210439) @@ -800,9 +800,9 @@ Segmentation Offloading). The capability flag is named as IFCAP_VLAN_HWTSO and it is separated from IFCAP_VLAN_HWTAGGING. The &man.age.4;, - &man.alc.4;, &man.bce.4;, &man.bge.4;, &man.cxgb.4;, &man.jme.4;, - &man.re.4;, and &man.mxge.4; driver support this - feature. + &man.alc.4;, &man.ale.4;, &man.bce.4;, &man.bge.4;, + &man.cxgb.4;, &man.jme.4;, &man.re.4;, and &man.mxge.4; + driver support this feature. The &man.vlan.4; pseudo interface for IEEE 802.1Q VLAN now ignore renaming of the parent's interface name. The From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 01:52:28 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DD180106566B; Sat, 24 Jul 2010 01:52:28 +0000 (UTC) (envelope-from kensmith@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id CC7528FC16; Sat, 24 Jul 2010 01:52:28 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6O1qShl081761; Sat, 24 Jul 2010 01:52:28 GMT (envelope-from kensmith@svn.freebsd.org) Received: (from kensmith@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6O1qSUr081728; Sat, 24 Jul 2010 01:52:28 GMT (envelope-from kensmith@svn.freebsd.org) Message-Id: <201007240152.o6O1qSUr081728@svn.freebsd.org> From: Ken Smith Date: Sat, 24 Jul 2010 01:52:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210441 - stable/8/sys/conf X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 01:52:29 -0000 Author: kensmith Date: Sat Jul 24 01:52:26 2010 New Revision: 210441 URL: http://svn.freebsd.org/changeset/base/210441 Log: Shift to -STABLE now that 8.1-RELEASE is done. Modified: stable/8/sys/conf/newvers.sh Modified: stable/8/sys/conf/newvers.sh ============================================================================== --- stable/8/sys/conf/newvers.sh Fri Jul 23 23:58:57 2010 (r210440) +++ stable/8/sys/conf/newvers.sh Sat Jul 24 01:52:26 2010 (r210441) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.1" -BRANCH="PRERELEASE" +BRANCH="STABLE" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 10:04:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84862106566B; Sat, 24 Jul 2010 10:04:35 +0000 (UTC) (envelope-from simon@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 73D418FC0C; Sat, 24 Jul 2010 10:04:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OA4ZFI089992; Sat, 24 Jul 2010 10:04:35 GMT (envelope-from simon@svn.freebsd.org) Received: (from simon@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OA4Zi2089990; Sat, 24 Jul 2010 10:04:35 GMT (envelope-from simon@svn.freebsd.org) Message-Id: <201007241004.o6OA4Zi2089990@svn.freebsd.org> From: "Simon L. Nielsen" Date: Sat, 24 Jul 2010 10:04:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210442 - head/usr.sbin/bsnmpd/modules/snmp_hostres X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 10:04:35 -0000 Author: simon Date: Sat Jul 24 10:04:35 2010 New Revision: 210442 URL: http://svn.freebsd.org/changeset/base/210442 Log: Make failed open of /dev/mdctl in the bsnmpd hostres module non-fatal. This makes it possible to use the hostres module when bsnmpd is not running as root. MFC after: 1 week Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Modified: head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c ============================================================================== --- head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Sat Jul 24 01:52:26 2010 (r210441) +++ head/usr.sbin/bsnmpd/modules/snmp_hostres/hostres_diskstorage_tbl.c Sat Jul 24 10:04:35 2010 (r210442) @@ -340,6 +340,9 @@ disk_OS_get_MD_disks(void) struct md_ioctl mdio; int unit; + if (md_fd <= 0) + return; + /* Look for md devices */ STAILQ_FOREACH(map, &device_map, link) { if (sscanf(map->name_key, "md%d", &unit) != 1) @@ -546,8 +549,8 @@ init_disk_storage_tbl(void) md_fd = -1; snprintf(mddev, sizeof(mddev) - 1, "%s%s", _PATH_DEV, MDCTL_NAME); if ((md_fd = open(mddev, O_RDWR)) == -1) { - syslog(LOG_ERR, "open %s failed: %m", mddev); - return (-1); + syslog(LOG_ERR, "open %s failed - will not include md(4) " + "info: %m", mddev); } refresh_disk_storage_tbl(1); From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 10:07:18 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02E951065678; Sat, 24 Jul 2010 10:07:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E75BC8FC1E; Sat, 24 Jul 2010 10:07:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OA7HjO092200; Sat, 24 Jul 2010 10:07:17 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OA7Hpk092198; Sat, 24 Jul 2010 10:07:17 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007241007.o6OA7Hpk092198@svn.freebsd.org> From: Alexander Motin Date: Sat, 24 Jul 2010 10:07:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210443 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 10:07:18 -0000 Author: mav Date: Sat Jul 24 10:07:17 2010 New Revision: 210443 URL: http://svn.freebsd.org/changeset/base/210443 Log: Remove extra commas from KTR_EVENT4() macro to match number of CTR6() args. Comparing to other macros there should be strings concatenation, not a separate arguments. Modified: head/sys/sys/ktr.h Modified: head/sys/sys/ktr.h ============================================================================== --- head/sys/sys/ktr.h Sat Jul 24 10:04:35 2010 (r210442) +++ head/sys/sys/ktr.h Sat Jul 24 10:07:17 2010 (r210443) @@ -188,7 +188,7 @@ void ktr_tracepoint(u_int mask, const ch ident, edat, (v0), (v1), (v2)) #define KTR_EVENT4(m, egroup, ident, etype, edat, \ a0, v0, a1, v1, a2, v2, a3, v3) \ - CTR6(m,KTR_EFMT(egroup, ident, etype) a0 ", " a1 ", " a2, ", ", a3,\ + CTR6(m,KTR_EFMT(egroup, ident, etype) a0 ", " a1 ", " a2 ", " a3,\ ident, edat, (v0), (v1), (v2), (v3)) /* From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 10:49:59 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B07CD1065674; Sat, 24 Jul 2010 10:49:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9F04A8FC0A; Sat, 24 Jul 2010 10:49:59 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OAnxv2001875; Sat, 24 Jul 2010 10:49:59 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OAnxvo001874; Sat, 24 Jul 2010 10:49:59 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201007241049.o6OAnxvo001874@svn.freebsd.org> From: Alexander Motin Date: Sat, 24 Jul 2010 10:49:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210444 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 10:49:59 -0000 Author: mav Date: Sat Jul 24 10:49:59 2010 New Revision: 210444 URL: http://svn.freebsd.org/changeset/base/210444 Log: Increment td->td_intr_nesting_level for LAPIC timer interrupts. Among other things it hints SCHED_ULE to run clock swi handlers on their native CPUs, avoiding many unneeded IPI_PREEMPT calls. Modified: head/sys/x86/x86/local_apic.c Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Sat Jul 24 10:07:17 2010 (r210443) +++ head/sys/x86/x86/local_apic.c Sat Jul 24 10:49:59 2010 (r210444) @@ -811,10 +811,12 @@ lapic_handle_timer(struct trapframe *fra critical_enter(); if (lapic_et.et_active) { td = curthread; + td->td_intr_nesting_level++; oldframe = td->td_intr_frame; td->td_intr_frame = frame; lapic_et.et_event_cb(&lapic_et, lapic_et.et_arg); td->td_intr_frame = oldframe; + td->td_intr_nesting_level--; } critical_exit(); } From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 11:15:41 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0BF7F1065670; Sat, 24 Jul 2010 11:15:41 +0000 (UTC) (envelope-from bcr@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id EF50A8FC19; Sat, 24 Jul 2010 11:15:40 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OBFeec007679; Sat, 24 Jul 2010 11:15:40 GMT (envelope-from bcr@svn.freebsd.org) Received: (from bcr@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OBFeaO007678; Sat, 24 Jul 2010 11:15:40 GMT (envelope-from bcr@svn.freebsd.org) Message-Id: <201007241115.o6OBFeaO007678@svn.freebsd.org> From: Benedict Reuschling Date: Sat, 24 Jul 2010 11:15:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210445 - stable/8/lib/libarchive X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 11:15:41 -0000 Author: bcr (doc committer) Date: Sat Jul 24 11:15:40 2010 New Revision: 210445 URL: http://svn.freebsd.org/changeset/base/210445 Log: MFC r210191: s/an struct/a struct PR: docs/148660 Submitted by: Warren Block (wblock at wonkity dot com) Reviewed by: Tim Kientzle Mentored by: jkois Modified: stable/8/lib/libarchive/libarchive.3 Directory Properties: stable/8/lib/libarchive/ (props changed) Modified: stable/8/lib/libarchive/libarchive.3 ============================================================================== --- stable/8/lib/libarchive/libarchive.3 Sat Jul 24 10:49:59 2010 (r210444) +++ stable/8/lib/libarchive/libarchive.3 Sat Jul 24 11:15:40 2010 (r210445) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 19, 2006 +.Dd July 17, 2010 .Dt LIBARCHIVE 3 .Os .Sh NAME @@ -158,7 +158,7 @@ Each archive entry consists of a header amount of data. You can obtain the next header with .Fn archive_read_next_header , -which returns a pointer to an +which returns a pointer to a .Tn struct archive_entry structure with information about the current archive element. If the entry is a regular file, then the header will be followed @@ -324,7 +324,7 @@ or the arbitrary key/value pairs that ca pax interchange format archives. .Pp Conversely, of course, not all of the information that can be -stored in an +stored in a .Tn struct archive_entry is supported by all formats. For example, cpio formats do not support nanosecond timestamps; From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 14:23:06 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 84B201065674; Sat, 24 Jul 2010 14:23:06 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 7477D8FC33; Sat, 24 Jul 2010 14:23:06 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OEN6B7048790; Sat, 24 Jul 2010 14:23:06 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OEN6FM048788; Sat, 24 Jul 2010 14:23:06 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007241423.o6OEN6FM048788@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 24 Jul 2010 14:23:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210446 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 14:23:06 -0000 Author: kib Date: Sat Jul 24 14:23:06 2010 New Revision: 210446 URL: http://svn.freebsd.org/changeset/base/210446 Log: Reword the comment, fixing typo. MFC after: 3 days Modified: head/sys/sys/imgact_elf.h Modified: head/sys/sys/imgact_elf.h ============================================================================== --- head/sys/sys/imgact_elf.h Sat Jul 24 11:15:40 2010 (r210445) +++ head/sys/sys/imgact_elf.h Sat Jul 24 14:23:06 2010 (r210446) @@ -60,8 +60,8 @@ typedef struct { int flags; boolean_t (*trans_osrel)(const Elf_Note *, int32_t *); #define BN_CAN_FETCH_OSREL 0x0001 /* Deprecated. */ -#define BN_TRANSLATE_OSREL 0x0002 /* Use trans_osrel fetch osrel after */ - /* checking ABI contraint if needed. */ +#define BN_TRANSLATE_OSREL 0x0002 /* Use trans_osrel to fetch osrel */ + /* after checking the image ABI specification, if needed. */ } Elf_Brandnote; typedef struct { From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 15:24:13 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1F0DF106566C; Sat, 24 Jul 2010 15:24:13 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 0E4D48FC28; Sat, 24 Jul 2010 15:24:13 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OFOC1H062210; Sat, 24 Jul 2010 15:24:12 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OFOC4U062208; Sat, 24 Jul 2010 15:24:12 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007241524.o6OFOC4U062208@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 24 Jul 2010 15:24:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210447 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 15:24:13 -0000 Author: trasz Date: Sat Jul 24 15:24:12 2010 New Revision: 210447 URL: http://svn.freebsd.org/changeset/base/210447 Log: Add P_HASTHREADS flag description. Modified: head/bin/ps/ps.1 Modified: head/bin/ps/ps.1 ============================================================================== --- head/bin/ps/ps.1 Sat Jul 24 14:23:06 2010 (r210446) +++ head/bin/ps/ps.1 Sat Jul 24 15:24:12 2010 (r210447) @@ -29,7 +29,7 @@ .\" @(#)ps.1 8.3 (Berkeley) 4/18/94 .\" $FreeBSD$ .\" -.Dd April 13, 2010 +.Dd July 24, 2010 .Dt PS 1 .Os .Sh NAME @@ -291,6 +291,7 @@ the include file .It Dv "P_PPWAIT" Ta No "0x00010 Parent is waiting for child to exec/exit" .It Dv "P_PROFIL" Ta No "0x00020 Has started profiling" .It Dv "P_STOPPROF" Ta No "0x00040 Has thread in requesting to stop prof" +.It Dv "P_HASTHREADS" Ta No "0x00080 Has had threads (no cleanup shortcuts)" .It Dv "P_SUGID" Ta No "0x00100 Had set id privileges since last exec" .It Dv "P_SYSTEM" Ta No "0x00200 System proc: no sigs, stats or swapping" .It Dv "P_SINGLE_EXIT" Ta No "0x00400 Threads suspending should exit, not wait" From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 15:37:37 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 514251065673; Sat, 24 Jul 2010 15:37:37 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 408168FC19; Sat, 24 Jul 2010 15:37:37 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OFbbj3065170; Sat, 24 Jul 2010 15:37:37 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OFbbXP065168; Sat, 24 Jul 2010 15:37:37 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201007241537.o6OFbbXP065168@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 24 Jul 2010 15:37:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210448 - head/bin/ps X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 15:37:37 -0000 Author: trasz Date: Sat Jul 24 15:37:36 2010 New Revision: 210448 URL: http://svn.freebsd.org/changeset/base/210448 Log: Fix alignment for the 'flags' label, and make more room for 'tdev'. MFC after: 1 month Modified: head/bin/ps/keyword.c Modified: head/bin/ps/keyword.c ============================================================================== --- head/bin/ps/keyword.c Sat Jul 24 15:24:12 2010 (r210447) +++ head/bin/ps/keyword.c Sat Jul 24 15:37:36 2010 (r210448) @@ -90,7 +90,7 @@ static VAR var[] = { NULL, 0}, {"etime", "ELAPSED", NULL, USER, elapsed, NULL, 12, 0, CHAR, NULL, 0}, {"etimes", "ELAPSED", NULL, USER, elapseds, NULL, 12, 0, CHAR, NULL, 0}, - {"f", "F", NULL, 0, kvar, NULL, 7, KOFF(ki_flag), INT, "x", 0}, + {"f", "F", NULL, 0, kvar, NULL, 8, KOFF(ki_flag), INT, "x", 0}, {"flags", "", "f", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"ignored", "", "sigignore", 0, NULL, NULL, 0, 0, CHAR, NULL, 0}, {"inblk", "INBLK", NULL, USER, rvar, NULL, 4, ROFF(ru_inblock), LONG, @@ -187,7 +187,7 @@ static VAR var[] = { UINT, UIDFMT, 0}, {"svuid", "SVUID", NULL, 0, kvar, NULL, UIDLEN, KOFF(ki_svuid), UINT, UIDFMT, 0}, - {"tdev", "TDEV", NULL, 0, tdev, NULL, 4, 0, CHAR, NULL, 0}, + {"tdev", "TDEV", NULL, 0, tdev, NULL, 5, 0, CHAR, NULL, 0}, {"tdnam", "TDNAM", NULL, LJUST, tdnam, NULL, COMMLEN, 0, CHAR, NULL, 0}, {"time", "TIME", NULL, USER, cputime, NULL, 9, 0, CHAR, NULL, 0}, {"tpgid", "TPGID", NULL, 0, kvar, NULL, 4, KOFF(ki_tpgid), UINT, From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 17:44:32 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1D9551065673; Sat, 24 Jul 2010 17:44:32 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 91D6A8FC12; Sat, 24 Jul 2010 17:44:31 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OHiV8j092811; Sat, 24 Jul 2010 17:44:31 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OHiVEG092809; Sat, 24 Jul 2010 17:44:31 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007241744.o6OHiVEG092809@svn.freebsd.org> From: Hiroki Sato Date: Sat, 24 Jul 2010 17:44:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210449 - stable/8/release/doc/en_US.ISO8859-1/relnotes X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 17:44:32 -0000 Author: hrs Date: Sat Jul 24 17:44:31 2010 New Revision: 210449 URL: http://svn.freebsd.org/changeset/base/210449 Log: Fix typos. Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sat Jul 24 15:37:36 2010 (r210448) +++ stable/8/release/doc/en_US.ISO8859-1/relnotes/article.sgml Sat Jul 24 17:44:31 2010 (r210449) @@ -521,7 +521,7 @@ compiled by default. The &man.em.4; driver has been updated to version - 7.0.0. + 7.0.5. The et(4) driver now supports MSI and Tx checksum offloading of IPv4, TCP, and UDP. @@ -530,7 +530,7 @@ statistics via sysctl variables. The &man.igb.4; driver has been updated to version - 1.9.3. + 1.9.5. The &man.iwn.4; driver has been updated. This includes various improvements and bugfixes regarding RF @@ -667,7 +667,7 @@ supports RTL8187B-based devices. The &os; Xen netfront driver has been improved in - stability and performance./para> + stability and performance. @@ -973,7 +973,7 @@ kern.geom.label.gpt.enable - The HAST (Highly Avalable STorage) framework has been + The HAST (Highly Available STorage) framework has been added: @@ -1100,7 +1100,7 @@ kern.geom.label.gpt.enable - ZFS prefech statistics has been added as a sysctl + ZFS prefetch statistics has been added as a sysctl variable kstat.zfs.misc.zfetchstats. From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 18:05:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4B3AA1065670; Sat, 24 Jul 2010 18:05:11 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8CC728FC0A; Sat, 24 Jul 2010 18:05:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OI5Bpd097395; Sat, 24 Jul 2010 18:05:11 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OI5BlN097393; Sat, 24 Jul 2010 18:05:11 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201007241805.o6OI5BlN097393@svn.freebsd.org> From: Hiroki Sato Date: Sat, 24 Jul 2010 18:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210450 - stable/8/release/doc/en_US.ISO8859-1/errata X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 18:05:11 -0000 Author: hrs Date: Sat Jul 24 18:05:10 2010 New Revision: 210450 URL: http://svn.freebsd.org/changeset/base/210450 Log: Trim SA list. Modified: stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Modified: stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml ============================================================================== --- stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Sat Jul 24 17:44:31 2010 (r210449) +++ stable/8/release/doc/en_US.ISO8859-1/errata/article.sgml Sat Jul 24 18:05:10 2010 (r210450) @@ -124,6 +124,9 @@ Security Advisories + No advisory. + + From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 18:14:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C2311065676; Sat, 24 Jul 2010 18:14:35 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 22FAB8FC12; Sat, 24 Jul 2010 18:14:35 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OIEYZo099558; Sat, 24 Jul 2010 18:14:34 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OIEY4K099556; Sat, 24 Jul 2010 18:14:34 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201007241814.o6OIEY4K099556@svn.freebsd.org> From: Konstantin Belousov Date: Sat, 24 Jul 2010 18:14:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210451 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 18:14:35 -0000 Author: kib Date: Sat Jul 24 18:14:34 2010 New Revision: 210451 URL: http://svn.freebsd.org/changeset/base/210451 Log: Use forward declartion for enum uio_seg in imgact.h. This allows to remove inclusion of sys/uio.h from the header. Proposed by: alc MFC after: 1 week Modified: head/sys/sys/imgact.h Modified: head/sys/sys/imgact.h ============================================================================== --- head/sys/sys/imgact.h Sat Jul 24 18:05:10 2010 (r210450) +++ head/sys/sys/imgact.h Sat Jul 24 18:14:34 2010 (r210451) @@ -32,8 +32,6 @@ #ifndef _SYS_IMGACT_H_ #define _SYS_IMGACT_H_ -#include - #define MAXSHELLCMDLEN PAGE_SIZE struct image_args { @@ -75,6 +73,7 @@ struct image_params { #ifdef _KERNEL struct sysentvec; struct thread; +enum uio_seg; #define IMGACT_CORE_COMPRESS 0x01 From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 18:37:38 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14E70106564A; Sat, 24 Jul 2010 18:37:38 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep17.mx.upcmail.net (fep17.mx.upcmail.net [62.179.121.37]) by mx1.freebsd.org (Postfix) with ESMTP id 1AA428FC1B; Sat, 24 Jul 2010 18:37:36 +0000 (UTC) Received: from edge02.upcmail.net ([192.168.13.237]) by viefep17-int.chello.at (InterMail vM.8.01.02.02 201-2260-120-106-20100312) with ESMTP id <20100724183734.XNEW21441.viefep17-int.chello.at@edge02.upcmail.net>; Sat, 24 Jul 2010 20:37:34 +0200 Received: from mole.fafoe.narf.at ([213.47.85.26]) by edge02.upcmail.net with edge id ludZ1e03X0a5KZh02udaDi; Sat, 24 Jul 2010 20:37:34 +0200 X-SourceIP: 213.47.85.26 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id 6459C6D438; Sat, 24 Jul 2010 20:37:33 +0200 (CEST) Date: Sat, 24 Jul 2010 20:37:33 +0200 From: Stefan Farfeleder To: Konstantin Belousov Message-ID: <20100724183732.GA1715@mole.fafoe.narf.at> References: <201007241814.o6OIEY4K099556@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201007241814.o6OIEY4K099556@svn.freebsd.org> User-Agent: Mutt/1.5.20 (2009-06-14) X-Cloudmark-Analysis: v=1.1 cv=BX1z5e3lS7RAKjOkUI/uDpZ/pP4xz0N/VImyOZX9Sfk= c=1 sm=0 a=nrf5MxZtRN4A:10 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=fI0r-MSKK3sSlLGpg0QA:9 a=LcR1EV5zY5gGp4-98foA:7 a=zPXc5WPT3aArrnPa4H3_Ly-u_U8A:4 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210451 - head/sys/sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 18:37:38 -0000 Hi Konstantin, declaring enums like this is not standard C code (seems to be a GCC extension). I don't think we should use this feature in our headers. Stefan On Sat, Jul 24, 2010 at 06:14:34PM +0000, Konstantin Belousov wrote: > Author: kib > Date: Sat Jul 24 18:14:34 2010 > New Revision: 210451 > URL: http://svn.freebsd.org/changeset/base/210451 > > Log: > Use forward declartion for enum uio_seg in imgact.h. This allows to remove > inclusion of sys/uio.h from the header. > > Proposed by: alc > MFC after: 1 week > > Modified: > head/sys/sys/imgact.h > > Modified: head/sys/sys/imgact.h > ============================================================================== > --- head/sys/sys/imgact.h Sat Jul 24 18:05:10 2010 (r210450) > +++ head/sys/sys/imgact.h Sat Jul 24 18:14:34 2010 (r210451) > @@ -32,8 +32,6 @@ > #ifndef _SYS_IMGACT_H_ > #define _SYS_IMGACT_H_ > > -#include > - > #define MAXSHELLCMDLEN PAGE_SIZE > > struct image_args { > @@ -75,6 +73,7 @@ struct image_params { > #ifdef _KERNEL > struct sysentvec; > struct thread; > +enum uio_seg; > > #define IMGACT_CORE_COMPRESS 0x01 > > From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 18:53:47 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5BC811065673; Sat, 24 Jul 2010 18:53:47 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 64EC98FC0A; Sat, 24 Jul 2010 18:53:47 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OIrls1008368; Sat, 24 Jul 2010 18:53:47 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OIrl4T008366; Sat, 24 Jul 2010 18:53:47 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201007241853.o6OIrl4T008366@svn.freebsd.org> From: "George V. Neville-Neil" Date: Sat, 24 Jul 2010 18:53:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210452 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 18:53:47 -0000 Author: gnn Date: Sat Jul 24 18:53:46 2010 New Revision: 210452 URL: http://svn.freebsd.org/changeset/base/210452 Log: style(9) fix MFC after: 1 week Modified: head/sys/dev/e1000/if_igb.c Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Sat Jul 24 18:14:34 2010 (r210451) +++ head/sys/dev/e1000/if_igb.c Sat Jul 24 18:53:46 2010 (r210452) @@ -4930,7 +4930,8 @@ igb_update_vf_stats_counters(struct adap /** igb_sysctl_tdh_handler - Handler function * Retrieves the TDH value from the hardware */ -static int igb_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS) +static int +igb_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS) { int error; @@ -4947,7 +4948,8 @@ static int igb_sysctl_tdh_handler(SYSCTL /** igb_sysctl_tdt_handler - Handler function * Retrieves the TDT value from the hardware */ -static int igb_sysctl_tdt_handler(SYSCTL_HANDLER_ARGS) +static int +igb_sysctl_tdt_handler(SYSCTL_HANDLER_ARGS) { int error; @@ -4964,7 +4966,8 @@ static int igb_sysctl_tdt_handler(SYSCTL /** igb_sysctl_rdh_handler - Handler function * Retrieves the RDH value from the hardware */ -static int igb_sysctl_rdh_handler(SYSCTL_HANDLER_ARGS) +static int +igb_sysctl_rdh_handler(SYSCTL_HANDLER_ARGS) { int error; @@ -4981,7 +4984,8 @@ static int igb_sysctl_rdh_handler(SYSCTL /** igb_sysctl_rdt_handler - Handler function * Retrieves the RDT value from the hardware */ -static int igb_sysctl_rdt_handler(SYSCTL_HANDLER_ARGS) +static int +igb_sysctl_rdt_handler(SYSCTL_HANDLER_ARGS) { int error; From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 18:54:57 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7DC54106564A; Sat, 24 Jul 2010 18:54:57 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 95FC38FC19; Sat, 24 Jul 2010 18:54:57 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OIsv2O008683; Sat, 24 Jul 2010 18:54:57 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OIsvsx008681; Sat, 24 Jul 2010 18:54:57 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201007241854.o6OIsvsx008681@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 24 Jul 2010 18:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210453 - stable/8/sys/fs/pseudofs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 18:54:57 -0000 Author: jh Date: Sat Jul 24 18:54:57 2010 New Revision: 210453 URL: http://svn.freebsd.org/changeset/base/210453 Log: MFC r202783: Truncate read request rather than returning EIO if the request is larger than MAXPHYS + 1. This fixes a problem with cat(1) when it uses a large I/O buffer. Modified: stable/8/sys/fs/pseudofs/pseudofs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) stable/8/sys/dev/xen/xenpci/ (props changed) Modified: stable/8/sys/fs/pseudofs/pseudofs_vnops.c ============================================================================== --- stable/8/sys/fs/pseudofs/pseudofs_vnops.c Sat Jul 24 18:53:46 2010 (r210452) +++ stable/8/sys/fs/pseudofs/pseudofs_vnops.c Sat Jul 24 18:54:57 2010 (r210453) @@ -637,10 +637,8 @@ pfs_read(struct vop_read_args *va) error = EINVAL; goto ret; } - if (buflen > MAXPHYS + 1) { - error = EIO; - goto ret; - } + if (buflen > MAXPHYS + 1) + buflen = MAXPHYS + 1; sb = sbuf_new(sb, NULL, buflen, 0); if (sb == NULL) { From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 19:26:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C7F8106566B for ; Sat, 24 Jul 2010 19:26:49 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id 0E9238FC14 for ; Sat, 24 Jul 2010 19:26:45 +0000 (UTC) Received: (qmail 12497 invoked by uid 399); 24 Jul 2010 19:26:39 -0000 Received: from localhost (HELO laptop.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 24 Jul 2010 19:26:39 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Date: Sat, 24 Jul 2010 12:26:09 -0700 (PDT) From: Doug Barton To: Alexander Motin In-Reply-To: <201007241049.o6OAnxvo001874@svn.freebsd.org> Message-ID: References: <201007241049.o6OAnxvo001874@svn.freebsd.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-message-flag: Outlook -- Not just for spreading viruses anymore! OpenPGP: id=1A1ABC84 Organization: http://SupersetSolutions.com/ MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210444 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 19:26:49 -0000 On Sat, 24 Jul 2010, Alexander Motin wrote: > Author: mav > Date: Sat Jul 24 10:49:59 2010 > New Revision: 210444 > URL: http://svn.freebsd.org/changeset/base/210444 > > Log: > Increment td->td_intr_nesting_level for LAPIC timer interrupts. Among other > things it hints SCHED_ULE to run clock swi handlers on their native CPUs, > avoiding many unneeded IPI_PREEMPT calls. Will this help SCHED_4BSD at all? I'm finding it to be slightly better for interactivity on a loaded system, but frankly at this point they both leave a lot to be desired. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 19:40:17 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 14FF9106564A; Sat, 24 Jul 2010 19:40:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 050F28FC0C; Sat, 24 Jul 2010 19:40:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OJeGfd018629; Sat, 24 Jul 2010 19:40:16 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OJeG82018627; Sat, 24 Jul 2010 19:40:16 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201007241940.o6OJeG82018627@svn.freebsd.org> From: Andriy Gapon Date: Sat, 24 Jul 2010 19:40:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210454 - head/sys/dev/ichwd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 19:40:17 -0000 Author: avg Date: Sat Jul 24 19:40:16 2010 New Revision: 210454 URL: http://svn.freebsd.org/changeset/base/210454 Log: ichwd: correct range check for timeout value This is similar to a fix in r189305 but for earlier ICH versions (<= 5). Reported by: someone via attilio Discussed with: des, attilio MFC after: 1 week Modified: head/sys/dev/ichwd/ichwd.c Modified: head/sys/dev/ichwd/ichwd.c ============================================================================== --- head/sys/dev/ichwd/ichwd.c Sat Jul 24 18:54:57 2010 (r210453) +++ head/sys/dev/ichwd/ichwd.c Sat Jul 24 19:40:16 2010 (r210454) @@ -256,8 +256,8 @@ ichwd_tmr_set(struct ichwd_softc *sc, un uint8_t tmr_val8 = ichwd_read_tco_1(sc, TCO_TMR1); tmr_val8 &= 0xc0; - if (timeout > 0xbf) - timeout = 0xbf; + if (timeout > 0x3f) + timeout = 0x3f; tmr_val8 |= timeout; ichwd_write_tco_1(sc, TCO_TMR1, tmr_val8); } else { From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 19:42:49 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3ED311065670; Sat, 24 Jul 2010 19:42:49 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id C7DC78FC29; Sat, 24 Jul 2010 19:42:47 +0000 (UTC) Received: by fxm13 with SMTP id 13so6072305fxm.13 for ; Sat, 24 Jul 2010 12:42:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=7BsRxhunQXzGvaCj9Be0CN5MoRYrsB5zWmY5nehlBNI=; b=HsaP0g0/e80jI7hfnbH9PRhJUMssIizUpzs2EEWRLNMA4XjK32cHp8EpmDYi54hetd QLx+cOq6h9a8brM8yVvNRU1m8h3GwaRUtWYfD7+NJzmu8omrafibBwHGcXQql39OHXxT mDA4Fx9uIZOGa8Krl6VWdiYMgT5J4/kxILpXs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=C7NpeNXQXKmQFXL95mFewk7J0IuNyzppfC3rpTiT1AdmObDV61J+oMtQyMeHwwFbA1 b8kcwXdBMfwtlGDZjSQTqRXKz9wCkrPqwoObOe5hq30qw1OHv42gyLctR27ZKiFzpGMG 5MULKFLeC9iTjjunYvsNTRxxyjPxC4xETl7LI= Received: by 10.223.125.196 with SMTP id z4mr4619097far.80.1280000566158; Sat, 24 Jul 2010 12:42:46 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id r10sm628317faq.29.2010.07.24.12.42.44 (version=SSLv3 cipher=RC4-MD5); Sat, 24 Jul 2010 12:42:45 -0700 (PDT) Sender: Alexander Motin Message-ID: <4C4B4231.80406@FreeBSD.org> Date: Sat, 24 Jul 2010 22:42:41 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.24 (X11/20100402) MIME-Version: 1.0 To: Doug Barton References: <201007241049.o6OAnxvo001874@svn.freebsd.org> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210444 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 19:42:49 -0000 Doug Barton wrote: > On Sat, 24 Jul 2010, Alexander Motin wrote: >> Author: mav >> Date: Sat Jul 24 10:49:59 2010 >> New Revision: 210444 >> URL: http://svn.freebsd.org/changeset/base/210444 >> >> Log: >> Increment td->td_intr_nesting_level for LAPIC timer interrupts. Among >> other >> things it hints SCHED_ULE to run clock swi handlers on their native >> CPUs, >> avoiding many unneeded IPI_PREEMPT calls. > > Will this help SCHED_4BSD at all? I'm finding it to be slightly better > for interactivity on a loaded system, but frankly at this point they > both leave a lot to be desired. At least not directly. SCHED_4BSD doesn't use this variable. But I have no idea if the problem exist there. Even on SCHED_ULE it happens only in some cases, if swi thread was accidentally pushed out of it's CPU by higher priority thread. 4BSD has different migration logic, so behavior could be different there. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 19:43:35 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C2CBB1065677; Sat, 24 Jul 2010 19:43:35 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from vps.hungerhost.com (vps.hungerhost.com [216.38.53.176]) by mx1.freebsd.org (Postfix) with ESMTP id DC5EB8FC13; Sat, 24 Jul 2010 19:43:35 +0000 (UTC) Received: from host-216-220-114-135.dsl.bway.net ([216.220.114.135] helo=[192.168.99.42]) by vps.hungerhost.com with esmtpa (Exim 4.69) (envelope-from ) id 1Ocjrp-0006q6-BD; Sat, 24 Jul 2010 14:54:37 -0400 Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: George Neville-Neil In-Reply-To: Date: Sat, 24 Jul 2010 14:54:36 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <2A761020-866F-48C2-B8B9-8C847C668A25@freebsd.org> References: <201007231753.o6NHresT072278@svn.freebsd.org> To: pluknet X-Mailer: Apple Mail (2.1081) X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - vps.hungerhost.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - freebsd.org X-Source: X-Source-Args: X-Source-Dir: Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210428 - head/sys/dev/e1000 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 19:43:35 -0000 On Jul 23, 2010, at 15:27 , pluknet wrote: > On 23 July 2010 21:53, George V. Neville-Neil wrote: >> Author: gnn >> Date: Fri Jul 23 17:53:39 2010 >> New Revision: 210428 >> URL: http://svn.freebsd.org/changeset/base/210428 >>=20 >> Log: >> Fix a bug in the statistics code for tracking the head and >> tail pointers of the tx and rx queues. We needed a SYSCTL_PROC >> to correctly get the values at run time. >>=20 >> Submitted by: Andrew Boyer aboyer at averesystems.com >> MFC after: 1 week >>=20 >> Modified: >> head/sys/dev/e1000/if_igb.c >>=20 >> Modified: head/sys/dev/e1000/if_igb.c >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/dev/e1000/if_igb.c Fri Jul 23 17:44:01 2010 = (r210427) >> +++ head/sys/dev/e1000/if_igb.c Fri Jul 23 17:53:39 2010 = (r210428) >> @@ -4927,6 +4927,74 @@ igb_update_vf_stats_counters(struct adap >> } >>=20 >>=20 >> +/** igb_sysctl_tdh_handler - Handler function >> + * Retrieves the TDH value from the hardware >> + */ >> +static int igb_sysctl_tdh_handler(SYSCTL_HANDLER_ARGS) >> +{ >=20 > ^^ > This function definition (and three ones below) breaks style(9): > " The function type should be on a line by itself preceding the = function." >=20 Quite right, I've committed a style(9) fix. Thanks, George From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 20:02:46 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28A4D1065677 for ; Sat, 24 Jul 2010 20:02:46 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx21.fluidhosting.com [204.14.89.4]) by mx1.freebsd.org (Postfix) with ESMTP id DF9DF8FC15 for ; Sat, 24 Jul 2010 20:02:45 +0000 (UTC) Received: (qmail 30815 invoked by uid 399); 24 Jul 2010 20:02:44 -0000 Received: from localhost (HELO laptop.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 24 Jul 2010 20:02:44 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Date: Sat, 24 Jul 2010 13:02:43 -0700 (PDT) From: Doug Barton To: Alexander Motin In-Reply-To: <4C4B4231.80406@FreeBSD.org> Message-ID: References: <201007241049.o6OAnxvo001874@svn.freebsd.org> <4C4B4231.80406@FreeBSD.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) X-message-flag: Outlook -- Not just for spreading viruses anymore! OpenPGP: id=1A1ABC84 Organization: http://SupersetSolutions.com/ MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r210444 - head/sys/x86/x86 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 20:02:46 -0000 On Sat, 24 Jul 2010, Alexander Motin wrote: > Doug Barton wrote: >> On Sat, 24 Jul 2010, Alexander Motin wrote: >>> Author: mav >>> Date: Sat Jul 24 10:49:59 2010 >>> New Revision: 210444 >>> URL: http://svn.freebsd.org/changeset/base/210444 >>> >>> Log: >>> Increment td->td_intr_nesting_level for LAPIC timer interrupts. Among >>> other >>> things it hints SCHED_ULE to run clock swi handlers on their native >>> CPUs, >>> avoiding many unneeded IPI_PREEMPT calls. >> >> Will this help SCHED_4BSD at all? I'm finding it to be slightly better >> for interactivity on a loaded system, but frankly at this point they >> both leave a lot to be desired. > > At least not directly. SCHED_4BSD doesn't use this variable. But I have > no idea if the problem exist there. Even on SCHED_ULE it happens only in > some cases, if swi thread was accidentally pushed out of it's CPU by > higher priority thread. 4BSD has different migration logic, so behavior > could be different there. Ok, thanks. Doug -- Improve the effectiveness of your Internet presence with a domain name makeover! http://SupersetSolutions.com/ Computers are useless. They can only give you answers. -- Pablo Picasso From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 22:11:11 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B90211065670; Sat, 24 Jul 2010 22:11:11 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id C9AAD8FC0A; Sat, 24 Jul 2010 22:11:11 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OMBBQO052119; Sat, 24 Jul 2010 22:11:11 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OMBBVR052104; Sat, 24 Jul 2010 22:11:11 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007242211.o6OMBBVR052104@svn.freebsd.org> From: Rick Macklem Date: Sat, 24 Jul 2010 22:11:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210455 - in head/sys: conf fs/nfsclient modules modules/nfscl modules/nfsclient modules/nfslock nfs nfsclient X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 22:11:11 -0000 Author: rmacklem Date: Sat Jul 24 22:11:11 2010 New Revision: 210455 URL: http://svn.freebsd.org/changeset/base/210455 Log: Move sys/nfsclient/nfs_lock.c into sys/nfs and build it as a separate module that can be used by both the regular and experimental nfs clients. This fixes the problem reported by jh@ where /dev/nfslock would be registered twice when both nfs clients were used. I also defined the size of the lm_fh field to be the correct value, as it should be the maximum size of an NFSv3 file handle. Reviewed by: jh MFC after: 2 weeks Added: head/sys/modules/nfslock/ head/sys/modules/nfslock/Makefile (contents, props changed) head/sys/nfs/nfs_lock.c - copied, changed from r210454, head/sys/nfsclient/nfs_lock.c head/sys/nfs/nfs_lock.h - copied, changed from r210454, head/sys/nfsclient/nfs_lock.h Deleted: head/sys/fs/nfsclient/nfs_cllock.c head/sys/fs/nfsclient/nfs_lock.h head/sys/nfsclient/nfs_lock.c head/sys/nfsclient/nfs_lock.h Modified: head/sys/conf/files head/sys/fs/nfsclient/nfs_clnfsiod.c head/sys/fs/nfsclient/nfs_clport.c head/sys/fs/nfsclient/nfs_clsubs.c head/sys/fs/nfsclient/nfs_clvnops.c head/sys/modules/Makefile head/sys/modules/nfscl/Makefile head/sys/modules/nfsclient/Makefile head/sys/nfsclient/nfs_nfsiod.c head/sys/nfsclient/nfs_vfsops.c head/sys/nfsclient/nfs_vnops.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jul 24 19:40:16 2010 (r210454) +++ head/sys/conf/files Sat Jul 24 22:11:11 2010 (r210455) @@ -1914,7 +1914,6 @@ fs/nfsclient/nfs_clrpcops.c optional nfs fs/nfsclient/nfs_clvnops.c optional nfscl fs/nfsclient/nfs_clnode.c optional nfscl fs/nfsclient/nfs_clvfsops.c optional nfscl -fs/nfsclient/nfs_cllock.c optional nfscl fs/nfsclient/nfs_clport.c optional nfscl fs/nfsclient/nfs_clbio.c optional nfscl fs/nfsclient/nfs_clnfsiod.c optional nfscl @@ -2680,6 +2679,7 @@ netsmb/smb_subr.c optional netsmb netsmb/smb_trantcp.c optional netsmb netsmb/smb_usr.c optional netsmb nfs/nfs_common.c optional nfsclient | nfsserver +nfs/nfs_lock.c optional nfsclient | nfscl nfsclient/bootp_subr.c optional bootp nfsclient nfsclient/krpc_subr.c optional bootp nfsclient nfsclient/nfs_bio.c optional nfsclient @@ -2690,7 +2690,6 @@ nfsclient/nfs_subs.c optional nfsclient nfsclient/nfs_nfsiod.c optional nfsclient nfsclient/nfs_vfsops.c optional nfsclient nfsclient/nfs_vnops.c optional nfsclient -nfsclient/nfs_lock.c optional nfsclient nfsserver/nfs_fha.c optional nfsserver nfsserver/nfs_serv.c optional nfsserver nfsserver/nfs_srvkrpc.c optional nfsserver Modified: head/sys/fs/nfsclient/nfs_clnfsiod.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clnfsiod.c Sat Jul 24 19:40:16 2010 (r210454) +++ head/sys/fs/nfsclient/nfs_clnfsiod.c Sat Jul 24 22:11:11 2010 (r210455) @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include extern struct mtx ncl_iod_mutex; Modified: head/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clport.c Sat Jul 24 19:40:16 2010 (r210454) +++ head/sys/fs/nfsclient/nfs_clport.c Sat Jul 24 22:11:11 2010 (r210455) @@ -1268,4 +1268,5 @@ MODULE_VERSION(nfscl, 1); MODULE_DEPEND(nfscl, nfscommon, 1, 1, 1); MODULE_DEPEND(nfscl, krpc, 1, 1, 1); MODULE_DEPEND(nfscl, nfssvc, 1, 1, 1); +MODULE_DEPEND(nfscl, nfslock, 1, 1, 1); Modified: head/sys/fs/nfsclient/nfs_clsubs.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clsubs.c Sat Jul 24 19:40:16 2010 (r210454) +++ head/sys/fs/nfsclient/nfs_clsubs.c Sat Jul 24 22:11:11 2010 (r210455) @@ -67,7 +67,6 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include #include Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Sat Jul 24 19:40:16 2010 (r210454) +++ head/sys/fs/nfsclient/nfs_clvnops.c Sat Jul 24 22:11:11 2010 (r210455) @@ -67,24 +67,24 @@ __FBSDID("$FreeBSD$"); #include #include - #include #include #include #include -#include #include #include #include +#include + /* Defs */ #define TRUE 1 #define FALSE 0 extern struct nfsstats newnfsstats; MALLOC_DECLARE(M_NEWNFSREQ); -vop_advlock_t *ncl_advlock_p = ncl_dolock; +vop_advlock_t *ncl_advlock_p = nfs_dolock; /* * Ifdef for FreeBSD-current merged buffer cache. It is unfortunate that these Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sat Jul 24 19:40:16 2010 (r210454) +++ head/sys/modules/Makefile Sat Jul 24 22:11:11 2010 (r210455) @@ -205,6 +205,7 @@ SUBDIR= ${_3dfx} \ nfsclient \ nfscommon \ nfsd \ + nfslock \ nfslockd \ nfsserver \ nfssvc \ Modified: head/sys/modules/nfscl/Makefile ============================================================================== --- head/sys/modules/nfscl/Makefile Sat Jul 24 19:40:16 2010 (r210454) +++ head/sys/modules/nfscl/Makefile Sat Jul 24 22:11:11 2010 (r210455) @@ -9,7 +9,6 @@ SRCS= vnode_if.h \ nfs_clcomsubs.c \ nfs_clport.c \ nfs_clbio.c \ - nfs_cllock.c \ nfs_clnfsiod.c \ nfs_clnode.c \ nfs_clsubs.c \ Modified: head/sys/modules/nfsclient/Makefile ============================================================================== --- head/sys/modules/nfsclient/Makefile Sat Jul 24 19:40:16 2010 (r210454) +++ head/sys/modules/nfsclient/Makefile Sat Jul 24 22:11:11 2010 (r210455) @@ -4,7 +4,7 @@ KMOD= nfsclient SRCS= vnode_if.h \ - nfs_bio.c nfs_lock.c nfs_node.c nfs_subs.c nfs_nfsiod.c \ + nfs_bio.c nfs_node.c nfs_subs.c nfs_nfsiod.c \ nfs_vfsops.c nfs_vnops.c nfs_krpc.c \ opt_inet.h opt_nfs.h opt_bootp.h opt_nfsroot.h SRCS+= opt_inet6.h opt_kdtrace.h opt_kgssapi.h Added: head/sys/modules/nfslock/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/nfslock/Makefile Sat Jul 24 22:11:11 2010 (r210455) @@ -0,0 +1,9 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../nfs +KMOD= nfslock +SRCS= vnode_if.h \ + nfs_lock.c \ + opt_nfs.h + +.include Copied and modified: head/sys/nfs/nfs_lock.c (from r210454, head/sys/nfsclient/nfs_lock.c) ============================================================================== --- head/sys/nfsclient/nfs_lock.c Sat Jul 24 19:40:16 2010 (r210454, copy source) +++ head/sys/nfs/nfs_lock.c Sat Jul 24 22:11:11 2010 (r210455) @@ -54,10 +54,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include -#include #include extern void (*nlminfo_release_p)(struct proc *p); Copied and modified: head/sys/nfs/nfs_lock.h (from r210454, head/sys/nfsclient/nfs_lock.h) ============================================================================== --- head/sys/nfsclient/nfs_lock.h Sat Jul 24 19:40:16 2010 (r210454, copy source) +++ head/sys/nfs/nfs_lock.h Sat Jul 24 22:11:11 2010 (r210455) @@ -37,8 +37,6 @@ * If a structure changes, you must bump the version number. */ -#include - /* * The fifo where the kernel writes requests for locks on remote NFS files, * and where lockd reads these requests. @@ -74,7 +72,7 @@ typedef struct __lock_msg { int lm_nfsv3; /* If NFS version 3. */ size_t lm_fh_len; /* The file handle length. */ struct xucred lm_cred; /* user cred for lock req */ - u_int8_t lm_fh[NFS_SMALLFH];/* The file handle. */ + u_int8_t lm_fh[NFSX_V3FHMAX];/* The file handle. */ } LOCKD_MSG; #define LOCKD_ANS_VERSION 1 Modified: head/sys/nfsclient/nfs_nfsiod.c ============================================================================== --- head/sys/nfsclient/nfs_nfsiod.c Sat Jul 24 19:40:16 2010 (r210454) +++ head/sys/nfsclient/nfs_nfsiod.c Sat Jul 24 22:11:11 2010 (r210455) @@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include static MALLOC_DEFINE(M_NFSSVC, "nfsclient_srvsock", "Nfs server structure"); Modified: head/sys/nfsclient/nfs_vfsops.c ============================================================================== --- head/sys/nfsclient/nfs_vfsops.c Sat Jul 24 19:40:16 2010 (r210454) +++ head/sys/nfsclient/nfs_vfsops.c Sat Jul 24 22:11:11 2010 (r210455) @@ -148,6 +148,7 @@ MODULE_DEPEND(nfs, krpc, 1, 1, 1); MODULE_DEPEND(nfs, kgssapi, 1, 1, 1); #endif MODULE_DEPEND(nfs, nfs_common, 1, 1, 1); +MODULE_DEPEND(nfs, nfslock, 1, 1, 1); static struct nfs_rpcops nfs_rpcops = { nfs_readrpc, Modified: head/sys/nfsclient/nfs_vnops.c ============================================================================== --- head/sys/nfsclient/nfs_vnops.c Sat Jul 24 19:40:16 2010 (r210454) +++ head/sys/nfsclient/nfs_vnops.c Sat Jul 24 22:11:11 2010 (r210455) @@ -75,7 +75,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 22:16:15 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1A0F9106567B; Sat, 24 Jul 2010 22:16:15 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 3F4218FC12; Sat, 24 Jul 2010 22:16:15 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OMGEiI053231; Sat, 24 Jul 2010 22:16:14 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OMGE64053229; Sat, 24 Jul 2010 22:16:14 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201007242216.o6OMGE64053229@svn.freebsd.org> From: Rick Macklem Date: Sat, 24 Jul 2010 22:16:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210456 - head/usr.sbin/rpc.lockd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 22:16:15 -0000 Author: rmacklem Date: Sat Jul 24 22:16:14 2010 New Revision: 210456 URL: http://svn.freebsd.org/changeset/base/210456 Log: Fix the include path for nfs_lock.h. MFC after: 2 weeks Modified: head/usr.sbin/rpc.lockd/kern.c Modified: head/usr.sbin/rpc.lockd/kern.c ============================================================================== --- head/usr.sbin/rpc.lockd/kern.c Sat Jul 24 22:11:11 2010 (r210455) +++ head/usr.sbin/rpc.lockd/kern.c Sat Jul 24 22:16:14 2010 (r210456) @@ -54,7 +54,7 @@ __FBSDID("$FreeBSD$"); #include "nlm_prot.h" #include -#include +#include #include "lockd.h" #include "lockd_lock.h" From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 22:28:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 704961065670; Sat, 24 Jul 2010 22:28:29 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 74D018FC19; Sat, 24 Jul 2010 22:28:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6OMSTCb056013; Sat, 24 Jul 2010 22:28:29 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6OMSTJ4056011; Sat, 24 Jul 2010 22:28:29 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201007242228.o6OMSTJ4056011@svn.freebsd.org> From: Martin Matuska Date: Sat, 24 Jul 2010 22:28:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210457 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 22:28:29 -0000 Author: mm Date: Sat Jul 24 22:28:29 2010 New Revision: 210457 URL: http://svn.freebsd.org/changeset/base/210457 Log: Consider snapshots as descendants via zfs allow -d OpenSolaris onnv changeset: 9847:2f3ba86e857a Approved by: pjd, delphij (mentor) Obtained from: OpenSolaris (Bug ID 6809340) MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c Sat Jul 24 22:16:14 2010 (r210456) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c Sat Jul 24 22:28:29 2010 (r210457) @@ -19,7 +19,7 @@ * CDDL HEADER END */ /* - * Copyright 2008 Sun Microsystems, Inc. All rights reserved. + * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ @@ -66,8 +66,6 @@ * The ZAP OBJ is referred to as the jump object. */ -#pragma ident "%Z%%M% %I% %E% SMI" - #include #include #include @@ -540,7 +538,7 @@ dsl_deleg_access(const char *dsname, con dsl_pool_t *dp; void *cookie; int error; - char checkflag = ZFS_DELEG_LOCAL; + char checkflag; objset_t *mos; avl_tree_t permsets; perm_set_t *setnode; @@ -563,6 +561,16 @@ dsl_deleg_access(const char *dsname, con return (EPERM); } + if (dsl_dataset_is_snapshot(ds)) { + /* + * Snapshots are treated as descendents only, + * local permissions do not apply. + */ + checkflag = ZFS_DELEG_DESCENDENT; + } else { + checkflag = ZFS_DELEG_LOCAL; + } + avl_create(&permsets, perm_set_compare, sizeof (perm_set_t), offsetof(perm_set_t, p_node)); From owner-svn-src-all@FreeBSD.ORG Sat Jul 24 23:41:10 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 54C05106566C; Sat, 24 Jul 2010 23:41:10 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 611938FC0C; Sat, 24 Jul 2010 23:41:10 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6ONfABu071874; Sat, 24 Jul 2010 23:41:10 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6ONfAXB071871; Sat, 24 Jul 2010 23:41:10 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201007242341.o6ONfAXB071871@svn.freebsd.org> From: Andrew Turner Date: Sat, 24 Jul 2010 23:41:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r210458 - head/sys/arm/s3c2xx0 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jul 2010 23:41:10 -0000 Author: andrew Date: Sat Jul 24 23:41:09 2010 New Revision: 210458 URL: http://svn.freebsd.org/changeset/base/210458 Log: Allow external interrupts. - Set the external pin to interrupt in bus_setup_intr - Implement bus_config_intr for external interrupts - Extend arm_{,un}mask_irq to work with external interrupts Approved by: imp (mentor) Modified: head/sys/arm/s3c2xx0/s3c24x0.c head/sys/arm/s3c2xx0/s3c24x0reg.h Modified: head/sys/arm/s3c2xx0/s3c24x0.c ============================================================================== --- head/sys/arm/s3c2xx0/s3c24x0.c Sat Jul 24 22:28:29 2010 (r210457) +++ head/sys/arm/s3c2xx0/s3c24x0.c Sat Jul 24 23:41:09 2010 (r210458) @@ -118,6 +118,8 @@ static int s3c24x0_setup_intr(device_t, driver_filter_t *, driver_intr_t *, void *, void **); static int s3c24x0_teardown_intr(device_t, device_t, struct resource *, void *); +static int s3c24x0_config_intr(device_t, int, enum intr_trigger, + enum intr_polarity); static struct resource *s3c24x0_alloc_resource(device_t, device_t, int, int *, u_long, u_long, u_long, u_int); static int s3c24x0_activate_resource(device_t, device_t, int, int, @@ -134,6 +136,7 @@ static device_method_t s3c24x0_methods[] DEVMETHOD(device_identify, s3c24x0_identify), DEVMETHOD(bus_setup_intr, s3c24x0_setup_intr), DEVMETHOD(bus_teardown_intr, s3c24x0_teardown_intr), + DEVMETHOD(bus_config_intr, s3c24x0_config_intr), DEVMETHOD(bus_alloc_resource, s3c24x0_alloc_resource), DEVMETHOD(bus_activate_resource, s3c24x0_activate_resource), DEVMETHOD(bus_release_resource, s3c24x0_release_resource), @@ -176,6 +179,30 @@ s3c24x0_add_child(device_t bus, int prio return (child); } +static void +s3c24x0_enable_ext_intr(unsigned int irq) +{ + uint32_t reg, value; + int offset; + + if (irq <= 7) { + reg = GPIO_PFCON; + offset = irq * 2; + } else if (irq <= 23) { + reg = GPIO_PGCON; + offset = (irq - 8) * 2; + } else + return; + + /* Make the pin an interrupt source */ + value = bus_space_read_4(s3c2xx0_softc->sc_iot, + s3c2xx0_softc->sc_gpio_ioh, reg); + value &= ~(3 << offset); + value |= 2 << offset; + bus_space_write_4(s3c2xx0_softc->sc_iot, s3c2xx0_softc->sc_gpio_ioh, + reg, value); +} + static int s3c24x0_setup_intr(device_t dev, device_t child, struct resource *ires, int flags, driver_filter_t *filt, @@ -189,6 +216,10 @@ s3c24x0_setup_intr(device_t dev, device_ return (error); for (irq = rman_get_start(ires); irq <= rman_get_end(ires); irq++) { + if (irq >= S3C24X0_EXTIRQ_MIN && irq <= S3C24X0_EXTIRQ_MAX) { + /* Enable the external interrupt pin */ + s3c24x0_enable_ext_intr(irq - S3C24X0_EXTIRQ_MIN); + } arm_unmask_irq(irq); } return (0); @@ -201,6 +232,59 @@ s3c24x0_teardown_intr(device_t dev, devi return (BUS_TEARDOWN_INTR(device_get_parent(dev), child, res, cookie)); } +static int +s3c24x0_config_intr(device_t dev, int irq, enum intr_trigger trig, + enum intr_polarity pol) +{ + uint32_t mask, reg, value; + int offset; + + /* Only external interrupts can be configured */ + if (irq < S3C24X0_EXTIRQ_MIN || irq > S3C24X0_EXTIRQ_MAX) + return (EINVAL); + + /* There is no standard trigger or polarity for the bus */ + if (trig == INTR_TRIGGER_CONFORM || pol == INTR_POLARITY_CONFORM) + return (EINVAL); + + irq -= S3C24X0_EXTIRQ_MIN; + + /* Get the bits to set */ + mask = 0; + if (pol == INTR_POLARITY_LOW) { + mask = 2; + } else if (pol == INTR_POLARITY_HIGH) { + mask = 4; + } + if (trig == INTR_TRIGGER_LEVEL) { + mask >>= 2; + } + + /* Get the register to set */ + if (irq <= 7) { + reg = GPIO_EXTINT(0); + offset = irq * 4; + } else if (irq <= 15) { + reg = GPIO_EXTINT(1); + offset = (irq - 8) * 4; + } else if (irq <= 23) { + reg = GPIO_EXTINT(2); + offset = (irq - 16) * 4; + } else { + return (EINVAL); + } + + /* Set the new signaling method */ + value = bus_space_read_4(s3c2xx0_softc->sc_iot, + s3c2xx0_softc->sc_gpio_ioh, reg); + value &= ~(7 << offset); + value |= mask << offset; + bus_space_write_4(s3c2xx0_softc->sc_iot, + s3c2xx0_softc->sc_gpio_ioh, reg, value); + + return (0); +} + static struct resource * s3c24x0_alloc_resource(device_t bus, device_t child, int type, int *rid, u_long start, u_long end, u_long count, u_int flags) @@ -356,6 +440,7 @@ s3c24x0_attach(device_t dev) bus_space_tag_t iot; device_t child; unsigned int i, j; + u_long irqmax; s3c2xx0_softc = &(sc->sc_sx); sc->sc_sx.sc_iot = iot = &s3c2xx0_bs_tag; @@ -363,10 +448,6 @@ s3c24x0_attach(device_t dev) s3c2xx0_softc->s3c2xx0_irq_rman.rm_descr = "S3C24X0 IRQs"; s3c2xx0_softc->s3c2xx0_mem_rman.rm_type = RMAN_ARRAY; s3c2xx0_softc->s3c2xx0_mem_rman.rm_descr = "S3C24X0 Device Registers"; - if (rman_init(&s3c2xx0_softc->s3c2xx0_irq_rman) != 0 || - rman_manage_region(&s3c2xx0_softc->s3c2xx0_irq_rman, 0, - S3C2410_SUBIRQ_MAX) != 0) /* XXX Change S3C2440_SUBIRQ_MAX depending on micro */ - panic("s3c24x0_attach: failed to set up IRQ rman"); /* Manage the registor memory space */ if ((rman_init(&s3c2xx0_softc->s3c2xx0_mem_rman) != 0) || (rman_manage_region(&s3c2xx0_softc->s3c2xx0_mem_rman, @@ -388,6 +469,22 @@ s3c24x0_attach(device_t dev) */ s3c24x0_identify_cpu(dev); + /* + * Manage the interrupt space. + * We need to put this after s3c24x0_identify_cpu as the avaliable + * interrupts change depending on which CPU we have. + */ + if (sc->sc_sx.sc_cpu == CPU_S3C2410) + irqmax = S3C2410_SUBIRQ_MAX; + else + irqmax = S3C2440_SUBIRQ_MAX; + if (rman_init(&s3c2xx0_softc->s3c2xx0_irq_rman) != 0 || + rman_manage_region(&s3c2xx0_softc->s3c2xx0_irq_rman, 0, + irqmax) != 0 || + rman_manage_region(&s3c2xx0_softc->s3c2xx0_irq_rman, + S3C24X0_EXTIRQ_MIN, S3C24X0_EXTIRQ_MAX)) + panic("s3c24x0_attach: failed to set up IRQ rman"); + /* calculate current clock frequency */ s3c24x0_clock_freq(&sc->sc_sx); device_printf(dev, "fclk %d MHz hclk %d MHz pclk %d MHz\n", @@ -607,6 +704,33 @@ arm_get_next_irq(int last __unused) return (irq); return (S3C24X0_SUBIRQ_MIN + subirq); + + case S3C24X0_INT_0: + case S3C24X0_INT_1: + case S3C24X0_INT_2: + case S3C24X0_INT_3: + /* There is a 1:1 mapping to the IRQ we are handling */ + return S3C24X0_INT_EXT(irq); + + case S3C24X0_INT_4_7: + case S3C24X0_INT_8_23: + /* Find the external interrupt being called */ + subirq = 0x7fffff; + subirq &= bus_space_read_4(&s3c2xx0_bs_tag, + s3c2xx0_softc->sc_gpio_ioh, GPIO_EINTPEND); + subirq &= ~bus_space_read_4(&s3c2xx0_bs_tag, + s3c2xx0_softc->sc_gpio_ioh, GPIO_EINTMASK); + if (subirq == 0) + return (irq); + + subirq = ffs(subirq) - 1; + + /* Clear the external irq pending bit */ + bus_space_write_4(&s3c2xx0_bs_tag, + s3c2xx0_softc->sc_gpio_ioh, GPIO_EINTPEND, + (1 << subirq)); + + return S3C24X0_INT_EXT(subirq); } return (irq); @@ -619,18 +743,28 @@ arm_mask_irq(uintptr_t irq) { u_int32_t mask; + if (irq >= S3C24X0_INT_EXT(0) && irq <= S3C24X0_INT_EXT(3)) { + /* External interrupt 0..3 are directly mapped to irq 0..3 */ + irq -= S3C24X0_EXTIRQ_MIN; + } if (irq < S3C24X0_SUBIRQ_MIN) { mask = bus_space_read_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTMSK); mask |= (1 << irq); bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTMSK, mask); - } else { + } else if (irq < S3C24X0_EXTIRQ_MIN) { mask = bus_space_read_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK); mask |= (1 << (irq - S3C24X0_SUBIRQ_MIN)); bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK, mask); + } else { + mask = bus_space_read_4(&s3c2xx0_bs_tag, + s3c2xx0_softc->sc_gpio_ioh, GPIO_EINTMASK); + mask |= (1 << (irq - S3C24X0_EXTIRQ_MIN)); + bus_space_write_4(&s3c2xx0_bs_tag, + s3c2xx0_softc->sc_intctl_ioh, GPIO_EINTMASK, mask); } } @@ -639,17 +773,27 @@ arm_unmask_irq(uintptr_t irq) { u_int32_t mask; + if (irq >= S3C24X0_INT_EXT(0) && irq <= S3C24X0_INT_EXT(3)) { + /* External interrupt 0..3 are directly mapped to irq 0..3 */ + irq -= S3C24X0_EXTIRQ_MIN; + } if (irq < S3C24X0_SUBIRQ_MIN) { mask = bus_space_read_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTMSK); mask &= ~(1 << irq); bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTMSK, mask); - } else { + } else if (irq < S3C24X0_EXTIRQ_MIN) { mask = bus_space_read_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK); mask &= ~(1 << (irq - S3C24X0_SUBIRQ_MIN)); bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK, mask); + } else { + mask = bus_space_read_4(&s3c2xx0_bs_tag, + s3c2xx0_softc->sc_gpio_ioh, GPIO_EINTMASK); + mask &= ~(1 << (irq - S3C24X0_EXTIRQ_MIN)); + bus_space_write_4(&s3c2xx0_bs_tag, + s3c2xx0_softc->sc_intctl_ioh, GPIO_EINTMASK, mask); } } Modified: head/sys/arm/s3c2xx0/s3c24x0reg.h ============================================================================== --- head/sys/arm/s3c2xx0/s3c24x0reg.h Sat Jul 24 22:28:29 2010 (r210457) +++ head/sys/arm/s3c2xx0/s3c24x0reg.h Sat Jul 24 23:41:09 2010 (r210458) @@ -207,7 +207,10 @@ #define S3C24X0_INT_BFLT 7 /* Battery fault */ #define S3C24X0_INT_8_23 5 /* Ext int 8..23 */ #define S3C24X0_INT_4_7 4 /* Ext int 4..7 */ -#define S3C24X0_INT_EXT(n) (n) /* External interrupt [3:0] for 24{1,4}0 */ +#define S3C24X0_INT_3 3 +#define S3C24X0_INT_2 2 +#define S3C24X0_INT_1 1 +#define S3C24X0_INT_0 0 /* 24{1,4}0 has more than 32 interrupt sources. These are sub-sources * that are OR-ed into main interrupt sources, and controlled via @@ -230,6 +233,15 @@ #define S3C24X0_INT_TXD0 (S3C24X0_SUBIRQ_MIN+1) /* UART0 Tx */ #define S3C24X0_INT_RXD0 (S3C24X0_SUBIRQ_MIN+0) /* UART0 Rx */ +/* + * Support for external interrupts. We use values from 48 + * to allow new CPU's to allocate new subirq's. + */ +#define S3C24X0_EXTIRQ_MIN 48 +#define S3C24X0_EXTIRQ_COUNT 24 +#define S3C24X0_EXTIRQ_MAX (S3C24X0_EXTIRQ_MIN + S3C24X0_EXTIRQ_COUNT - 1) +#define S3C24X0_INT_EXT(n) (S3C24X0_EXTIRQ_MIN + (n)) + /* DMA controller */ /* XXX */