[PATCH 2/2] sandbox: Add generic asm/atomic.h
Tom Rini
trini at konsulko.com
Tue Aug 12 19:59:08 CEST 2025
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 <trini at konsulko.com>
---
arch/sandbox/include/asm/atomic.h | 15 +++++++++++++++
1 file changed, 15 insertions(+)
create mode 100644 arch/sandbox/include/asm/atomic.h
diff --git a/arch/sandbox/include/asm/atomic.h b/arch/sandbox/include/asm/atomic.h
new file mode 100644
index 000000000000..2fe49f52f34e
--- /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
--
2.43.0
More information about the U-Boot
mailing list