From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pj1-f69.google.com (mail-pj1-f69.google.com [209.85.216.69]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A33AF495029 for ; Thu, 6 Aug 2026 23:36:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.69 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786059407; cv=none; b=ULQFGU4Z8HUKNIcz4Ee/w/5hObgYedoC2Ooyk0MffEyOyl34bkQNsXWxuxGDdhtO8u5+KStWEs/5S9kgVF/tUlsLqrfyFXiYgjWc/Mdl4AJ1ajbml3J24IZyxnANm7YMtNYuSd/RZUfUtJLLKzD2i2EBfThoCmpBjubPR9afCV0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786059407; c=relaxed/simple; bh=JVq3rGO4pg6RPeAnx1wMiHtknekbd2VNIRn3YGfu0ao=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=UQTfsRFMc5DSAT1ABNpWuFDbStMEQNEbPiNbzwjZlmf6ZzCOuKZXWMFMyXJaFCYXCp1pQt0BlWD11Bd4Ntt59bh3m4vtj27YNR0vxuJBoMw+eXfmWRNzfqGNTHN94db9dSdlJlaLOkAHD3t9UF9cg0BB21TzpAyJUbNsrnEMx8U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=Iym4Khdz; arc=none smtp.client-ip=209.85.216.69 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--seanjc.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="Iym4Khdz" Received: by mail-pj1-f69.google.com with SMTP id 98e67ed59e1d1-38e475f83a2so4350213a91.1 for ; Thu, 06 Aug 2026 16:36:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1786059404; x=1786664204; darn=lists.linux.dev; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:reply-to:from:to:cc:subject:date:message-id :reply-to:content-type; bh=VAfqOqpweyKvsFpq/agEYC9CEWnfcmlui4k8L8ZR5pE=; b=Iym4KhdzPxDstpv27JB6hVwd/FnA2NtnhehMxiqRn3ajo5nCYI85SWVuG8fcStu8Jv jHKPu1vjcagQoMON2YGks6w/UMJm0nvIEJYMJUESq0Hm3kt1sINDKnY5es+d3xXMJb6B fSECcuOzVouwx14AwinWzsJxjl7Jaui0sBF7UKYIkh7Rk2zDd79DJfzguIYEtgSbT8yP u+XQCnfr9zKLYJOOG+erTz0D3SWJGvx7jBRkg1yyxW8ZvQ/FvMY6Jqjrmu6AyKgRh0do cUjwQPkRh3YRzC+Ndydgu82Hd1ugnZbVtRxx90vZWiMyxcao9GeEw81FGx9DkcbsoI0N wLVw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786059404; x=1786664204; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:reply-to:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=VAfqOqpweyKvsFpq/agEYC9CEWnfcmlui4k8L8ZR5pE=; b=OE1/RRIAipNzQf3XuCNN+s7a/Aea3qNvtTVhX69RykofHkTBElBlOWhT5ubUhHzuvL yDRLmn5dLeMqdEOt1+kcOKZclYgjM8t+JEa1AYgfNz202Dco3zFsBTMTgCSouKcGGdAc bTvQsw8PigX6DPmh0FFakVMS7QyfJg1X1s7fXx3iDvbG+bSgYN9dFD1NKBnFWsNare5S oEN5JnFdO9mSxhXASus/pV7nHDRWnYT/i1hhLKQSRoQUsI3H9GVDMD5ZGh2SPwboPsEY ZiloFOb1xgTWPeJtN2aI6yD25wDoMyg1KdGdONM3D/xdvv9bPvtSuyWzqSuMyXAQNTgY 0x8A== X-Forwarded-Encrypted: i=1; AHgh+RoYg12sEOs/cnJPrITXDgc/gZONi7SryvVtzzoL630piVbfat9qqVBwP3M1gsTtIx0aCTxM/aHc1hyP@lists.linux.dev X-Gm-Message-State: AOJu0YyI/XOr7ntWarWdVZj81lNTlR36ubOJCd29yCaeAV08ABlPVJcV TI2rnpHS1XBtEQcndTvFniRBAoG425eOaMxW8XARUYR2yN8zMFyUqANMPShqTAOdavRCinGyUdv 78D1NaQ== X-Received: from pjbcu4.prod.google.com ([2002:a17:90a:fa84:b0:381:7fb0:5a60]) (user=seanjc job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:288b:b0:38e:8300:af51 with SMTP id 98e67ed59e1d1-3903c54d040mr19813478a91.8.1786059403683; Thu, 06 Aug 2026 16:36:43 -0700 (PDT) Reply-To: Sean Christopherson Date: Thu, 6 Aug 2026 16:35:33 -0700 In-Reply-To: <20260806233609.212337-1-seanjc@google.com> Precedence: bulk X-Mailing-List: linux-coco@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260806233609.212337-1-seanjc@google.com> X-Mailer: git-send-email 2.55.0.679.g6767b8d81c-goog Message-ID: <20260806233609.212337-17-seanjc@google.com> Subject: [PATCH v6 16/51] x86/tsc: Rename pit_hpet_ptimer_calibrate_cpu() => native_calibrate_cpu_late() From: Sean Christopherson To: Kiryl Shutsemau , Rick Edgecombe , Sean Christopherson , Paolo Bonzini , "K. Y. Srinivasan" , Haiyang Zhang , Wei Liu , Dexuan Cui , Long Li , Ajay Kaher , Alexey Makhalov , Jan Kiszka , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Juergen Gross , Daniel Lezcano , Thomas Gleixner , John Stultz Cc: Vitaly Kuznetsov , Broadcom internal kernel review list , Boris Ostrovsky , Stephen Boyd , Miroslav Lichvar , x86@kernel.org, linux-coco@lists.linux.dev, kvm@vger.kernel.org, linux-hyperv@vger.kernel.org, virtualization@lists.linux.dev, linux-kernel@vger.kernel.org, xen-devel@lists.xenproject.org, Michael Kelley , Tom Lendacky , Nikunj A Dadhania , David Woodhouse , David Woodhouse , Thomas Gleixner Content-Type: text/plain; charset="UTF-8" Rename the late CPU calibration routine so that its relationship to the early routine is more obvious and intuitive. No functional change intended. Signed-off-by: Sean Christopherson --- arch/x86/kernel/tsc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index 1d41ef1db27c..dd9e04e325d6 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -752,7 +752,7 @@ static unsigned long cpu_khz_from_cpuid(void) * calibrate cpu using pit, hpet, and ptimer methods. They are available * later in boot after acpi is initialized. */ -static unsigned long pit_hpet_ptimer_calibrate_cpu(void) +static unsigned long native_calibrate_cpu_late(void) { u64 tsc1, tsc2, delta, ref1, ref2; unsigned long tsc_pit_min = ULONG_MAX, tsc_ref_min = ULONG_MAX; @@ -927,7 +927,7 @@ static unsigned long native_calibrate_cpu(void) unsigned long tsc_freq = native_calibrate_cpu_early(); if (!tsc_freq) - tsc_freq = pit_hpet_ptimer_calibrate_cpu(); + tsc_freq = native_calibrate_cpu_late(); return tsc_freq; } @@ -1472,7 +1472,7 @@ static bool __init determine_cpu_tsc_frequencies(bool early, else tsc_khz = native_calibrate_tsc(); } else { - cpu_khz = pit_hpet_ptimer_calibrate_cpu(); + cpu_khz = native_calibrate_cpu_late(); } /* -- 2.55.0.679.g6767b8d81c-goog