Received: by 2002:ab2:710b:0:b0:1ef:a325:1205 with SMTP id z11csp1929531lql; Wed, 13 Mar 2024 12:08:23 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJGgKp1y91n0K0/wNq32K/+Hzeg8Hl9MZKPS/jHCIsyJTa6jst9x7V355DmdCXW4znOJfIh3c7NF4SpIfNoHEP7bCaDbnhTrKzBYrRBw== X-Google-Smtp-Source: AGHT+IGM/qUZq1G/jsQ6L2JgqFs6OA9KHvbeWmUEsRREjxqwTtlBhWWIdIdk4/140kVN6jDGQeeq X-Received: by 2002:a17:90a:ad41:b0:29b:b478:b900 with SMTP id w1-20020a17090aad4100b0029bb478b900mr10602763pjv.35.1710356903640; Wed, 13 Mar 2024 12:08:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1710356903; cv=pass; d=google.com; s=arc-20160816; b=FwjeUomITrDxPRPtu+yH8SItKgk0bVP1ytEjOPRpClTMxvisKlRdzi6hbIf/pq8dr9 dJOwsHzUJOl0LA0U3XRQV2Na31MLCUPR/FLFCW5j45tvAlV67lfkKHBoA7eX++GLWwU1 AadecZBCF1FAOvlKWu2+9zqTF3Q/r7iNRA8gwa+OsrJnMBgs+QUfkWspmvAkhheWCfSQ uXwhd6mVnNgm5AHY4sdzZpS+3egS9/mqwRqrJGttRpI0/gNO4YJhiSgXLce9QybzWiwi 1157amHVuNszy4AzDZb8CfkeiHcvd8ExPLy89U5T4cCWZPRDpLNq3xUU2fVdosUk66GK 1EXA== 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=XucXp3hxAwKTj7st+z6y9+02SpKNl75gXYBpv6v0s08=; fh=5qY2uVLJYM2pNkQz7T45GswEVrGwUwifBYS2hFFL6TY=; b=ZaktTvVCl8doBzmGLpfqBwuYBco1Z8AtrfXH8v6eKqAyC2d3iKlTr5W/Iw3sreHtdI 2p3If6RPIw/p65rhitv5NvdRBLUtbqTQrm4Eo3rc3bvfwxTlOpyMWncnK3eUTWfDB3Sr 0BBj+kvbDSGuDrjaCUR/DUEPXOrjg2Q59R3wNv8fwRWsXKy6H4eFQFLMV/0H7FX6RTBW YWVaSLw0B9ExypulEZgrmj7K7vakdOfeWEUjkk+b6/oiDJ/WlLtEI62YS/q5nTTA6VmD hQhRS7XK3bGqW9emUJmnSctSFvaTVdpcJe7X3j4xCvnfINEMWwfw4YvVeXJcLZTXbrpW h8Ag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e0CWS6P8; 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-102330-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102330-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id a20-20020a17090abe1400b0029ba16fb6b7si1939318pjs.62.2024.03.13.12.08.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 13 Mar 2024 12:08:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-102330-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=e0CWS6P8; 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-102330-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-102330-linux.lists.archive=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5876B28ED2D for ; Wed, 13 Mar 2024 19:01:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5FC1F604B3; Wed, 13 Mar 2024 18:02:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="e0CWS6P8" Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 2C05B6027E for ; Wed, 13 Mar 2024 18:02:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710352951; cv=none; b=hTIxjc0na/AGlWDieY8CwK5jj/liM0Pz77YrDfUb2ydtV83JFcP9phfCb3xgL86XCF239/W69xF4LhRyqtR3eyZKZWmWRwq0rN07THjD7IB8d5xErUm0QH5Rtgm7NsLGGif6gk6gIrKZY+UnAO7gLi9ciYdwKNfOZJOYkXsM0YQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1710352951; c=relaxed/simple; bh=SmKZWZOsYB/pJ+10dsUo6FKTrviWROv7v/wIEMqhvPo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NoOsVcl1cvurCKgejDKGhQkrMu896lp3pBLR1eAhnMv1iBh9hwwkvP4qhzYoVbAyvlJZGXVy8ODc8vwDH6EJrf3F59hRhNv2SMqqkN09+JC4vSxuDn3iUJHCu4Wncl4jG5p7xl3yLB/gFSKwop3Makv+n9mFamiiY3jjeY9jRAc= 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=e0CWS6P8; arc=none smtp.client-ip=170.10.133.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=1710352949; 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=XucXp3hxAwKTj7st+z6y9+02SpKNl75gXYBpv6v0s08=; b=e0CWS6P8/oSVQWRcalaJDZ7s1AL6SftZgvsr1tkQt8lDXe4nYhOVfamRu7sGTVme0Zt0AJ lHHkL25OJAM2SVULOc/FrieggE8hhgR47BLBm77EO9YdHriurvzofZceXfry8FeBPYytT3 GimwMZPhXhsQ5kuNqK1f6+b73Xr9YmY= 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-270-kynu_JlIMbuON6sxRRgrVg-1; Wed, 13 Mar 2024 14:02:22 -0400 X-MC-Unique: kynu_JlIMbuON6sxRRgrVg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (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 BCB8A1C05EAD; Wed, 13 Mar 2024 18:02:20 +0000 (UTC) Received: from vschneid-thinkpadt14sgen2i.remote.csb (unknown [10.39.194.115]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 40865C04221; Wed, 13 Mar 2024 18:02:15 +0000 (UTC) From: Valentin Schneider To: linux-kernel@vger.kernel.org, kvm@vger.kernel.org, linux-arch@vger.kernel.org, x86@kernel.org Cc: Josh Poimboeuf , Thomas Gleixner , Borislav Petkov , Peter Zijlstra , Pawan Gupta , Ingo Molnar , Dave Hansen , "H. Peter Anvin" , Paolo Bonzini , Wanpeng Li , Vitaly Kuznetsov , Arnd Bergmann , Jason Baron , Steven Rostedt , Ard Biesheuvel , Frederic Weisbecker , "Paul E. McKenney" , Feng Tang , Andrew Morton , "Mike Rapoport (IBM)" , Vlastimil Babka , David Hildenbrand , "ndesaulniers@google.com" , Michael Kelley , "Masami Hiramatsu (Google)" Subject: [PATCH v3 4/4] x86/tsc: Make __use_tsc __ro_after_init Date: Wed, 13 Mar 2024 19:01:06 +0100 Message-ID: <20240313180106.2917308-5-vschneid@redhat.com> In-Reply-To: <20240313180106.2917308-1-vschneid@redhat.com> References: <20240313180106.2917308-1-vschneid@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.8 __use_tsc is only ever enabled in __init tsc_enable_sched_clock(), so mark it as __ro_after_init. Signed-off-by: Valentin Schneider Acked-by: Josh Poimboeuf --- 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 5a69a49acc963..0f7624ed1d1d0 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; -- 2.43.0