Message ID | 20240206173911.4131670-6-vschneid@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-55416-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1706337dyb; Tue, 6 Feb 2024 09:43:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IE5wnzP5LHtXqpfE25SWXfMqCx523QWXMMgI+V8++G9tQyjimKI/J0dhtd+Sw05vtFs7D79 X-Received: by 2002:a05:6830:410c:b0:6e2:78eb:667b with SMTP id w12-20020a056830410c00b006e278eb667bmr4310541ott.12.1707241417759; Tue, 06 Feb 2024 09:43:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707241417; cv=pass; d=google.com; s=arc-20160816; b=AVjPFUAUuEUeXyG3/0OU9xYB9gpJ3lSiD/VolvzUJmysMfkYWZ9bxMk2AUm9k5cpXF VFmp/7epJVbvRw/POv3NLUs8P6mUAEIwEz2F3mTconZAb2ywticAxCr9I4oIpGIqx//6 R7TI2uzDPgyhIjsVzFUvcNMCuv3oilvXWwvgNis4qfT1iP7LDggBlXR+OvXAU59RZm6m VzBh1KIykvycTyB5ETDpdH45kebI8XoR9g8FMwAgmwE9jzvION/g1deGviCXKUwbhF4W bVafJ3hxsrpfBLbCRri2dM82/Fx9D5mN8Y+633pSn2gMKevlESaQKMFnDRn97p1DaTXm rlSA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=0DIKSVQAHIC80NxjvBA7Hf0Rcwayb35T2JV1uGe0svE=; fh=ipfzO2r/euidb9OGc9gwrS2v4OPXHgqIs3ZBGbUK3iA=; b=LqZ/0h3CntdE7N8uk2qCtg9sSRLyRopiAUscCrY+7eDHgPTi3HVnYIbyuzYFXg/Yb4 LAXtZlaEOj8DGdXQeKmhCgiij1gtge8DSd3pRy8cEGLkEkjuGq3LELaRTKFYHBWcUnc1 Ac6BbwMLAKtYREW9J8XNWGdSFM4wOzRnMcW1T6zDFs3topTbgRK7bHTEGCXavBJN8hB3 eN6QOojwmDIR5Cka8Tx+uzXK1Yjm2T71XbE+AFbgWsfN+jdz9EcxwvdKTc+mbbqxS/2T Pi1nOF0QkQSaleEOUIkaiIi1zymhElRydLPlRVzxCjztrdKGrvnDS055eHecHgS1DzXr a0DQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hbBEgWvg; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-55416-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55416-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Forwarded-Encrypted: i=1; AJvYcCUHKvxrAOqDFqTsOsixc6k6GiiSKg00TyQh8IIJ5wHJH0THLY4qJkzuc58vq0V7cy8dHQOv9NoxmuKDTg5iXeVX/6XORA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id u18-20020ac858d2000000b0042c06c69168si2789709qta.622.2024.02.06.09.43.37 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 09:43:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55416-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=hbBEgWvg; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-55416-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55416-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 89E151C251BB for <ouuuleilei@gmail.com>; Tue, 6 Feb 2024 17:43:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 9B2BC1C294; Tue, 6 Feb 2024 17:40:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hbBEgWvg" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 7F11A1BDE6 for <linux-kernel@vger.kernel.org>; Tue, 6 Feb 2024 17:40:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707241217; cv=none; b=F/xgr62nrKPodjlw7WsWbWmXekLkkkkN0ohGxwU5IPAb6CxQJe5GPPYqf3do7B1HSMUpyfxNI743VWt869KEP7RTSbacHFEXXatMHbOdwQ0JBlVxCsFsJDSh7uzH1Nt3cvkEZNTxV24O3CCxKpPK/h/gOxLZe/AaAg9mNIFU8Ek= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707241217; c=relaxed/simple; bh=Pj/Lvr3RhnSeb3N65sWQi1MGfOlxf0VpQWQY8/5A14E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Thu0xPpHSCGqqH+GdGMR4/DdNGV50b+4FvUmNfD9eE+UH3PSfUwap5DL1IKNJw12mZddFLAamAt1IRvrdeW4gLgnghHjix9o5D5q4ImWbagQ0yt46bpLUBs1jks7nUH/28M2k21LeJ6vS4a7KxKvFAzARw7Pm9ggzo+Pnew4/UY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=hbBEgWvg; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1707241214; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=0DIKSVQAHIC80NxjvBA7Hf0Rcwayb35T2JV1uGe0svE=; b=hbBEgWvgl0H+uf92GdKA2xkba7MWfqNY5KTmg1/IzCeDQuBvfU7wtIUNjPprRDbKbsRKKJ 4qXeaqfA5aB0cBdXXcn9rnCk09rJ4Ydy4IGiMZTLsRQ1ZgOCddq5Vz1mDrNjyB3HS3OZHk xXhBCyUl6fjJUDzS3TPy3fUI65yrfrA= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-21-YsH3nB9OOKS4VDnNf5PLTQ-1; Tue, 06 Feb 2024 12:40:10 -0500 X-MC-Unique: YsH3nB9OOKS4VDnNf5PLTQ-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 51ACC1C29EA3; Tue, 6 Feb 2024 17:40:09 +0000 (UTC) Received: from vschneid-thinkpadt14sgen2i.remote.csb (unknown [10.39.193.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 241C62026D06; Tue, 6 Feb 2024 17:40:05 +0000 (UTC) From: Valentin Schneider <vschneid@redhat.com> To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-arch@vger.kernel.org, x86@kernel.org Cc: Josh Poimboeuf <jpoimboe@kernel.org>, Thomas Gleixner <tglx@linutronix.de>, Borislav Petkov <bp@alien8.de>, Peter Zijlstra <peterz@infradead.org>, Pawan Gupta <pawan.kumar.gupta@linux.intel.com>, Ingo Molnar <mingo@redhat.com>, Dave Hansen <dave.hansen@linux.intel.com>, "H. Peter Anvin" <hpa@zytor.com>, Paolo Bonzini <pbonzini@redhat.com>, Wanpeng Li <wanpengli@tencent.com>, Vitaly Kuznetsov <vkuznets@redhat.com>, Arnd Bergmann <arnd@arndb.de>, Jason Baron <jbaron@akamai.com>, Steven Rostedt <rostedt@goodmis.org>, Ard Biesheuvel <ardb@kernel.org>, Frederic Weisbecker <frederic@kernel.org>, "Paul E. McKenney" <paulmck@kernel.org>, Feng Tang <feng.tang@intel.com>, Andrew Morton <akpm@linux-foundation.org>, "Mike Rapoport (IBM)" <rppt@kernel.org>, Vlastimil Babka <vbabka@suse.cz>, David Hildenbrand <david@redhat.com>, "ndesaulniers@google.com" <ndesaulniers@google.com>, Michael Kelley <mikelley@microsoft.com>, "Masami Hiramatsu (Google)" <mhiramat@kernel.org> Subject: [PATCH v2 5/5] x86/tsc: Make __use_tsc __ro_after_init Date: Tue, 6 Feb 2024 18:39:11 +0100 Message-ID: <20240206173911.4131670-6-vschneid@redhat.com> In-Reply-To: <20240206173911.4131670-1-vschneid@redhat.com> References: <20240206173911.4131670-1-vschneid@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790172377317877233 X-GMAIL-MSGID: 1790172377317877233 |
Series |
jump_label: Fix __ro_after_init keys for modules & annotate some keys
|
|
Commit Message
Valentin Schneider
Feb. 6, 2024, 5:39 p.m. UTC
__use_tsc is only ever enabled in __init tsc_enable_sched_clock(), so mark it as __ro_after_init. Signed-off-by: Valentin Schneider <vschneid@redhat.com> Acked-by: Josh Poimboeuf <jpoimboe@kernel.org> --- arch/x86/kernel/tsc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 15f97c0abc9d0..f19b42ea40573 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -44,7 +44,7 @@ EXPORT_SYMBOL(tsc_khz); static int __read_mostly tsc_unstable; static unsigned int __initdata tsc_early_khz; -static DEFINE_STATIC_KEY_FALSE(__use_tsc); +static DEFINE_STATIC_KEY_FALSE_RO(__use_tsc); int tsc_clocksource_reliable;