libmetal/add-loongarch64-support-for-libmetal.patch
2024-06-18 15:14:08 +08:00

48 lines
1.3 KiB
Diff

From dad4708778f8bb649fa0b874c1e74d5f7b51cd75 Mon Sep 17 00:00:00 2001
From: Wenlong Zhang <zhangwenlong@loongson.cn>
Date: Tue, 18 Jun 2024 15:10:16 +0800
Subject: [PATCH] add loongarch64 support for libmetal
---
lib/processor/loongarch64/CMakeLists.txt | 3 +++
lib/processor/loongarch64/cpu.h | 17 +++++++++++++++++
2 files changed, 20 insertions(+)
create mode 100644 lib/processor/loongarch64/CMakeLists.txt
create mode 100644 lib/processor/loongarch64/cpu.h
diff --git a/lib/processor/loongarch64/CMakeLists.txt b/lib/processor/loongarch64/CMakeLists.txt
new file mode 100644
index 0000000..c06e951
--- /dev/null
+++ b/lib/processor/loongarch64/CMakeLists.txt
@@ -0,0 +1,3 @@
+collect (PROJECT_LIB_HEADERS cpu.h)
+
+# vim: expandtab:ts=2:sw=2:smartindent
diff --git a/lib/processor/loongarch64/cpu.h b/lib/processor/loongarch64/cpu.h
new file mode 100644
index 0000000..ea34eb6
--- /dev/null
+++ b/lib/processor/loongarch64/cpu.h
@@ -0,0 +1,17 @@
+/*
+ * Copyright (c) 2018, Pinecone Inc. and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/*
+ * @file cpu.h
+ * @brief CPU specific primitives
+ */
+
+#ifndef __METAL_LOONGARCH_CPU__H__
+#define __METAL_LOONGARCH_CPU__H__
+
+#define metal_cpu_yield()
+
+#endif /* __METAL_LOONGARCH_CPU__H__ */
--
2.43.0