From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-002e3701.pphosted.com (mx0a-002e3701.pphosted.com [148.163.147.86]) (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 827793112D9 for ; Thu, 11 Sep 2025 13:22:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=148.163.147.86 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757596937; cv=none; b=OQJ/CO/7S3gdIEtuo0o+Pkakmc5/jlD5YCfRixYhmyjZgl1cWd7J5Uq1yF9Gtq5WwmQG60ilAIFUyV6BfLbX8DNGZtMj9nr5SGj3V2Rz3xS59uHB7W4mj9b/TOKt8BZr/JUn6Gp3HhNSEuN626UurUdJ/Rp1Gnw70aOtOiEIuwg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1757596937; c=relaxed/simple; bh=kzaYfVKClC8zTofgRQsa9dGixxFIW3atmcOvDxWrF/s=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=a7qCg5JzFAH43wPuCSHtTAqsMntggnIRv4E+eLdJjsZaG7dDsULNIVN2yb5INkjH0YUVePLZxTWrQ8Nb1GkkOIxFIxuapQp/Mr/NQWPIHSDea8AYT72iQjPtlNYYKmKtxo6W1a4pTujOrghSYLMfMlG4Ue+TJeqtlOtjv36ssI8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=hpe.com; spf=pass smtp.mailfrom=hpe.com; dkim=pass (2048-bit key) header.d=hpe.com header.i=@hpe.com header.b=C6uujDB7; arc=none smtp.client-ip=148.163.147.86 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=hpe.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=hpe.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=hpe.com header.i=@hpe.com header.b="C6uujDB7" Received: from pps.filterd (m0150241.ppops.net [127.0.0.1]) by mx0a-002e3701.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 58B3B8el014519; Thu, 11 Sep 2025 13:21:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=hpe.com; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to; s=pps0720; bh=yUmHokBmiseFRAii7M7gAnuKQk j8FGUiN9mSar9TeEE=; b=C6uujDB7reJHg1xmkNfHCyCk0LxCryHQmQr20uh8Da HUmXICMtdd17+721z+EFFprRBNmM1COwJcILqHlqxJGcq8FUJO6tbDyB68V0ugXm kCHeIiZQbZU1bU+R3EC9fNPVxI4JwwmQxN+sa3anRgvsjNJxKylt+za8sOiXroPP dE9BVdIuKh0QbYIA8eJVHMsfRmjebLKZerK+6HAo7eZiLW4knuEZjUL+fPmY8voO RfxaYvXyhbVVkgiTsaHdG1qV+xfJIMXKy+55oSvTuu+axJt0lHEPUHRn5khg7Oam U5vK/1y28CCevFfyc12ppCruR1Cx3LwpysITN6zWvHUA== Received: from p1lg14878.it.hpe.com ([16.230.97.204]) by mx0a-002e3701.pphosted.com (PPS) with ESMTPS id 493p9xccp0-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 11 Sep 2025 13:21:23 +0000 (GMT) Received: from p1lg14885.dc01.its.hpecorp.net (unknown [10.119.18.236]) (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 p1lg14878.it.hpe.com (Postfix) with ESMTPS id 60FB9130DE; Thu, 11 Sep 2025 13:21:21 +0000 (UTC) Received: from hpe.com (unknown [16.231.227.39]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (Client did not present a certificate) by p1lg14885.dc01.its.hpecorp.net (Postfix) with ESMTPS id 03C54807E08; Thu, 11 Sep 2025 13:21:18 +0000 (UTC) Date: Thu, 11 Sep 2025 08:21:16 -0500 From: Dimitri Sivanich To: Linux Kernel Mailing List Cc: Jiri Wiesner , Thomas Gleixner , Jonathan Corbet , Steve Wahl , Justin Ernst , Kyle Meyer , Russ Anderson , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" Subject: Re: [PATCH v3] x86/tsc: Disable clocksource watchdog for TSC on recent UV Message-ID: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Proofpoint-ORIG-GUID: WyjB0Z53Dz7tWgyriV0y5dzQbbqSzt6b X-Proofpoint-GUID: WyjB0Z53Dz7tWgyriV0y5dzQbbqSzt6b X-Proofpoint-Spam-Details-Enc: AW1haW4tMjUwOTExMDAyNiBTYWx0ZWRfX1E/N97zgfW2A ZTiqsvVangoLhB4uoSISvM2edmBlP/jAWoC6t+7ll7iyRSoKr0CqoY4ewruHhv0av/TF0K/Ks4x mdxDCnLrRRcGdLOPR4mFJewULFq4dzp5on0mcTdA/G7YZ/ydIl+WNkT7APZbZPtdhLx0H0WV6fZ JoN+SqUQ2NA2C8tqalvPmuTq2OSPNRFYZ3/cqZJdjeTSbizaLR9aIbaMqEQcIqfbt3OoGmd6uTH bUQ0l8Auo2dLLfA0Cz++tp9If5X09S9k9yXgbL8guQr5WpwzP0aHGz9pIbGl6T+ihcYEgOSfiBZ pHLLnx05+ffucZvYUXlTkZjn6rfdyZQKuTXzCp2MYSsqjuVT0CT2CkNYF0BBmilmSdqD0UVc2tY fDYk0I8F X-Authority-Analysis: v=2.4 cv=Ke/SsRYD c=1 sm=1 tr=0 ts=68c2ccd3 cx=c_pps a=UObrlqRbTUrrdMEdGJ+KZA==:117 a=UObrlqRbTUrrdMEdGJ+KZA==:17 a=kj9zAlcOel0A:10 a=yJojWOMRYYMA:10 a=MvuuwTCpAAAA:8 a=iDfSRxgGKTX3H65gcVQA:9 a=CjuIK1q_8ugA:10 X-HPE-SCL: -1 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1117,Hydra:6.1.9,FMLib:17.12.80.40 definitions=2025-09-10_04,2025-09-11_02,2025-03-28_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 suspectscore=0 priorityscore=1501 malwarescore=0 adultscore=0 clxscore=1011 phishscore=0 bulkscore=0 impostorscore=0 spamscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2507300000 definitions=main-2509110026 On Wed, Aug 20, 2025 at 02:54:16PM -0500, Dimitri Sivanich wrote: > Disable clocksource watchdog checking on recent and future UV platforms > to avoid false positives. > > Commits 'b50db7095fe0 ("x86/tsc: Disable clocksource watchdog for TSC on > qualified platforms")' and '233756a640be ("Extend watchdog check exemption > to 4-Sockets platform")' were introduced to avoid an issue where the TSC > is falsely declared unstable by exempting qualified platforms of up to > 4-sockets from TSC clocksource watchdog checking. Extend that exemption > to include recent and future UV platforms. > > Signed-off-by: Dimitri Sivanich > --- > > Version 3: Fixes a build error in the X86 32-bit build. > > Version 2: Fixes a build error that occurs when UV is not configured. > > arch/x86/include/asm/uv/uv.h | 3 +++ > arch/x86/include/asm/uv/uv_hub.h | 2 ++ > arch/x86/kernel/tsc.c | 3 ++- > 3 files changed, 7 insertions(+), 1 deletion(-) > > diff --git a/arch/x86/include/asm/uv/uv.h b/arch/x86/include/asm/uv/uv.h > index 648eb23fe7f0..f1aebdf85e68 100644 > --- a/arch/x86/include/asm/uv/uv.h > +++ b/arch/x86/include/asm/uv/uv.h > @@ -38,6 +38,9 @@ static inline int is_uv_system(void) { return 0; } > static inline int is_uv_hubbed(int uv) { return 0; } > static inline void uv_cpu_init(void) { } > static inline void uv_system_init(void) { } > +static inline int is_uvx_hub(void) { return 0; } > +static inline int is_uvy_hub(void) { return 0; } > +static inline int is_uv_hub(void) { return 0; } > > #endif /* X86_UV */ > > diff --git a/arch/x86/include/asm/uv/uv_hub.h b/arch/x86/include/asm/uv/uv_hub.h > index ea877fd83114..6e085ce8fc02 100644 > --- a/arch/x86/include/asm/uv/uv_hub.h > +++ b/arch/x86/include/asm/uv/uv_hub.h > @@ -246,6 +246,7 @@ static inline int is_uv5_hub(void) { return is_uv(UV5); } > * then test if is UV4. > */ > > +#ifdef CONFIG_X86_UV > /* UVX class: UV2,3,4 */ > static inline int is_uvx_hub(void) { return is_uv(UVX); } > > @@ -254,6 +255,7 @@ static inline int is_uvy_hub(void) { return is_uv(UVY); } > > /* Any UV Hubbed System */ > static inline int is_uv_hub(void) { return is_uv(UV_ANY); } > +#endif > > union uvh_apicid { > unsigned long v; > diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c > index 87e749106dda..a9f97d423ab0 100644 > --- a/arch/x86/kernel/tsc.c > +++ b/arch/x86/kernel/tsc.c > @@ -32,6 +32,7 @@ > #include > #include > #include > +#include > #include > > unsigned int __read_mostly cpu_khz; /* TSC clocks / usec, not used here */ > @@ -1261,7 +1262,7 @@ static void __init check_system_tsc_reliable(void) > if (boot_cpu_has(X86_FEATURE_CONSTANT_TSC) && > boot_cpu_has(X86_FEATURE_NONSTOP_TSC) && > boot_cpu_has(X86_FEATURE_TSC_ADJUST) && > - topology_max_packages() <= 4) > + (topology_max_packages() <= 4 || is_uvy_hub())) > tsc_disable_clocksource_watchdog(); > } > > -- > 2.43.0 Just a friendly reminder about this patch.