aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/lib/bswapsi.c
diff options
context:
space:
mode:
authorWe-unite <3205135446@qq.com>2025-03-08 22:04:20 +0800
committerWe-unite <3205135446@qq.com>2025-03-08 22:04:20 +0800
commita07bb8fd1299070229f0e8f3dcb57ffd5ef9870a (patch)
tree84f21bd0bf7071bc5fc7dd989e77d7ceb5476682 /arch/mips/lib/bswapsi.c
downloadohosKernel-a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a.tar.gz
ohosKernel-a07bb8fd1299070229f0e8f3dcb57ffd5ef9870a.zip
Initial commit: OpenHarmony-v4.0-ReleaseOpenHarmony-v4.0-Release
Diffstat (limited to 'arch/mips/lib/bswapsi.c')
-rw-r--r--arch/mips/lib/bswapsi.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/arch/mips/lib/bswapsi.c b/arch/mips/lib/bswapsi.c
new file mode 100644
index 000000000..22d8e4f6d
--- /dev/null
+++ b/arch/mips/lib/bswapsi.c
@@ -0,0 +1,13 @@
1// SPDX-License-Identifier: GPL-2.0
2#include <linux/export.h>
3#include <linux/compiler.h>
4
5unsigned int notrace __bswapsi2(unsigned int u)
6{
7 return (((u) & 0xff000000) >> 24) |
8 (((u) & 0x00ff0000) >> 8) |
9 (((u) & 0x0000ff00) << 8) |
10 (((u) & 0x000000ff) << 24);
11}
12
13EXPORT_SYMBOL(__bswapsi2);