svn commit: r289775 - head/sys/dev/ntb/if_ntb

Conrad E. Meyer cem at FreeBSD.org
Thu Oct 22 23:03:26 UTC 2015


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];


More information about the svn-src-head mailing list