Print this page
5255 uts shouldn't open-code ISP2

@@ -31,10 +31,11 @@
  *    Implements all the routines necessary for setup, teardown, and
  *    alloc/free of all Tavor resources, including those that are managed
  *    by Tavor hardware or which live in Tavor'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>

@@ -2883,11 +2884,11 @@
          * Round the configured number of QP per MCG to next larger
          * power-of-2 size and update.
          */
         num_qp_per_mcg = state->ts_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->ts_cfg_profile->cp_num_qp_per_mcg = (1 << log2) - 8;
 
         /* Now make sure number of QP per MCG makes sense */