[Concept,03/10] fs: Use asm/atomic.h in linux_fs and ext4l

Message ID 20260418004014.1889749-4-sjg@u-boot.org
State New
Headers
Series efi-x86: boot Ubuntu live ISOs via U-Boot + BLS |

Commit Message

Simon Glass April 18, 2026, 12:39 a.m. UTC
  From: Simon Glass <sjg@chromium.org>

fs/linux_fs.c and fs/ext4l/support.c pull in <asm-generic/atomic.h>
directly, bypassing the per-arch implementation. On x86 the generic
inline functions reference local_irq_save() and local_irq_restore(),
which are not declared, so the files fail to build once the header is
actually used.

Switch these two remaining users in fs/ to <asm/atomic.h>, so each
architecture's per-arch atomic header wins. Architectures without one
fall through to asm-generic transparently.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 fs/ext4l/ext4_uboot.h | 2 +-
 fs/linux_fs.c         | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h
index 1d83ac43ccc..b79848f6a57 100644
--- a/fs/ext4l/ext4_uboot.h
+++ b/fs/ext4l/ext4_uboot.h
@@ -75,7 +75,7 @@ 
 #define no_printk(fmt, ...)	({ 0; })
 
 /* More Linux headers (alphabetical) */
-#include <asm-generic/atomic.h>
+#include <asm/atomic.h>
 #include <asm-generic/bitops/le.h>
 #include <asm-generic/bitops/lock.h>
 #include <asm-generic/timex.h>
diff --git a/fs/linux_fs.c b/fs/linux_fs.c
index 2237c567a9f..581df65432a 100644
--- a/fs/linux_fs.c
+++ b/fs/linux_fs.c
@@ -25,7 +25,7 @@ 
 #include <linux/pagemap.h>
 #include <linux/slab.h>
 #include <linux/bio.h>
-#include <asm-generic/atomic.h>
+#include <asm/atomic.h>
 
 #if IS_ENABLED(CONFIG_FS_EXT4L)
 #include "../fs/ext4l/ext4_uboot.h"