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

*** 1809,1819 **** /* * 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)) { dma->dp_granularity_power_2 = B_FALSE; } else { dma->dp_granularity_power_2 = B_TRUE; } --- 1809,1819 ---- /* * granularity may or may not be a power of two. If it isn't, we can't * use a simple mask. */ ! if (!ISP2(attr->dma_attr_granular)) { dma->dp_granularity_power_2 = B_FALSE; } else { dma->dp_granularity_power_2 = B_TRUE; }
*** 3867,3877 **** /* 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)) { copybuf_sz_power_2 = B_FALSE; } else { copybuf_sz_power_2 = B_TRUE; } --- 3867,3877 ---- /* 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 (!ISP2(dma->dp_copybuf_size)) { copybuf_sz_power_2 = B_FALSE; } else { copybuf_sz_power_2 = B_TRUE; }