diff --git a/include/lib/zt_common.h b/include/lib/zt_common.h index 437a2915..858d19cd 100644 --- a/include/lib/zt_common.h +++ b/include/lib/zt_common.h @@ -50,6 +50,10 @@ #define __ALIGN_MASK(x, mask) (((x) + (mask)) & ~(mask)) #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#ifndef ROUNDUP +# define ROUNDUP(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) +#endif + #define RELEASE_STRING STRINGIFY (S390_TOOLS_RELEASE) #define TOOLS_LIBDIR STRINGIFY (S390_TOOLS_LIBDIR) #define TOOLS_SYSCONFDIR STRINGIFY (S390_TOOLS_SYSCONFDIR) diff --git a/zdump/zg.h b/zdump/zg.h index dc1bdace..310474d7 100644 --- a/zdump/zg.h +++ b/zdump/zg.h @@ -94,7 +94,6 @@ void zg_stdout(const char *fmt, ...); */ #define PAGE_SIZE 4096UL #define PAGE_ALIGN(addr) ALIGN(addr, PAGE_SIZE) -#define ROUNDUP(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) static inline u32 zg_csum_partial(const void *buf, int len, u32 sum) { diff --git a/zipl/include/misc.h b/zipl/include/misc.h index f222d01e..d57a9c51 100644 --- a/zipl/include/misc.h +++ b/zipl/include/misc.h @@ -54,6 +54,5 @@ void misc_ebcdic_to_ascii(unsigned char *from, unsigned char *to); void misc_ascii_to_ebcdic(unsigned char *from, unsigned char *to); unsigned int misc_check_secure_boot(void); -#define ROUNDUP(x, y) ((((x) + ((y) - 1)) / (y)) * (y)) #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) #endif /* not MISC_H */