Print this page
5255 uts shouldn't open-code ISP2
@@ -30,10 +30,11 @@
* Implements all the routines necessary for setup, teardown, and
* alloc/free of all Hermon resources, including those that are managed
* by Hermon hardware or which live in Hermon's direct attached DDR memory.
*/
+#include <sys/sysmacros.h>
#include <sys/types.h>
#include <sys/conf.h>
#include <sys/ddi.h>
#include <sys/sunddi.h>
#include <sys/modctl.h>
@@ -2664,11 +2665,11 @@
* Round the configured number of QP per MCG to next larger
* power-of-2 size and update.
*/
num_qp_per_mcg = state->hs_cfg_profile->cp_num_qp_per_mcg + 8;
log2 = highbit(num_qp_per_mcg);
- if ((num_qp_per_mcg & (num_qp_per_mcg - 1)) == 0) {
+ if (ISP2(num_qp_per_mcg)) {
log2 = log2 - 1;
}
state->hs_cfg_profile->cp_num_qp_per_mcg = (1 << log2) - 8;
/* Now make sure number of QP per MCG makes sense */