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

*** 1534,1544 **** /* * The cache attributes are mutually exclusive. Any combination of * the attributes leads to a failure. */ uint_t cache_attr = IOMEM_CACHE_ATTR(flags); ! if ((cache_attr != 0) && ((cache_attr & (cache_attr - 1)) != 0)) return (B_FALSE); /* All cache attributes are supported on X86/X64 */ if (cache_attr & (IOMEM_DATA_UNCACHED | IOMEM_DATA_CACHED | IOMEM_DATA_UC_WR_COMBINE)) --- 1534,1544 ---- /* * The cache attributes are mutually exclusive. Any combination of * the attributes leads to a failure. */ uint_t cache_attr = IOMEM_CACHE_ATTR(flags); ! if ((cache_attr != 0) && !ISP2(cache_attr)) return (B_FALSE); /* All cache attributes are supported on X86/X64 */ if (cache_attr & (IOMEM_DATA_UNCACHED | IOMEM_DATA_CACHED | IOMEM_DATA_UC_WR_COMBINE))
*** 1625,1636 **** if (length == 0 || kaddrp == NULL || attr == NULL) { return (DDI_FAILURE); } if (attr->dma_attr_minxfer == 0 || attr->dma_attr_align == 0 || ! (attr->dma_attr_align & (attr->dma_attr_align - 1)) || ! (attr->dma_attr_minxfer & (attr->dma_attr_minxfer - 1))) { return (DDI_FAILURE); } /* * figure out most restrictive alignment requirement --- 1625,1635 ---- if (length == 0 || kaddrp == NULL || attr == NULL) { return (DDI_FAILURE); } if (attr->dma_attr_minxfer == 0 || attr->dma_attr_align == 0 || ! !ISP2(attr->dma_attr_align) || !ISP2(attr->dma_attr_minxfer)) { return (DDI_FAILURE); } /* * figure out most restrictive alignment requirement