summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2025-08-12 11:59:08 -0600
committerTom Rini <[email protected]>2025-08-19 11:25:28 -0600
commit66ff673a8e9f56d2c08a32d12867094c77ea5fd3 (patch)
tree40e0dab5279b3000da8d0c2f8b6ae52240374095
parent58998fed9e63e8310a96229565d2996ad29d191e (diff)
sandbox: Add generic asm/atomic.h
In order to compile code that uses <asm/atomic.h> on sandbox, we must provide this header. RISC-V shows us today how to do so with the generic header implementation, so copy that. Signed-off-by: Tom Rini <[email protected]>
-rw-r--r--arch/sandbox/include/asm/atomic.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/atomic.h b/arch/sandbox/include/asm/atomic.h
new file mode 100644
index 00000000000..2fe49f52f34
--- /dev/null
+++ b/arch/sandbox/include/asm/atomic.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Based on arch/riscv/include/asm/atomic.h which is:
+ * Copyright 2023 SiFive, Inc.
+ */
+
+#ifndef __SANDBOX_ATOMIC_H
+#define __SANDBOX_ATOMIC_H
+
+/* use the generic asm/atomic.h until we define a better one */
+
+#include <asm/system.h>
+#include <asm-generic/atomic.h>
+
+#endif