From patchwork Tue Jan 20 23:43:27 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1716 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=1768952692; bh=OsES4VwkHfAUgfdLfR4U/KjJb+V2WVcR+MnarQL9r8w=; 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=Yx9Gq+xTDWdcko1mUYIdrFWO0NI7TvCkAGBQs4GQycxA2uihfy0wAH/MNIuH272Gc WI8V84WeAEhaWbNIL3DJ9FD/nFrdpz+VUWUXpCUg6/Qe67fEvJN4uaXiBWc9lZwnU6 viXxxU3pUilzaNzLpTto8j+KXVCldOnNe8+MdbTbktUGkkFvFOA2zmJ0IM9J0UYszz xaynK6ti0UfnIwhnvENR9dHOKb1Myl8QuA9XEZ6ZCmX/LTaZoFNbhpbPrO1AKKespg moUAL2YWcfQqEA2sQetL4GZUqERmyj99Lg727PxsKKXpG70W8Yy5vnWI+aBuvK0cAs su1VjDvYzZdtw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 3A089695AE for ; Tue, 20 Jan 2026 16:44:52 -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 eq1caRoagkHL for ; Tue, 20 Jan 2026 16:44:52 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952692; bh=OsES4VwkHfAUgfdLfR4U/KjJb+V2WVcR+MnarQL9r8w=; 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=Yx9Gq+xTDWdcko1mUYIdrFWO0NI7TvCkAGBQs4GQycxA2uihfy0wAH/MNIuH272Gc WI8V84WeAEhaWbNIL3DJ9FD/nFrdpz+VUWUXpCUg6/Qe67fEvJN4uaXiBWc9lZwnU6 viXxxU3pUilzaNzLpTto8j+KXVCldOnNe8+MdbTbktUGkkFvFOA2zmJ0IM9J0UYszz xaynK6ti0UfnIwhnvENR9dHOKb1Myl8QuA9XEZ6ZCmX/LTaZoFNbhpbPrO1AKKespg moUAL2YWcfQqEA2sQetL4GZUqERmyj99Lg727PxsKKXpG70W8Yy5vnWI+aBuvK0cAs su1VjDvYzZdtw== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 29AE5695A6 for ; Tue, 20 Jan 2026 16:44:52 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952690; bh=KBrXOyFtvc75GQ4u//8CZx+NTPxVWJUHFBDwBIPrUKE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DzuK6o5xlO1iKflMwPNbTV3FTtYzXEqjUN1qhg3l1bX2t+xznt26LHiV+JvKZsIAQ hUcwpbv5JK8FZUmva7IbgC3Zkk3G50063kQsGgsPO7+477dIVeqWXNVwhPbMDBv2nP 3rQsDw0SZ+biHzMPIWoC1FBo+2jXBFfy1Naet+SdegO3/Kh8nb2mrRZ3/QdMSfEvTZ GRdBzpBAqvFo8SYrItzKWIOBAF0W0rwKVk8w3C8GvCl0/R6XuUtT3UfakOB8Dh+Fah nHhqPAnGrAnGrdCshg1qnvoXpQJ8CtBeUrcLuyKv1X0xFr8U0l3V6weTqUqg1sNv/l BNKpVGyTXqgZw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 2CEF669597; Tue, 20 Jan 2026 16:44: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 10026) with ESMTP id z4qdHtaHvjPN; Tue, 20 Jan 2026 16:44:50 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768952685; bh=Yv6ONqeQLTF0iffS6D8aLvt34QhyCP9mS+KQQ5XRpMw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DE10ctHa8sXvkUz7wDhuo9rMYCsJ6J976gpq2J9DfnTxlwwfBHRbk2Hxk2qHbLaVU O8NMHUVmRNr4wN55Xwla6meuBhnO3+08q0d+L+5N4hxbToSs2LlfbkJqPXPXQhB2Ts FHiCxCQIzsLC5S8/m/wI7YzNSYgpVIC6xLIG7oNwk9m2FUdk08U59+7AxqWjtunE8j 4vueYn5t6AY6vJlk0gC9JvPCAIohjamOUm9zT1xFqPwC7IG9t5s7GBDxbiUJh6MWbJ iK1c/8GxASkRfk3EJkaXu8mJoKNyFBxc4RrTmLQ4EfAeKRZT4gqlmF5REcZNCMvXX0 Y8Pgdz5jUUj9Q== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9F30D69555; Tue, 20 Jan 2026 16:44:45 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 20 Jan 2026 16:43:27 -0700 Message-ID: <20260120234344.495605-8-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260120234344.495605-1-sjg@u-boot.org> References: <20260120234344.495605-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: RGFBPWE2GYZ3454RC4KBGHWKLC5LANXR X-Message-ID-Hash: RGFBPWE2GYZ3454RC4KBGHWKLC5LANXR 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 , "Claude Opus 4 . 5" X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 07/17] ext4l: Move time functions to linux/time.h 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 ktime_get_real_seconds() and time_before32() to linux/time.h where they belong in the Linux kernel header hierarchy. This removes these stubs from ext4_uboot.h. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 4 +--- include/linux/time.h | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 09e58989888..d1ec4a84b97 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -229,9 +229,7 @@ struct buffer_head *sb_getblk(struct super_block *sb, sector_t block); #define sb_find_get_block(sb, block) ((struct buffer_head *)NULL) #define sync_dirty_buffer(bh) submit_bh(REQ_OP_WRITE, bh) -/* Time functions - use boot-relative time for timestamps */ -#define ktime_get_real_seconds() (get_timer(0) / 1000) -#define time_before32(a, b) (0) +/* Time functions - ktime_get_real_seconds, time_before32 are in linux/time.h */ /* Inode operations - iget_locked and new_inode are in interface.c */ extern struct inode *new_inode(struct super_block *sb); diff --git a/include/linux/time.h b/include/linux/time.h index b23598295c2..17471d2c26c 100644 --- a/include/linux/time.h +++ b/include/linux/time.h @@ -174,4 +174,18 @@ struct timespec64 { long tv_nsec; }; +/* + * time_before32 - check if 32-bit time @b is before time @a + * + * U-Boot stub - time comparison not supported, always returns false. + */ +#define time_before32(b, a) (0) + +/* + * ktime_get_real_seconds - get current wall-clock time in seconds + * + * U-Boot implementation uses get_timer() to return boot-relative time. + */ +#define ktime_get_real_seconds() (get_timer(0) / 1000) + #endif