| Message ID | 20260114225635.3407989-1-sjg@u-boot.org |
|---|---|
| Headers |
Return-Path: <concept-bounces+u-boot-concept=u-boot.org@u-boot.org> 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=1768431410; bh=T8MvfW0KN7B08UidBzBKwknWlWHgc2jPsD0/6rczss8=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=UHKdBO96biHFjK5CRv5mewB+568EUPw+o1wA4rTOWEisLYwtI3Ps6sjKqVcJ8N5IA aC8D8qjUXzbBBNRYZuuR9tL7/9K9bnpxgK+wRLaK83OsCCMvyayUVeOK0cfXZU8VwI xLSwbtGE5R5A5ZTV3EKKAlSR4duOVwuRSMmihRqCSz3UoH/JGYaO2kRWFWYP4gTsih 4rp9xNhgoJilVFPHWg1EWxDKyHYhw3cDPJ1cIRuQbFrYtsDucPYtW3akO5O/RXSklV ggooTCqrrdPdDmbsE7ZHl2vQpGJQOlKXKdfKI3R7jrfsyKCZInoJasvQ0FYnDYPilz aIZZjOkqnHBCw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 7BADB6933D for <u-boot-concept@u-boot.org>; Wed, 14 Jan 2026 15:56:50 -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 Auc8w4_N50pi for <u-boot-concept@u-boot.org>; Wed, 14 Jan 2026 15:56:50 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431410; bh=T8MvfW0KN7B08UidBzBKwknWlWHgc2jPsD0/6rczss8=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=UHKdBO96biHFjK5CRv5mewB+568EUPw+o1wA4rTOWEisLYwtI3Ps6sjKqVcJ8N5IA aC8D8qjUXzbBBNRYZuuR9tL7/9K9bnpxgK+wRLaK83OsCCMvyayUVeOK0cfXZU8VwI xLSwbtGE5R5A5ZTV3EKKAlSR4duOVwuRSMmihRqCSz3UoH/JGYaO2kRWFWYP4gTsih 4rp9xNhgoJilVFPHWg1EWxDKyHYhw3cDPJ1cIRuQbFrYtsDucPYtW3akO5O/RXSklV ggooTCqrrdPdDmbsE7ZHl2vQpGJQOlKXKdfKI3R7jrfsyKCZInoJasvQ0FYnDYPilz aIZZjOkqnHBCw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 68F91692F1 for <u-boot-concept@u-boot.org>; Wed, 14 Jan 2026 15:56:50 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431408; bh=cQWHcLq4KzSTYqeOnFgUVHebkQju0Bup6EkbdbhJXZw=; h=From:To:Cc:Subject:Date:From; b=PsQBuqYMgTdrjfNijl1P4o5VdNE5gO4mddeRV2MRtLsJMn/d+DQlHo7qd7gzdJUJp W0o24hBBV+znisOW9THghdb/qNgqrDpgAnWcmlz5Mv6BISilDSUmnKvfsmE1FFkWtY UkizarWixVXgrBI85+G5KwyX5W00okY6Fa91QiVMoG83zmLbYWo7k3LANaY2d0Vn7u /7QB9UBWzt6Ds32p6UBqNpeMeT4Fbd1vzr68BI9cUESuCS5N4QEhx4SUB5zk18ISN5 iFhD8HioK69tHlQQDw3SgJq59lAvNeAnyX3DBfYjRbVRTxoco3KIx62pXnoV8Ztm0f eIp0D5JZGHR9A== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id D90ED692F1; Wed, 14 Jan 2026 15:56:48 -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 HEmc_7lp7ALc; Wed, 14 Jan 2026 15:56:48 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768431404; bh=MGYtGiqelJ7xom/sf7Wu3D/COXFAQK1uXkbZieZnYrU=; h=From:To:Cc:Subject:Date:From; b=CdZ+g193dwo366YUMudnXbrCDcctKlAyIbGf7T5wy0g2P/yJ3Nj6kxIBc6mzdINDO 5R8JJ9yJgdPsMDEg8IPtXTgkX+0noOG8v4SSNgPWYHyL65OkWGx3pDSzA/WwIHiBs2 LrS6pPuEoECgIlQTgowNxXW3lDXwid17fGfxMe7C9SJywLbC2XjxPZNcGlEwArVj2C m5OfABvS8R2C0ZuqBoihgMAvrBNW4eP/huWL1bpq8Hwetr2FmkM0sZ/YBW3gL0YRvS tzXuWbQHB3SXPHUB9len8RZURzMXiLyFktVqpU2/mRJxAV1GXrU70bXSbEqJjBdbZu bUlA71mm81XHA== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 75EB76927F; Wed, 14 Jan 2026 15:56:44 -0700 (MST) From: Simon Glass <sjg@u-boot.org> To: U-Boot Concept <concept@u-boot.org> Date: Wed, 14 Jan 2026 15:55:50 -0700 Message-ID: <20260114225635.3407989-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: AKUXKFSLY4V4LYWQUDLDKAUJUPGCDIGS X-Message-ID-Hash: AKUXKFSLY4V4LYWQUDLDKAUJUPGCDIGS 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 <simon.glass@canonical.com> X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 00/34] ext4l: Clean up ext4_uboot.h by moving definitions to standard headers List-Id: Discussion and patches related to U-Boot Concept <concept.u-boot.org> Archived-At: <https://lists.u-boot.org/archives/list/concept@u-boot.org/message/AKUXKFSLY4V4LYWQUDLDKAUJUPGCDIGS/> List-Archive: <https://lists.u-boot.org/archives/list/concept@u-boot.org/> List-Help: <mailto:concept-request@u-boot.org?subject=help> List-Owner: <mailto:concept-owner@u-boot.org> List-Post: <mailto:concept@u-boot.org> List-Subscribe: <mailto:concept-join@u-boot.org> List-Unsubscribe: <mailto:concept-leave@u-boot.org> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit |
| Series |
ext4l: Clean up ext4_uboot.h by moving definitions to standard headers
|
|
Message
Simon Glass
Jan. 14, 2026, 10:55 p.m. UTC
From: Simon Glass <simon.glass@canonical.com>
This series reorganises fs/ext4l/ext4_uboot.h by moving definitions to
their proper locations in the Linux compatibility headers. The goal is
to reduce duplication and make these definitions available to other
parts of U-Boot.
The file is reduced from 3129 lines to 2584 lines (17% reduction).
Changes fall into several categories:
1. Moving standard Linux definitions to include/linux/*.h:
- Types: pgoff_t, timespec64, time64_t, blk_opf_t
- Filesystem: dir_context, FMODE_*, DT_*, S_*, ATTR_*, SB_*,
FALLOC_FL_*, RENAME_*
- Buffer: buffer_migrate_folio, noop_dirty_folio
- Misc: jiffies, printk variants, module stubs, seq_file
2. Creating new Linux compatibility headers:
- linux/lockdep.h: lock dependency stubs
- linux/percpu.h: per-CPU variable stubs
3. Consolidating ext4l-specific stubs:
- fs/ext4l/ext4_trace.h: tracing stubs
- fs/ext4l/ext4_fscrypt.h: fscrypt stubs
4. Using existing headers instead of duplicating:
- linux/blk_types.h for blk_opf_t
- linux/pagevec.h for folio_batch
- linux/completion.h for completion stubs
- linux/build_bug.h and linux/bug.h for assertion macros
5. Removing dead code and duplicate definitions
This cleanup makes the ext4l code more maintainable and brings the
Linux compatibility layer closer to the actual Linux kernel structure.
There is still more which could be done, but the goal is not to empty
the header file, since most of its contents is of no use to the rest of
U-Boot.
Simon Glass (34):
ext4l: Move timespec64 and time64_t to linux/time.h
ext4l: Move rol32 to linux/bitops.h
ext4l: Move atomic operations to asm-generic/atomic.h
ext4l: Consolidate trace stubs into ext4_trace.h
ext4l: Remove duplicate macro definitions
ext4l: Move flush_workqueue to linux/workqueue.h
ext4l: Consolidate fscrypt stubs into ext4_fscrypt.h
ext4l: Remove duplicate percpu_counter stubs
ext4l: Use linux/completion.h for completion stubs
ext4l: Convert dquot_suspend from function to macro
ext4l: Remove dead iomap definitions
ext4l: Create linux/percpu.h for per-CPU stubs
ext4l: Remove redundant forward declarations
ext4l: Move buffer operation stubs to linux/buffer_head.h
ext4l: Move address_space_operations to linux/fs.h
ext4l: Use linux/build_bug.h and linux/bug.h for macros
ext4l: Move seq_file definitions to linux/seq_file.h
ext4l: Use linux/pagevec.h for folio_batch
ext4l: Move printk variants to linux/printk.h
ext4l: Move jiffies definitions to linux/jiffies.h
ext4l: Move module stubs to linux/module.h
ext4l: Create linux/lockdep.h for lock dependency stubs
ext4l: Move string helpers to standard locations
ext4l: Move FMODE hash flags to linux/fs.h
ext4l: Move struct dir_context to linux/fs.h
ext4l: Move pgoff_t to linux/types.h
ext4l: Use linux/blk_types.h for blk_opf_t
ext4l: Move DT_* directory entry types to linux/fs.h
ext4l: Move S_* inode flags to linux/fs.h
ext4l: Move S_IRUGO to linux/fs.h
ext4l: Move FALLOC_FL_* and RENAME_* flags to linux/fs.h
ext4l: Move ATTR_* iattr flags to linux/fs.h
ext4l: Move SB_* superblock flags to linux/fs.h
ext4l: Move buffer migration stubs to linux/buffer_head.h
fs/ext4l/ext4_fscrypt.h | 144 +++++++
fs/ext4l/ext4_trace.h | 172 ++++++++
fs/ext4l/ext4_uboot.h | 787 ++++++-----------------------------
fs/ext4l/stub.c | 54 +--
include/asm-generic/atomic.h | 53 +++
include/linux/bitops.h | 20 +
include/linux/buffer_head.h | 36 ++
include/linux/completion.h | 24 +-
include/linux/fs.h | 125 +++++-
include/linux/jiffies.h | 14 +
include/linux/lockdep.h | 36 ++
include/linux/module.h | 5 +
include/linux/percpu.h | 54 +++
include/linux/printk.h | 11 +
include/linux/seq_file.h | 13 +
include/linux/slab.h | 16 +
include/linux/string.h | 41 ++
include/linux/time.h | 8 +
include/linux/types.h | 3 +
include/linux/workqueue.h | 4 +
lib/string.c | 25 ++
21 files changed, 920 insertions(+), 725 deletions(-)
create mode 100644 fs/ext4l/ext4_fscrypt.h
create mode 100644 fs/ext4l/ext4_trace.h
create mode 100644 include/linux/lockdep.h
create mode 100644 include/linux/percpu.h