aboutsummaryrefslogtreecommitdiff
path: root/tools/arch
diff options
context:
space:
mode:
authorGravatar Huacai Chen <chenhuacai@loongson.cn> 2023-02-25 15:52:57 +0800
committerGravatar Huacai Chen <chenhuacai@loongson.cn> 2023-02-25 22:12:18 +0800
commit121ff07bdee06555835e26499f5c125223a6beb3 (patch)
tree0ccbc6c9204f9af5888151fa6a1b246accca56b6 /tools/arch
parentsamples/kprobes: Add LoongArch support (diff)
downloadlinux-121ff07bdee06555835e26499f5c125223a6beb3.tar.gz
linux-121ff07bdee06555835e26499f5c125223a6beb3.tar.bz2
linux-121ff07bdee06555835e26499f5c125223a6beb3.zip
tools: Add LoongArch build infrastructure
We will add tools support for LoongArch (bpf, perf, objtool, etc.), add build infrastructure and common headers for preparation. Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'tools/arch')
-rw-r--r--tools/arch/loongarch/include/uapi/asm/bitsperlong.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/arch/loongarch/include/uapi/asm/bitsperlong.h b/tools/arch/loongarch/include/uapi/asm/bitsperlong.h
new file mode 100644
index 000000000000..d4e32b3d4843
--- /dev/null
+++ b/tools/arch/loongarch/include/uapi/asm/bitsperlong.h
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
+#ifndef __ASM_LOONGARCH_BITSPERLONG_H
+#define __ASM_LOONGARCH_BITSPERLONG_H
+
+#define __BITS_PER_LONG (__SIZEOF_POINTER__ * 8)
+
+#include <asm-generic/bitsperlong.h>
+
+#endif /* __ASM_LOONGARCH_BITSPERLONG_H */