Hi Peter, On Mon, Nov 02, 2020 at 12:41:15AM +0300, Peter Mamonov wrote: > Memtester is an utility for testing the memory subsystem for faults. For > hardware developers, memtester can be told to test memory starting at a > particular physical address. Applied with some adjustments, thanks > +#include <linux/limits.h> > + > +#define rand32() random32() > + > +#if defined(CONFIG_32BIT) > + #define rand_ul() rand32() > + #define UL_ONEBITS 0xffffffff > + #define UL_LEN 32 > + #define CHECKERBOARD1 0x55555555 > + #define CHECKERBOARD2 0xaaaaaaaa > + #define UL_BYTE(x) ((x | x << 8 | x << 16 | x << 24)) > +#elif defined(CONFIG_64BIT) > + #define rand64() (((ul) rand32()) << 32 | ((ul) rand32())) > + #define rand_ul() rand64() > + #define UL_ONEBITS 0xffffffffffffffffUL > + #define UL_LEN 64 > + #define CHECKERBOARD1 0x5555555555555555 > + #define CHECKERBOARD2 0xaaaaaaaaaaaaaaaa > + #define UL_BYTE(x) (((ul)x | (ul)x<<8 | (ul)x<<16 | (ul)x<<24 | (ul)x<<32 | (ul)x<<40 | (ul)x<<48 | (ul)x<<56)) > +#else > + #error long on this platform is not 32 or 64 bits > +#endif CONFIG_32BIT is not always set, only CONFIG_64BIT is. I had to change this to #ifdef CONFIG_64BIT ... #else ... #endif Sascha -- Pengutronix e.K. | | Steuerwalder Str. 21 | http://www.pengutronix.de/ | 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox