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

@@ -1809,11 +1809,11 @@
 
         /*
          * granularity may or may not be a power of two. If it isn't, we can't
          * use a simple mask.
          */
-        if (attr->dma_attr_granular & (attr->dma_attr_granular - 1)) {
+        if (!ISP2(attr->dma_attr_granular)) {
                 dma->dp_granularity_power_2 = B_FALSE;
         } else {
                 dma->dp_granularity_power_2 = B_TRUE;
         }
 

@@ -3867,11 +3867,11 @@
                 /* mfn_to_pfn() is a NOP on i86pc */
                 pfn = mfn_to_pfn(cookie->dmac_laddress >> MMU_PAGESHIFT);
 #endif /* __amd64 */
 
                 /* figure out if the copybuf size is a power of 2 */
-                if (dma->dp_copybuf_size & (dma->dp_copybuf_size - 1)) {
+                if (!ISP2(dma->dp_copybuf_size)) {
                         copybuf_sz_power_2 = B_FALSE;
                 } else {
                         copybuf_sz_power_2 = B_TRUE;
                 }