From patchwork Tue Dec 30 23:41:25 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1136 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=1767138312; bh=XU5tKATEncLvtHNStRpq8JYv/uOGg+7VsyQxiceDw8M=; 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=UdrKzY5MvVL+yeE0pSEWoVykpOYpropajR/h4pp0SuxSNmGL5Fiptk64nhmAoNlww zJt6f1WwoZ47WqEpCsTrTnkLViwPNHPWaqRENkj84c/BbEQ5xZ1lwdbPi3LE0bbHuR diT99mwUjm2lCfu/i8eYwlozOKQMOmQXNfwogzSzrm/RKsTIszDeNZZJxqwoJFhGMM geIZwE2QAX9e2eZ9aNQZdn4C1hp0UEJLlo+CyliTIjLPjhm2ilQLN2Rm9gSF41e0J6 /AkzeaDk/PoeNuVznSUgCygD3t58F+UuXfi05ojUbLx+GUcZAmoJTo3BtowOdHiMVg ez4QroqWFk4xQ== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 141A764E2A for ; Tue, 30 Dec 2025 16:45:12 -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 b_ddDfoCt-OC for ; Tue, 30 Dec 2025 16:45:12 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767138311; bh=XU5tKATEncLvtHNStRpq8JYv/uOGg+7VsyQxiceDw8M=; 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=vRoGhZqavRCAE/gQVFJ1YTApUtz+Kp6SlsWz6G/qxVC31ppno6XjW3IaT6BpnOKUT 3KWWqUbox29qqWBZyRQoK7uRG8qvjr+TdDDXqazEOy6zCqAzV8xymTUlSEsFmrH20T XekIrQdAMUy/dWoYs4ezru4rxrbdSj5vN2r355WoiRATHYgb0m/3VTF7qlj5wId5lj OO8tDKetVOXz/ZHPpFbWet5N/LSY/Vp0dNS+iN5f/SV6r7IVBxkFsqvMqCGHMwrfWV 5w4rxlHEUD1xidVq+WPb4ey4dAN6sB3Yd2wImE+8QlOfr7V1XD4EOjwf9rqNoV5a1E rp4aDTluuDcrg== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 63A7A68C0F for ; Tue, 30 Dec 2025 16:45:11 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767138309; bh=74OSJfspoA5Kb+gkhf/Nho/Ad7zS7XznZg1PDNkIeeg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sN09a6Oytr0lIdSVo2Vl59jtaJ+txiaEwIhVeccYNE23onl1PuwoEzLNhOTRU6Gaf jNfPcbtwSGc5/mlYaVVqmzcmjxQiWaqsq6HRYyYgcHLrWqZ5Zbqt6TSwbZBpSbwwPh CpqPPow8BgjvEXxPD8t7r/QAc1RFnmmBhYjUsemkcrR04+iwJANoHam6iMy0+5CQyl cU++/MTF4SJM6DoCfGOn5tDC0mIwQH50gPyj6h2soiJT+PthLXbXH0mX27R59EH0Br oKe02i4PGcraNQKRqgTTwDQbYCIQ3ZNbymZpBNCXbrhcZfaEBeJ0mT6zMwFZPyakKa xMUsd83EfbOdg== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 1841264E2A; Tue, 30 Dec 2025 16:45:09 -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 8NOL_uhRNY2k; Tue, 30 Dec 2025 16:45:09 -0700 (MST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1767138308; bh=9X2tbqwOeAcfuasyVz4NZtlVZnHjCN6t7quop+PYQys=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KTjPVVXym3WfxxEtSsIIMoHEuA2ePWTEJxsJZJG6rsD7bJQZlu5K3kbMJXtjvVmrx oA3d+13bvhoFTcdGRW55sX09/jgXXH9fCRlHw3qKDSVs9kU0wGe9PNc52FnxfY0XPX pZQzaKJWdNRDqOdMW+4Pt1AxNPe8uh017AgCr/p7NwvaE6fef4DiHobnmzSydtZo8K Io949Hz1tEBOfw9jamQfXLUwBFQZGsmL9wkteRogpsPKS3tg8DyAjNzdGztmUw+VVJ 1zM1kWrmeYlBpeHiIt+eHiTIJVvkzdoEtttSIdEM41LV0E1bEYjE4d630+ZXUljC5k 5fe9E5FEPyj9w== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 87F8F68C06; Tue, 30 Dec 2025 16:45:08 -0700 (MST) From: Simon Glass To: U-Boot Concept Date: Tue, 30 Dec 2025 16:41:25 -0700 Message-ID: <20251230234134.906477-14-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20251230234134.906477-1-sjg@u-boot.org> References: <20251230234134.906477-1-sjg@u-boot.org> MIME-Version: 1.0 Message-ID-Hash: LBQTIDBJYFF552SX2L4FPTOEWUIM57VE X-Message-ID-Hash: LBQTIDBJYFF552SX2L4FPTOEWUIM57VE 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 13/15] ext4l: Use percpu_counter initialized field 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 Update the percpu_counter_initialized() and percpu_counter_init() macros in ext4_uboot.h to use the new initialized field. Co-developed-by: Claude Opus 4.5 Signed-off-by: Simon Glass --- fs/ext4l/ext4_uboot.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/ext4l/ext4_uboot.h b/fs/ext4l/ext4_uboot.h index 18ea2b1bcd4..2d0e817be40 100644 --- a/fs/ext4l/ext4_uboot.h +++ b/fs/ext4l/ext4_uboot.h @@ -368,7 +368,7 @@ struct buffer_head *sb_getblk(struct super_block *sb, sector_t block); #define percpu_counter_add(fbc, amount) ((fbc)->count += (amount)) #define percpu_counter_inc(fbc) ((fbc)->count++) #define percpu_counter_dec(fbc) ((fbc)->count--) -#define percpu_counter_initialized(fbc) (1) +#define percpu_counter_initialized(fbc) ((fbc)->initialized) /* Group permission - stub */ #define in_group_p(gid) (0) @@ -1216,7 +1216,8 @@ static inline ktime_t ktime_add_ns(ktime_t kt, s64 ns) #define write_trylock(lock) ({ (void)(lock); 1; }) /* percpu counter init/destroy */ -#define percpu_counter_init(fbc, val, gfp) ({ (fbc)->count = (val); 0; }) +#define percpu_counter_init(fbc, val, gfp) \ + ({ (fbc)->count = (val); (fbc)->initialized = true; 0; }) #define percpu_counter_destroy(fbc) do { } while (0) /* ratelimit macros */