From patchwork Tue Sep 22 10:53:49 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Cabaj X-Patchwork-Id: 2309827 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4hqC535ykmz1yFq for ; Wed, 23 Sep 2026 06:54:15 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1x97V3-0005fv-Os; Tue, 22 Sep 2026 20:54:01 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1x97V2-0005fC-Bp for kernel-team@lists.ubuntu.com; Tue, 22 Sep 2026 20:54:00 +0000 Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) (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 smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 2946D3F154 for ; Tue, 22 Sep 2026 20:54:00 +0000 (UTC) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-93a0c7126e7so65352585a.2 for ; Tue, 22 Sep 2026 13:54:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790110439; x=1790715239; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=evLmEBv6ISROihkslniLb3/854f0z5GUGbsECTY5LIU=; b=ljnko1oj9PYBJKcw29LmytIjnZF4k4sJSofy4leabnFZUjvprxWDrd2MzhR435yfZR A1LBiLVBlkNEEgA38aaD5DIA3RvMiK1bgoTJbW062n/Cft/oi0lbE5rjUvPzYNTkRS4E HCUw2UE4ZSkjuwfUaE+z6xyRO/C1veVxqZrnIUq/FhKKYLoSj9PF7AtwdUmpwvX0xDPI rIysfOxfWouerBiZgR8DkYw9WWw82cyNmRJfZV2+t7Ms3v+ZDCUTHb4BMNliRhp+5MKx aGjynTFI3VsT8nLjCXTrRYUsHzg/0um84sC8RqXaADljIAwLKUV/1U+ekAcwGBKVWpWa uXVA== X-Gm-Message-State: AFuF++lH9S8q1FKr/7igkQvQA+gsAbIwQTGJGJJF60NH/SzSliEJJWim Ef3qFaSVQk/cfbfsJlZtgYFYELMm5/1gDHM8uboGx8SNKbaYcF3USDHdFJlEj/cFIFFpGbEk/AT FYw2M8uuLdt4+5iDhjTvX64yZ0jFGmLsULPBOPEAYf8A/5DW0xxLKdAjtnItJnADZM/6BlxBJHw 7/F8yDK/B7EC4j3Q== X-Gm-Gg: AYBFou3elEEX/PZWfb5trDNA215KdEQ1F4ySiBoM/du2zJ/hxVzU46QzkyiJPumW9w6 +nAghhF9SqqORscaEx19A2lppS//sdnOMJkxi2KJLJRqvPf/lSLjM+LxLDCSPF19LWXmftVNypX xEdVyDDvMPCNCeqn/VD1Oz3VBhoAklw4UNYRSqTIDbRmNE/wfOQWdRFlXWoEXfpqKOvu3IpHXN9 W4wc0PMW1+9AIKONzzb1s3FRMfBBeCN1tiNLMNJb2SXBe2G8l/ifkVZaiRTc1cuar6aDF00Djtt TsV9FW9NLn5N55p3TZ644mqhT9PWvadqFEgBbnGdj1nhz+c0aBelBjRTL8Bj50olsVJb6+Yfjub GujeHk4rx0fkU8hBmfpVz5prR1JQMiXa5/Mx3aIplOtwNS82cUAWLfPO/PNwsIgnB X-Received: by 2002:a05:620a:410c:b0:939:733d:cbe0 with SMTP id af79cd13be357-93c2509720bmr101741985a.3.1790110439179; Tue, 22 Sep 2026 13:53:59 -0700 (PDT) X-Received: by 2002:a05:620a:410c:b0:939:733d:cbe0 with SMTP id af79cd13be357-93c2509720bmr101739485a.3.1790110438857; Tue, 22 Sep 2026 13:53:58 -0700 (PDT) Received: from smtp.gmail.com (h69-129-43-220.mdtnwi.broadband.dynamic.tds.net. [69.129.43.220]) by smtp.gmail.com with ESMTPSA id af79cd13be357-93c248a1481sm67988885a.35.2026.09.22.13.53.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Sep 2026 13:53:58 -0700 (PDT) To: kernel-team@lists.ubuntu.com Subject: [SRU][S:linux-azure/R:linux-azure][PATCH 2/2] Revert "UBUNTU: SAUCE: clocksource: hyper-v: do not use an insanely big TSC in hv_read_tsc_page_tsc()" Date: Tue, 22 Sep 2026 15:53:49 -0500 Message-ID: <20260922205354.228673-3-john.cabaj@canonical.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260922205354.228673-1-john.cabaj@canonical.com> References: <20260922205354.228673-1-john.cabaj@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: John Cabaj via kernel-team From: John Cabaj Reply-To: John Cabaj Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2167893 This reverts commit f525d52296dc446a9463b7e8b835c530c68e6cfc. Signed-off-by: John Cabaj --- drivers/clocksource/hyperv_timer.c | 4 +--- include/clocksource/hyperv_timer.h | 4 ---- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/clocksource/hyperv_timer.c b/drivers/clocksource/hyperv_timer.c index 4f975688bfbd..df567795d175 100644 --- a/drivers/clocksource/hyperv_timer.c +++ b/drivers/clocksource/hyperv_timer.c @@ -433,10 +433,8 @@ static __always_inline u64 read_hv_clock_tsc(void) * times are in sync and monotonic. Therefore we can fall back * to the MSR in case the TSC page indicates unavailability. */ - if (!hv_read_tsc_page_tsc(tsc_page, &cur_tsc, &time)) { - WARN_ONCE(((s64)cur_tsc) < 0, "TSC is too big: %llx\n", cur_tsc); + if (!hv_read_tsc_page_tsc(tsc_page, &cur_tsc, &time)) time = read_hv_clock_msr(); - } return time; } diff --git a/include/clocksource/hyperv_timer.h b/include/clocksource/hyperv_timer.h index 47854dec64d8..d48dd4176fd3 100644 --- a/include/clocksource/hyperv_timer.h +++ b/include/clocksource/hyperv_timer.h @@ -77,10 +77,6 @@ hv_read_tsc_page_tsc(const struct ms_hyperv_tsc_page *tsc_pg, offset = READ_ONCE(tsc_pg->tsc_offset); *cur_tsc = hv_get_raw_timer(); - /* In case the TSC is insanely big, do not use it. */ - if (((s64)*cur_tsc) < 0) - return false; - /* * Make sure we read sequence after we read all other values * from TSC page.