From patchwork Mon Jan 19 06:15:18 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1627 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=1768803440; bh=pNaWEQMi260WbpcJ42q8FOvLJWjj/T2873Igk6LDXiA=; 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=nbxeQIlg70/CBpD/o2RC0rr4GczBeCXOxc09wPsOSgJPGpK1K5NDXe8lUnzLRHm0V PMb+jja7U61XUs5Wk/7gUf861nJgZjwxJzDz59gs/JVMiG1ACFXPnkvYlNMtfGYoBe oITsdJmwQ066ylZ4jNHl99MECBzygUc+IUQbfRwUsufAjMbsItguMnt2ClSvn9hGba XPTZWKqFWWl9vNCUJu2rIOkWWkcv2zTY405/N4RLZB/yNO7invVRZXCMH3eBeghmtg XnxHbROwUFHLKZ6CmAD0+JdSRck6t4q8S20yc7DYaDGpusDj2zcKAGMerSd+qxVQUS tD+Y73Ers6DsA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1A7C2694E5 for ; Sun, 18 Jan 2026 23:17:20 -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 MoTUnA6Wex6s for ; Sun, 18 Jan 2026 23:17:20 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803440; bh=pNaWEQMi260WbpcJ42q8FOvLJWjj/T2873Igk6LDXiA=; 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=nbxeQIlg70/CBpD/o2RC0rr4GczBeCXOxc09wPsOSgJPGpK1K5NDXe8lUnzLRHm0V PMb+jja7U61XUs5Wk/7gUf861nJgZjwxJzDz59gs/JVMiG1ACFXPnkvYlNMtfGYoBe oITsdJmwQ066ylZ4jNHl99MECBzygUc+IUQbfRwUsufAjMbsItguMnt2ClSvn9hGba XPTZWKqFWWl9vNCUJu2rIOkWWkcv2zTY405/N4RLZB/yNO7invVRZXCMH3eBeghmtg XnxHbROwUFHLKZ6CmAD0+JdSRck6t4q8S20yc7DYaDGpusDj2zcKAGMerSd+qxVQUS tD+Y73Ers6DsA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 0A3C6694CE for ; Sun, 18 Jan 2026 23:17:20 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803438; bh=3UnkmtfDKhui0+66wj/H82XgsLgXAUem+VjrTi36eD8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nYbFy06Grlev49hzagKO2DwxHhr/TWsRwA1GuZM8WueDYxdzqiSEP8vrggn0r0cZr 4Zy2ean1qX36/17GeU/t58txhI4wONCa1hagUsQUq5lBXlmf0FYwvQASVDoTiyDOY2 YDM58hlvfJxPAbk2hbfexNl3ljmPPuWCMafkel/41xYCUNFCcW1S6/zz8xmf6qMCKx vmApzj7/B7M5/y5VlsZv5TVdjD97Yhpju13Ec5K0enMwexYbRZmDrJQWIjQdhTW34e AfsIpQTUulqsBEBCgOlIQQ6kgZriEMeOxXYtB4BWYP7uzQIlN5LsR2xTt8UBYfxAkI 8G42730BE2nyw== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 305D2694CE; Sun, 18 Jan 2026 23:17:18 -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 9Ruh36csFnN8; Sun, 18 Jan 2026 23:17:18 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1768803434; bh=m1k2xgvV2MvkPppEbYinExhtmTU0MhRdWyBdpsIXaBs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nf5UN6NhNDW/xp806nDCAsojgrvv9hdCLeV5Net+JXqtsV5GtzJ6YHr0gAkw3TaPd e7e8H255z92ep/ciC3c/5s72st17cpwTw3RCgtZcRAmPHaR+DgtJnnycl7pHW0nK9e WFU/YCH+/TSSrpUUgi1m1uaA/b/PGSRpQXDo9MDLYbrnKIkMsuk1ULnQkbGG5Y8wbJ ocWG9CrCtcoOtKcUwecIMDak3FhQ7AqSWEojyJRlVSx6myF4k6HI26MGf9ZfPdu/Gl /DssEVfyFhiQXmX77lJ3yadn/ibrOKEHVR6O4BuZiCXgIZXcLos7/TWB2lcv0HJaHi 2mTpXsKFHL2bw== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id E1F7C694C0; Sun, 18 Jan 2026 23:17:13 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Sun, 18 Jan 2026 23:15:18 -0700 Message-ID: <20260119061529.3383191-21-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260119061529.3383191-1-sjg@u-boot.org> References: <20260119061529.3383191-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: NI5FUOZ67DGZFNX5BAC46SI6MWLNRXQX X-Message-ID-Hash: NI5FUOZ67DGZFNX5BAC46SI6MWLNRXQX 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 20/23] ext4l: Move scheduler stubs to linux/sched.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 Move schedule_timeout_interruptible(), schedule_timeout_uninterruptible(), and need_resched() to include/linux/sched.h where they belong with other scheduler functions. These are stubs since U-Boot is single-threaded. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 7 ++----- include/linux/sched.h | 7 +++++++ 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index dc6d4c3910a..206bf4d784f 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -1294,8 +1294,7 @@ void *kvzalloc(size_t size, gfp_t flags); #define sb_start_write(sb) do { } while (0) #define sb_end_write(sb) do { } while (0) -/* Scheduler stubs */ -#define schedule_timeout_interruptible(t) ({ (void)(t); 0; }) +/* schedule_timeout_interruptible is in linux/sched.h */ /* Page allocation - declarations for stub.c */ unsigned long get_zeroed_page(gfp_t gfp); @@ -1465,9 +1464,7 @@ static inline unsigned long ext4_find_next_bit_le(const void *addr, /* raw_cpu_ptr - get pointer to per-CPU data for current CPU */ #define raw_cpu_ptr(ptr) (ptr) -/* Scheduler stubs */ -#define schedule_timeout_uninterruptible(t) do { } while (0) -#define need_resched() (0) +/* schedule_timeout_uninterruptible, need_resched are in linux/sched.h */ /* Block device operations */ #define sb_find_get_block_nonatomic(sb, block) \ diff --git a/include/linux/sched.h b/include/linux/sched.h index 04672cee991..ff36a6443c8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -41,4 +41,11 @@ extern struct task_struct *current; #define signal_pending(task) 0 #define fatal_signal_pending(task) 0 +/* Scheduler timeout stubs - return immediately in U-Boot */ +#define schedule_timeout_interruptible(timeout) ({ (void)(timeout); 0; }) +#define schedule_timeout_uninterruptible(timeout) do { (void)(timeout); } while (0) + +/* Check if rescheduling is needed - always false in single-threaded U-Boot */ +#define need_resched() (0) + #endif /* _LINUX_SCHED_H */