18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ 28c2ecf20Sopenharmony_ci#ifndef _ASM_GENERIC_SWAB_H 38c2ecf20Sopenharmony_ci#define _ASM_GENERIC_SWAB_H 48c2ecf20Sopenharmony_ci 58c2ecf20Sopenharmony_ci#include <asm/bitsperlong.h> 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci/* 88c2ecf20Sopenharmony_ci * 32 bit architectures typically (but not always) want to 98c2ecf20Sopenharmony_ci * set __SWAB_64_THRU_32__. In user space, this is only 108c2ecf20Sopenharmony_ci * valid if the compiler supports 64 bit data types. 118c2ecf20Sopenharmony_ci */ 128c2ecf20Sopenharmony_ci 138c2ecf20Sopenharmony_ci#if __BITS_PER_LONG == 32 148c2ecf20Sopenharmony_ci#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__) 158c2ecf20Sopenharmony_ci#define __SWAB_64_THRU_32__ 168c2ecf20Sopenharmony_ci#endif 178c2ecf20Sopenharmony_ci#endif 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci#endif /* _ASM_GENERIC_SWAB_H */ 20