From patchwork Wed Jan 7 23:44:14 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1337 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=1767829642; bh=P/9ayjpyxebE04eAMKucUCVicyaaIz9Yid2sr4S/gW4=; 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=cYO98PiZYwhib73IGmzqG1CDmlWwSD+VYK3blelFHg8PoGoxNAgNKCq9PXKnbEycY LUvNp5VBirVmbZ2bcf0oNc42zgjTPK+nDt339JmRo++wL06ubw9lSAaJ6ARs8xob2i U6mLVtmpiwST+EA+NikVq3Mu6CsQnT/2gDSZ3amUZlIwDHogPxyL8smsboRK8MsJI0 +Iij412mHoHUjoyAR7XmtgSHTqCCXvQ0Y7xmdxW+f2WSWtbiH4JGaYRzY+rrVQMXJp 1CfqPXaIjjAz3tTgqmLGUBThdbszIDjTp+L3udApzqm5PsVoJbRJpg//ScsjEc1WuH SH34hmlGB8u5A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 48364691AF for ; Wed, 7 Jan 2026 16:47:22 -0700 (MST) 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 5YMQux4iIo0E for ; Wed, 7 Jan 2026 16:47:22 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767829642; bh=P/9ayjpyxebE04eAMKucUCVicyaaIz9Yid2sr4S/gW4=; 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=cYO98PiZYwhib73IGmzqG1CDmlWwSD+VYK3blelFHg8PoGoxNAgNKCq9PXKnbEycY LUvNp5VBirVmbZ2bcf0oNc42zgjTPK+nDt339JmRo++wL06ubw9lSAaJ6ARs8xob2i U6mLVtmpiwST+EA+NikVq3Mu6CsQnT/2gDSZ3amUZlIwDHogPxyL8smsboRK8MsJI0 +Iij412mHoHUjoyAR7XmtgSHTqCCXvQ0Y7xmdxW+f2WSWtbiH4JGaYRzY+rrVQMXJp 1CfqPXaIjjAz3tTgqmLGUBThdbszIDjTp+L3udApzqm5PsVoJbRJpg//ScsjEc1WuH SH34hmlGB8u5A== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2F678691AD for ; Wed, 7 Jan 2026 16:47:22 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767829636; bh=QKROtd++HFhfs/z+VbLP4mslM+pToFgMjTjOAOD3rcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cx9H+n+ch7QZbpCyNEgxo72BLdY1pPp2kkS4vBibnqMvLQZS9qNsxzUSdC0tqzr1A 9jB8PkfBOCwlKaZMb02crXJ5Jsbl0nKkaIzhgqJ29p9T8ahU8ls+ndw7p1AgGWU6Q8 LY8H64f0LPvGDCId8EkynYpjuSxC6TPj7bQVPW7ncrfFBUjQEh34mOCxn8AbyEnMD5 qNK089Qy+3+DkQb7DyxrYnnLxJsyTN9r/rxHqXaN7xh5wx9UhWV7pC0jn2BL0e4wjn yqMWD033Gwh4wfG65zb8qfxxCs8tRpuLqTKVoamyG920Cdn+rnczj2ayzrivKJlc6W On06dDsfgRz1Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D1FCE69195; Wed, 7 Jan 2026 16:47:16 -0700 (MST) 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 Gc8RhOnfWp35; Wed, 7 Jan 2026 16:47:16 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767829631; bh=UJ2EOe5yTK2YQN9LWLihwnaRnvg1B6n0E8g7wA45XrI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FEphdchS1W2ObTKufC24c8pvkqHT73wtJ+4gUKj0KPGL2/aiAj6/pHJ05JIgoPuEE OMapKnOOH2Ks6tOt/qxBekwPaZ8v249nSUqpxVAJ7deLksK8okqyorCOdUVuwQrfd+ 8tzIpWQy1DgfiTRBUdNlZc0IXaRkVHaK7Jb8lsq8PVySZg4mDDHTWFEEH/xXNjLbxM V8OVYmXQ5+5YK9J/fb0kRA9/DReoRa6+i9oSaHD0ZHwR6K0l0fdVihPI4ujioFATmB O/j91IodAI5e/tXfdjHEv/3T5Nt5qQeTN7fy/bP4R058x5QvOZRzQ2c6Zi+gW3pxeh ibiB4c2IiAJJw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 1EC1569196; Wed, 7 Jan 2026 16:47:11 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Wed, 7 Jan 2026 16:44:14 -0700 Message-ID: <20260107234426.3508161-5-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260107234426.3508161-1-sjg@u-boot.org> References: <20260107234426.3508161-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: 7HV3N7LCJYTLZUMCAQLC65633RFYKWU2 X-Message-ID-Hash: 7HV3N7LCJYTLZUMCAQLC65633RFYKWU2 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: Heinrich Schuchardt , Simon Glass , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 4/9] fs: ext4l: Add folio helper macros 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 Add folio_next_pos() and fgf_set_order() macros to ext4_uboot.h to match the Linux kernel API. folio_next_pos() returns the byte position following a folio, useful for checking if a folio extends past a given position. fgf_set_order() is a stub that returns 0 since U-Boot doesn't support large folios. In Linux, this is used to request a specific folio size when allocating. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 943cb31d694..2487d6fc70f 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -1565,7 +1565,14 @@ static inline char *d_path(const struct path *path, char *buf, int buflen) #define folio_zero_range(f, s, l) do { } while (0) #define folio_mark_uptodate(f) do { } while (0) #define folio_next_index(f) ((f)->index + 1) +#define folio_next_pos(f) ((loff_t)folio_next_index(f) << PAGE_SHIFT) #define folio_mapped(f) (0) + +/* + * fgf_set_order - Set the order (size) for folio allocation + * U-Boot doesn't support large folios, so this is a no-op stub. + */ +#define fgf_set_order(size) (0) #define folio_clear_dirty_for_io(f) ({ (void)(f); 1; }) #define folio_clear_uptodate(f) do { } while (0) #define folio_batch_release(fb) do { } while (0)