Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2154304iof; Tue, 7 Jun 2022 21:34:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw0qRnABjx4Bp3uhzoqlz0Bz6yNs986umQVbSsYkOcq4206Ld4o1I6AytwKpZsBD/mb0KTi X-Received: by 2002:a17:903:2444:b0:167:5fe8:4a16 with SMTP id l4-20020a170903244400b001675fe84a16mr21068181pls.20.1654662845454; Tue, 07 Jun 2022 21:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654662845; cv=none; d=google.com; s=arc-20160816; b=Hqbn/yK/DuLk7MBkfoHGiCcky5LxXl+8ZPri+sHHN2WbImqxZGNLJPc6zBck6di4xr WRn8TnVnwjdmLZM6Xs0lvOK1/AJhcRndEwn2dbkEWwDJYyfy8oKwC35BBHe1WJB/hNYF JQTU2AztuXzBaHR+pmHai25IKjPyn7mzhuB+fOrgDdXe3oNtQl0m5WBYKdehqM+sJ/8t MStoJ4xcCGPjIzoJ80A1FUKUBc5FDye+LMF/a6HrIl7yPOUE9i85fFsmVz0IiEoSai9y Oy8Hpu6cwsunJ+GLw/tcgX+SVoVncfHxWRCTO3KB9LrqKl9h79r75riLVJS70Bvfdlom 6FKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=jP49TMb4ep9x6pFTHPk43J+5/7Wo3bIUJC3w9AjTg8w=; b=xHu08qDc/Kkw8bpmglyIMrnth9xdbKUsJxKQA/55/mftCFQcFdf0B55tGvBI/CAc0J Ijni4HzOeRwYHAopdoycfx7PpJn8gbuZ/Bcfd2+VuuNorAHbMJf/hotCunsP8p9Kfk8J oxSrAq1Qo/i281K8hTZl2ZA++MIVbTsOFS9HSLBppbahNDsf+qBMuhEmsBofwoRpWzos lMtLyDLlOdMW3cN4Ga1Zy9wJ36F1zefxuw0ALHUf+HC/Kf/AByK35kwW0ePB+yJHcSsr ruE/aBAfq2mgNUzduxwh/GyDpoblpPbu4mABNItqlD/B7a0YgxwquL1rl+f17CSHkYDl TGaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LFntFB7W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id nv11-20020a17090b1b4b00b001df3d491cb1si39577403pjb.161.2022.06.07.21.34.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 21:34:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=LFntFB7W; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 2C76A42D402; Tue, 7 Jun 2022 21:02:35 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344334AbiFGR05 (ORCPT + 99 others); Tue, 7 Jun 2022 13:26:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346106AbiFGRV7 (ORCPT ); Tue, 7 Jun 2022 13:21:59 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E971C1078BC; Tue, 7 Jun 2022 10:21:21 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 70F8360920; Tue, 7 Jun 2022 17:21:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77C90C385A5; Tue, 7 Jun 2022 17:21:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654622480; bh=Maymb1M0ojyJFMRqarHeva5kqwx2BGWP3YxckPlwec4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LFntFB7W4ZE9RbsreL1dGGtnJ481U5Zbou49esroJ6eCr6AOC4j37shSBxpLJY39P voVxAQkzTPahFNl3ALL37gHvrhPJGmlr0jrwrhuhP7Vu5FEVv2G4yI5rNUeMrqKQuf P0yZN84RA4Y3NO2bZn9Q3D9m8G0kfvdeTg1Zfo2g= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mike Travis , Steve Wahl , Borislav Petkov , Dimitri Sivanich , Thomas Gleixner , Sasha Levin Subject: [PATCH 5.10 033/452] x86/platform/uv: Update TSC sync state for UV5 Date: Tue, 7 Jun 2022 18:58:10 +0200 Message-Id: <20220607164909.535612789@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164908.521895282@linuxfoundation.org> References: <20220607164908.521895282@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Mike Travis [ Upstream commit bb3ab81bdbd53f88f26ffabc9fb15bd8466486ec ] The UV5 platform synchronizes the TSCs among all chassis, and will not proceed to OS boot without achieving synchronization. Previous UV platforms provided a register indicating successful synchronization. This is no longer available on UV5. On this platform TSC_ADJUST should not be reset by the kernel. Signed-off-by: Mike Travis Signed-off-by: Steve Wahl Signed-off-by: Borislav Petkov Reviewed-by: Dimitri Sivanich Acked-by: Thomas Gleixner Link: https://lore.kernel.org/r/20220406195149.228164-3-steve.wahl@hpe.com Signed-off-by: Sasha Levin --- arch/x86/kernel/apic/x2apic_uv_x.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/x86/kernel/apic/x2apic_uv_x.c b/arch/x86/kernel/apic/x2apic_uv_x.c index 40f466de8924..9c283562dfd4 100644 --- a/arch/x86/kernel/apic/x2apic_uv_x.c +++ b/arch/x86/kernel/apic/x2apic_uv_x.c @@ -199,7 +199,13 @@ static void __init uv_tsc_check_sync(void) int mmr_shift; char *state; - /* Different returns from different UV BIOS versions */ + /* UV5 guarantees synced TSCs; do not zero TSC_ADJUST */ + if (!is_uv(UV2|UV3|UV4)) { + mark_tsc_async_resets("UV5+"); + return; + } + + /* UV2,3,4, UV BIOS TSC sync state available */ mmr = uv_early_read_mmr(UVH_TSC_SYNC_MMR); mmr_shift = is_uv2_hub() ? UVH_TSC_SYNC_SHIFT_UV2K : UVH_TSC_SYNC_SHIFT; -- 2.35.1