Path: blob/master/include/uapi/asm-generic/bitsperlong.h
26282 views
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */1#ifndef _UAPI__ASM_GENERIC_BITS_PER_LONG2#define _UAPI__ASM_GENERIC_BITS_PER_LONG34#ifndef __BITS_PER_LONG5/*6* In order to keep safe and avoid regression, only unify uapi7* bitsperlong.h for some archs which are using newer toolchains8* that have the definitions of __CHAR_BIT__ and __SIZEOF_LONG__.9* See the following link for more info:10* https://lore.kernel.org/linux-arch/[email protected]/11*/12#if defined(__CHAR_BIT__) && defined(__SIZEOF_LONG__)13#define __BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__)14#else15/*16* There seems to be no way of detecting this automatically from user17* space, so 64 bit architectures should override this in their18* bitsperlong.h. In particular, an architecture that supports19* both 32 and 64 bit user space must not rely on CONFIG_64BIT20* to decide it, but rather check a compiler provided macro.21*/22#define __BITS_PER_LONG 3223#endif24#endif2526#ifndef __BITS_PER_LONG_LONG27#define __BITS_PER_LONG_LONG 6428#endif2930#endif /* _UAPI__ASM_GENERIC_BITS_PER_LONG */313233