From nobody Mon Oct 6 08:34:44 2025 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9D2612EB10 for ; Wed, 23 Jul 2025 01:45:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.188 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753235121; cv=none; b=U45mzNk1WPLwqiP8JBrQUvv1Eqf6TgP65PW8PlGiX6xWo+1Z+IemPHY52qETFjHUW8/CjD1ituuKudsqPK2relVToiFYuvm+UMJnHQsGADm9/do3hCCBg895TfE8vqPIUUGWvQy7NENy74duKAV7F3Gpe5YldwvGiWYii87Z1Gc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1753235121; c=relaxed/simple; bh=lOzJSMajRtRi65PeFb8Kp4alg7DUa+8qEI+AqwPjcRc=; h=From:To:CC:Subject:Date:Message-ID:MIME-Version:Content-Type; b=JS5PV+6nelc7GK6Bq3bX0BIyrLW1tegMpa/JpXtHjOGRe9UUZhfYpCdj+Ml49kK6hzJ70ZUXEdS6KVcW1IDgX1/qxQDVVGJkny/SzyZNHmarixgQhQ6cqyO0+jKGBZ9kHxI5FmyLsSvUK32jRXe0L1OY2ZFldqlJheovh3vMlqY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com; spf=pass smtp.mailfrom=huawei.com; arc=none smtp.client-ip=45.249.212.188 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=huawei.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huawei.com Received: from mail.maildlp.com (unknown [172.19.163.252]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4bmxkf6sLKztSkD; Wed, 23 Jul 2025 09:44:10 +0800 (CST) Received: from dggpemf100017.china.huawei.com (unknown [7.185.36.74]) by mail.maildlp.com (Postfix) with ESMTPS id 0BE94180B71; Wed, 23 Jul 2025 09:45:15 +0800 (CST) Received: from huawei.com (10.67.174.191) by dggpemf100017.china.huawei.com (7.185.36.74) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Wed, 23 Jul 2025 09:45:14 +0800 From: Zhang Qiao To: , , , , , CC: , , , Subject: [PATCH] sched/clock: Init generic clock with CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y Date: Wed, 23 Jul 2025 10:03:26 +0800 Message-ID: <20250723020326.622368-1-zhangqiao22@huawei.com> X-Mailer: git-send-email 2.18.0.huawei.25 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-ClientProxiedBy: kwepems200001.china.huawei.com (7.221.188.67) To dggpemf100017.china.huawei.com (7.185.36.74) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The sched_clock_timer is used to prevent the sched clock wrapped, this timer is initialized in generic_sched_clock_init(); When CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=3Dy, generic_sched_clock_init() is not called and sched_clock_timer is not initialized, causing the sched clock to wrap. To fix this issue, call generic_sched_clock_init() in sched_clock_init() to initialize the sched_clock_timer. Fixes: 5d2a4e91a541 ("sched/clock: Move sched clock initialization and merg= e with generic clock") Reported-by: yuanlulu Signed-off-by: Zhang Qiao --- kernel/sched/clock.c | 1 + 1 file changed, 1 insertion(+) diff --git a/kernel/sched/clock.c b/kernel/sched/clock.c index a09655b481402..13e76cfb59f23 100644 --- a/kernel/sched/clock.c +++ b/kernel/sched/clock.c @@ -213,6 +213,7 @@ void __init sched_clock_init(void) */ local_irq_disable(); __sched_clock_gtod_offset(); + generic_sched_clock_init(); local_irq_enable(); =20 static_branch_inc(&sched_clock_running); --=20 2.18.0.huawei.25