]> git.ipfire.org Git - people/arne_f/kernel.git/blame - arch/cris/include/arch-v32/arch/swab.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[people/arne_f/kernel.git] / arch / cris / include / arch-v32 / arch / swab.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
aa0effbd
HH
2#ifndef _ASM_CRIS_ARCH_SWAB_H
3#define _ASM_CRIS_ARCH_SWAB_H
4
5#include <asm/types.h>
6
7#define __SWAB_64_THRU_32__
8
9static inline __const__ __u32
10__arch_swab32(__u32 x)
11{
12 __asm__ __volatile__ ("swapwb %0" : "=r" (x) : "0" (x));
13 return (x);
14}
15#define __arch_swab32 __arch_swab32
16
17static inline __const__ __u16
18__arch_swab16(__u16 x)
19{
20 __asm__ __volatile__ ("swapb %0" : "=r" (x) : "0" (x));
21 return (x);
22}
23#define __arch_swab16 __arch_swab16
24
25#endif /* _ASM_CRIS_ARCH_SWAB_H */