From patchwork Sat Apr 18 00:39:56 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 2219 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776472834; bh=255lhdvmn/y2nLAEPap3v4KAcFogQcavPazSxUHDIvE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=oqmDHylV11iHNTyaaElcfTk3KtYqy/2X3w94dB7W+GcjvQkh7kt8ScHmbe9ku0Bi4 tpKPLvFa30dc29Q2o9A3pDZlkWPnyWFac/g0qAyGjdlPiXIKdsbJ/7wqf1PhQgOUO8 2rgnkSkmfwLNSHRTHX2ef8UHvcNk203rRmzCPFDE= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 85FC76A516 for ; Fri, 17 Apr 2026 18:40:34 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id cCaCEZM9izsC for ; Fri, 17 Apr 2026 18:40:34 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776472833; bh=255lhdvmn/y2nLAEPap3v4KAcFogQcavPazSxUHDIvE=; h=From:To:Date:In-Reply-To:References:CC:Subject:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=PmUXwU6uyvD70PgQFOsGUy/NCRYSFqswaMgt7IPam1haYFCTu8lFYoXES8PR9zLh2 JTNfzbaPffmxPFhB+1OE+DfI24hSpntGp+8zwBElwYJlhrf+rkAzcE+BNsF+tM3hG1 0rmgKzC9rDLfd/W8dEhFUX37XxXehmd3GFGhuqs8= Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 952C06A538 for ; Fri, 17 Apr 2026 18:40:33 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776472832; bh=P1/+MUD3s+xz0UwAXzJYMzXVFRrgUOJ33P1smpJJFWY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Xh7E8fLSxMArtd9gQzd0BJs3pfwbmmbN7GGgaoed/Y3yQXfK90TVS1FWxh+sMPfqf 7Vfg5m935ggMyJztXjX16E4NNCXD9o6HX/XBoKBm8zfEnyc4AhNOb8KNDgVTFXq+yq xfCnUtW9Ugnb3yXsQPZgOSONSvvXnCZJ+UaVsZek= Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 377236A543; Fri, 17 Apr 2026 18:40:32 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id ZimXTCTvrU5J; Fri, 17 Apr 2026 18:40:32 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1776472830; bh=36uzP8SBGPDtTKYtarLiKI1Ji9FBVmXWhIGGaUi5YVU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sSLKKf2Cad3QS7/qE/cAbShE1FdP83g8cc820Up9HIWESpjMY/Y8XQbrwk0QHi3Y/ 0VE0Gsr+Dfp8L6lckKRvzqSYmXBqbRE5XgDLs2Es3iQbOYzgmqkQ8CKoUdnCNf7b3W q3Ddr4ko4gUGTihdU3BKdUtl24we1mkUbjmAufrI= Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 45C426A53A; Fri, 17 Apr 2026 18:40:30 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 17 Apr 2026 18:39:56 -0600 Message-ID: <20260418004014.1889749-3-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260418004014.1889749-1-sjg@u-boot.org> References: <20260418004014.1889749-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: ZAKKEPT2UOLW3CXQOMSUNXSBXTUWOQ3F X-Message-ID-Hash: ZAKKEPT2UOLW3CXQOMSUNXSBXTUWOQ3F X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 02/10] linux: Use asm/atomic.h in fs, buffer_head, refcount List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass Including directly in linux/fs.h, linux/buffer_head.h and linux/refcount.h forces every consumer to the generic implementation, even on architectures with their own asm/atomic.h. On x86 this means atomic_add() and friends call local_irq_save() and local_irq_restore(), which are not declared, so any file that drags these headers in fails to build with -Werror=implicit-function-declaration. Switch the includes to so each architecture's per-arch atomic header wins. Architectures without one fall through to asm-generic transparently. Signed-off-by: Simon Glass --- include/linux/buffer_head.h | 2 +- include/linux/fs.h | 2 +- include/linux/refcount.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/buffer_head.h b/include/linux/buffer_head.h index 3b829e035aa..e844402500d 100644 --- a/include/linux/buffer_head.h +++ b/include/linux/buffer_head.h @@ -13,7 +13,7 @@ #include #include #include -#include +#include enum bh_state_bits { BH_Uptodate, /* Contains valid data */ diff --git a/include/linux/fs.h b/include/linux/fs.h index c8b95528013..89e683ca647 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -14,7 +14,7 @@ #include #include #include -#include +#include /* Forward declarations */ struct buffer_head; diff --git a/include/linux/refcount.h b/include/linux/refcount.h index ce001b437bf..6b6d84f308c 100644 --- a/include/linux/refcount.h +++ b/include/linux/refcount.h @@ -7,7 +7,7 @@ #ifndef _LINUX_REFCOUNT_H #define _LINUX_REFCOUNT_H -#include +#include /** * typedef refcount_t - reference count type