Description: some macros expected to be in sys/param.h Index: b/usr/src/uts/common/sys/param.h =================================================================== --- a/usr/src/uts/common/sys/param.h 2014-03-01 22:56:06.894436513 +0400 +++ b/usr/src/uts/common/sys/param.h 2014-03-01 22:56:09.138760389 +0400 @@ -203,6 +203,17 @@ #endif /* + * Macros for counting and rounding. + */ +#define howmany(x, y) (((x)+((y)-1))/(y)) +#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) + +/* + * Macro to determine if value is a power of 2 + */ +#define powerof2(x) (((x) & ((x) - 1)) == 0) + +/* * MAXLINKNAMELEN defines the longest possible permitted datalink name, * including the terminating NUL. Note that this must not be larger * than related networking constants such as LIFNAMSIZ. Index: b/usr/src/uts/common/sys/sysmacros.h =================================================================== --- a/usr/src/uts/common/sys/sysmacros.h 2014-03-01 22:54:04.212714127 +0400 +++ b/usr/src/uts/common/sys/sysmacros.h 2014-03-01 22:56:09.140460526 +0400 @@ -214,15 +214,9 @@ #define IS_P2ALIGNED(v, a) ((((uintptr_t)(v)) & ((uintptr_t)(a) - 1)) == 0) /* - * Macros for counting and rounding. - */ -#define howmany(x, y) (((x)+((y)-1))/(y)) -#define roundup(x, y) ((((x)+((y)-1))/(y))*(y)) - -/* * Macro to determine if value is a power of 2 */ -#define ISP2(x) (((x) & ((x) - 1)) == 0) +#define ISP2(x) powerof2(x) /* * Macros for various sorts of alignment and rounding. The "align" must