From owner-svn-src-all@freebsd.org Thu Oct 22 23:03:26 2015 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1534FA1C3DF; Thu, 22 Oct 2015 23:03:26 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D49AB6EB; Thu, 22 Oct 2015 23:03:25 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9MN3O0h093982; Thu, 22 Oct 2015 23:03:24 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9MN3Onh093981; Thu, 22 Oct 2015 23:03:24 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510222303.t9MN3Onh093981@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Thu, 22 Oct 2015 23:03:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289775 - head/sys/dev/ntb/if_ntb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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 Oct 2015 23:03:26 -0000 Author: cem Date: Thu Oct 22 23:03:24 2015 New Revision: 289775 URL: https://svnweb.freebsd.org/changeset/base/289775 Log: if_ntb: Use ffsll() now that it is broadly available Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/if_ntb/if_ntb.c Modified: head/sys/dev/ntb/if_ntb/if_ntb.c ============================================================================== --- head/sys/dev/ntb/if_ntb/if_ntb.c Thu Oct 22 23:03:15 2015 (r289774) +++ head/sys/dev/ntb/if_ntb/if_ntb.c Thu Oct 22 23:03:24 2015 (r289775) @@ -1150,14 +1150,7 @@ ntb_transport_doorbell_callback(void *da vec_mask = ntb_db_vector_mask(nt->ntb, vector); while (vec_mask != 0) { - qp_num = ffsl(vec_mask); - /* i386 doesn't have ffsll(), fake it */ - if (qp_num == 0) { - qp_num = ffsl(vec_mask >> 32); - KASSERT(qp_num != 0, ("ffs")); - qp_num += 32; - } - qp_num--; + qp_num = ffsll(vec_mask) - 1; if (test_bit(qp_num, &db_bits)) { qp = &nt->qp_vec[qp_num];