Print this page
5255 uts shouldn't open-code ISP2
@@ -2154,11 +2154,11 @@
"fasttrap-hash-size", FASTTRAP_TPOINTS_DEFAULT_SIZE);
if (nent == 0 || nent > 0x1000000)
nent = FASTTRAP_TPOINTS_DEFAULT_SIZE;
- if ((nent & (nent - 1)) == 0)
+ if (ISP2(nent))
fasttrap_tpoints.fth_nent = nent;
else
fasttrap_tpoints.fth_nent = 1 << fasttrap_highbit(nent);
ASSERT(fasttrap_tpoints.fth_nent > 0);
fasttrap_tpoints.fth_mask = fasttrap_tpoints.fth_nent - 1;
@@ -2167,11 +2167,11 @@
/*
* ... and the providers hash table...
*/
nent = FASTTRAP_PROVIDERS_DEFAULT_SIZE;
- if ((nent & (nent - 1)) == 0)
+ if (ISP2(nent))
fasttrap_provs.fth_nent = nent;
else
fasttrap_provs.fth_nent = 1 << fasttrap_highbit(nent);
ASSERT(fasttrap_provs.fth_nent > 0);
fasttrap_provs.fth_mask = fasttrap_provs.fth_nent - 1;
@@ -2180,11 +2180,11 @@
/*
* ... and the procs hash table.
*/
nent = FASTTRAP_PROCS_DEFAULT_SIZE;
- if ((nent & (nent - 1)) == 0)
+ if (ISP2(nent))
fasttrap_procs.fth_nent = nent;
else
fasttrap_procs.fth_nent = 1 << fasttrap_highbit(nent);
ASSERT(fasttrap_procs.fth_nent > 0);
fasttrap_procs.fth_mask = fasttrap_procs.fth_nent - 1;