xref: /kernel/linux/linux-6.6/include/uapi/asm-generic/swab.h (revision 62306a36)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/include/uapi/asm-generic/
162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
262306a36Sopenharmony_ci#ifndef _ASM_GENERIC_SWAB_H
362306a36Sopenharmony_ci#define _ASM_GENERIC_SWAB_H
462306a36Sopenharmony_ci
562306a36Sopenharmony_ci#include <asm/bitsperlong.h>
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci/*
862306a36Sopenharmony_ci * 32 bit architectures typically (but not always) want to
962306a36Sopenharmony_ci * set __SWAB_64_THRU_32__. In user space, this is only
1062306a36Sopenharmony_ci * valid if the compiler supports 64 bit data types.
1162306a36Sopenharmony_ci */
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci#if __BITS_PER_LONG == 32
1462306a36Sopenharmony_ci#if defined(__GNUC__) && !defined(__STRICT_ANSI__) || defined(__KERNEL__)
1562306a36Sopenharmony_ci#define __SWAB_64_THRU_32__
1662306a36Sopenharmony_ci#endif
1762306a36Sopenharmony_ci#endif
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci#endif /* _ASM_GENERIC_SWAB_H */
20

Indexes created Thu Nov 07 10:32:03 CST 2024