Message ID | 168139016723.404.3254458483027508395.tip-bot2@tip-bot2 |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp1018342vqo; Thu, 13 Apr 2023 06:06:03 -0700 (PDT) X-Google-Smtp-Source: AKy350YwqeutUyIDM5MaaZ7JSGqNy7RSFHl620o++3W9oeyYCFDk+1g3HlWfmWSVPtVQahWY7D0G X-Received: by 2002:a05:6102:3a53:b0:425:b05f:ed84 with SMTP id c19-20020a0561023a5300b00425b05fed84mr676999vsu.19.1681391163723; Thu, 13 Apr 2023 06:06:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681391163; cv=none; d=google.com; s=arc-20160816; b=0c5S5hmzk38KUtHcOpLfTWpxw3Kjc5RtHDRGX4xWWHI7ctp3pLpcDPNrmA34U2eTmP nQaTDg0GLivzV7t/lctBGliEIJ7F4YGIVge2kM3HI+MjIwN40onQSvPwzHTn8wPnDRQV 3NssdAdgXGdZjP1atBzhMOkCIzYqnhAGRIHC0ktJVj1hCUxBwgFmYqSB9Zz6ivgXJ7I6 1Cjv0EwSc9yIaHNooSNMp7+dWk7mpU5SR1WitQow13KaiYaRLHSt+c1DR+sOJTfaJwmQ KZCSSvmpt2BOxWRQnyOeZ55taYL//+IeDVaKXECE2avF4icY/fCu+3faqXmc6fXKQcsU v1Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=cLAZQxthnAOiIurDfw5zGDp0kN/9mkHLRzgaJt8JHLQ=; b=eqV+uOWtWLxpEmn1ts1GHlOhHDNMqMehxpXCA5V6cdq7mCBHJUD/cmRHCvSbuwDm6I iPQNXHLdg0EG0hkRcjDu8UKaCdH+rVbqBETJ+h2S/uu1fc3ezeCMFdlrFiZ+FlseKLRj y8goUOiMS3bpsdNMPu7j1Bf8KZ6Iu74bz6OaqS0Aa1fpD2Iz58cUPl3Vz89cCt17vkxU g3F29CEKclpAJgzPw+sb81cRWnf1/TWNsnV2iPKKQOiFwKE51MQFcDJQFPWlb8CX8sC+ 2hixK8sBovY7WD01eDrs29d1lWsBIXbD8sA0tT5qPMf/c4Ad5rj0bwaVPXzMYzN5XLiw s+AA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1aPQ5Czx; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i9-20020a05610221a900b0042c78d5b157si357366vsb.311.2023.04.13.06.05.47; Thu, 13 Apr 2023 06:06:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=1aPQ5Czx; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229879AbjDMMtd (ORCPT <rfc822;peter110.wang@gmail.com> + 99 others); Thu, 13 Apr 2023 08:49:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53802 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229597AbjDMMtb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 13 Apr 2023 08:49:31 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5A6B98A74; Thu, 13 Apr 2023 05:49:30 -0700 (PDT) Date: Thu, 13 Apr 2023 12:49:27 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1681390168; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cLAZQxthnAOiIurDfw5zGDp0kN/9mkHLRzgaJt8JHLQ=; b=1aPQ5CzxwZJtT3sT4knjAIC5aJXEZ+g5TGo9tVG5ZfyofItT9vZncUvmk9fA50rH1dbA1t FM6yM+rWJ7RZ6Qsqg9bL3xiJaF0ueoTH8/r1g89rw1U9Gs7Lo3y1+N+qEyqTkve10cvPMA gv6sGMn3b/vfZjLYevc4q45lMu1zdKYeMcIoMJxxD/gVpqOWPdy7JNcPiYuuMQoyaZTKBp iNOiQ+oQghCNqcnYrzmnQNgMPgz0rIZHDlDtiYupK8XnoDWqn0er+3GSfpKMSV+KIh9d/X eqKYuGT6OxGtfyWZ+e7UpG7ijJLdByhqtsk2J2dZfUtgWuj0YCmo/CcyVh8g5g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1681390168; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cLAZQxthnAOiIurDfw5zGDp0kN/9mkHLRzgaJt8JHLQ=; b=PLMqnrSiQkfmO0lzFCmtMILaVvGfDH3smrXDZBXuXi+DKjf9Bx1xORjkN0MP3xvmLQznhi HTq/a41WxlvkmdCw== From: "tip-bot2 for Matija Glavinic Pecotic" <tip-bot2@linutronix.de> Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/urgent] x86/rtc: Remove __init for runtime functions Cc: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com>, Thomas Gleixner <tglx@linutronix.de>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <59f7ceb1-446b-1d3d-0bc8-1f0ee94b1e18@nokia.com> References: <59f7ceb1-446b-1d3d-0bc8-1f0ee94b1e18@nokia.com> MIME-Version: 1.0 Message-ID: <168139016723.404.3254458483027508395.tip-bot2@tip-bot2> Robot-ID: <tip-bot2@linutronix.de> Robot-Unsubscribe: Contact <mailto:tglx@linutronix.de> to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762408006175163835?= X-GMAIL-MSGID: =?utf-8?q?1763066420616495505?= |
Series |
[tip:,x86/urgent] x86/rtc: Remove __init for runtime functions
|
|
Commit Message
tip-bot2 for Thomas Gleixner
April 13, 2023, 12:49 p.m. UTC
The following commit has been merged into the x86/urgent branch of tip: Commit-ID: 775d3c514c5b2763a50ab7839026d7561795924d Gitweb: https://git.kernel.org/tip/775d3c514c5b2763a50ab7839026d7561795924d Author: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com> AuthorDate: Thu, 06 Apr 2023 08:26:52 +02:00 Committer: Thomas Gleixner <tglx@linutronix.de> CommitterDate: Thu, 13 Apr 2023 14:41:04 +02:00 x86/rtc: Remove __init for runtime functions set_rtc_noop(), get_rtc_noop() are after booting, therefore their __init annotation is wrong. A crash was observed on an x86 platform where CMOS RTC is unused and disabled via device tree. set_rtc_noop() was invoked from ntp: sync_hw_clock(), although CONFIG_RTC_SYSTOHC=n, however sync_cmos_clock() doesn't honour that. Workqueue: events_power_efficient sync_hw_clock RIP: 0010:set_rtc_noop Call Trace: update_persistent_clock64 sync_hw_clock Fix this by dropping the __init annotation from set/get_rtc_noop(). Fixes: c311ed6183f4 ("x86/init: Allow DT configured systems to disable RTC at boot time") Signed-off-by: Matija Glavinic Pecotic <matija.glavinic-pecotic.ext@nokia.com> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/59f7ceb1-446b-1d3d-0bc8-1f0ee94b1e18@nokia.com --- arch/x86/kernel/x86_init.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/x86_init.c b/arch/x86/kernel/x86_init.c index ef80d36..10622cf 100644 --- a/arch/x86/kernel/x86_init.c +++ b/arch/x86/kernel/x86_init.c @@ -33,8 +33,8 @@ static int __init iommu_init_noop(void) { return 0; } static void iommu_shutdown_noop(void) { } bool __init bool_x86_init_noop(void) { return false; } void x86_op_int_noop(int cpu) { } -static __init int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; } -static __init void get_rtc_noop(struct timespec64 *now) { } +static int set_rtc_noop(const struct timespec64 *now) { return -EINVAL; } +static void get_rtc_noop(struct timespec64 *now) { } static __initconst const struct of_device_id of_cmos_match[] = { { .compatible = "motorola,mc146818" },