18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */ 28c2ecf20Sopenharmony_ci#ifndef __ASM_GENERIC_BITS_PER_LONG 38c2ecf20Sopenharmony_ci#define __ASM_GENERIC_BITS_PER_LONG 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <uapi/asm-generic/bitsperlong.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci 88c2ecf20Sopenharmony_ci#ifdef CONFIG_64BIT 98c2ecf20Sopenharmony_ci#define BITS_PER_LONG 64 108c2ecf20Sopenharmony_ci#else 118c2ecf20Sopenharmony_ci#define BITS_PER_LONG 32 128c2ecf20Sopenharmony_ci#endif /* CONFIG_64BIT */ 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci/* 158c2ecf20Sopenharmony_ci * FIXME: The check currently breaks x86-64 build, so it's 168c2ecf20Sopenharmony_ci * temporarily disabled. Please fix x86-64 and reenable 178c2ecf20Sopenharmony_ci */ 188c2ecf20Sopenharmony_ci#if 0 && BITS_PER_LONG != __BITS_PER_LONG 198c2ecf20Sopenharmony_ci#error Inconsistent word size. Check asm/bitsperlong.h 208c2ecf20Sopenharmony_ci#endif 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci#ifndef BITS_PER_LONG_LONG 238c2ecf20Sopenharmony_ci#define BITS_PER_LONG_LONG 64 248c2ecf20Sopenharmony_ci#endif 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci#endif /* __ASM_GENERIC_BITS_PER_LONG */ 27