Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2088615iof; Tue, 7 Jun 2022 19:19:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwpM/le01lwkZo/4ISEoi3LZfiuKTmJ/1dvW7Ay3n9REqHipDyhUwYGpozI/0yzjafpWsEW X-Received: by 2002:a63:5b5d:0:b0:3fc:97d5:f8b2 with SMTP id l29-20020a635b5d000000b003fc97d5f8b2mr28468048pgm.322.1654654755976; Tue, 07 Jun 2022 19:19:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654654755; cv=none; d=google.com; s=arc-20160816; b=l1akvmEdAvXWY70t1QX0ng01fsLF2yHefG+q6E7uE5lqh8bke9eVlYzdk8AonNyorR PZcuSzdr9lTGkPSyStOkGHhZKU3Nld6EOsDPGBXBzgM55OP9kxCv89Comey6p8yG9WUB W/WMhYU6i8esUqHuiDq+Z3wZvQcB0LYuRV0zoPcy751YaTa6AG0clsQruItsaRfOstwi 8eJRoO6/5jRJK44RGZ1tGeaGDypOcRihT+J3FipkJqvnfdRsSQ2SteEoGmtvqaNCwz+p kp8VHiaAnUMxOH0aAvXLZTTK1rBCuW4WuZTcBqGaxk07dYIUEA+W0WKFl2DBGnuuCafl XZKA== 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=G3Ji+4lQfl3Ja5MQm4/rD/6sglFgPBpanVJet1x0C5o=; b=0+l/CW1X8HC3lfC2rTSu0dIPnm5Qfdp9WIRcU+thPsYGgpR2/SarwLbSHB67PxXEyu J3mRKZZbxOUJ0nrht0gQbyoG3GRaaRRIv8vZ3N94KqayG+R3oSgIWUklq8V9J2cZTt6+ kOiPSEIXu7dgqgxr8QLvplgJR8r8v/XNePqYK6Qv7BNhqcQItaW2ifeIq/RFEV289CsD wDFc/h/RvQA5KDywiZCXg3MIhJ8HZgll3wGd7yNpjI+6npUN8ZoAP/gu8fGJmiQ6SvnP iIusg/D8ec98NGzo0JH98FEo/NLiRnbenki+JQB53sjKMBJZvLjoGyqerDXuIEsiEfCA RXGw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=WS19y0of; 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 i131-20020a639d89000000b003fa23e7ac05si29427089pgd.418.2022.06.07.19.19.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 19:19:15 -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=WS19y0of; 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 out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 75D2F3A2B85; Tue, 7 Jun 2022 19:06:59 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1358649AbiFGWJN (ORCPT + 99 others); Tue, 7 Jun 2022 18:09:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33200 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1379942AbiFGVGh (ORCPT ); Tue, 7 Jun 2022 17:06:37 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAB5C212561; Tue, 7 Jun 2022 11:50:39 -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 ams.source.kernel.org (Postfix) with ESMTPS id 73919B82182; Tue, 7 Jun 2022 18:50:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E2653C385A2; Tue, 7 Jun 2022 18:50:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627838; bh=FQ0KiZojiiCMdSntTJQX+VlNmgl4iS0gWsxYxk6CTm8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WS19y0ofb56z6PskalvI9tPZeevjymP5pwlPmvVqMwI2h2303YQq4xhrcWyRpTWw8 e6EAHYN5YTT8tmWvNWDH0kNp5s1C3cZHgjFu5N5+He3MTZ45blhjE/hWe1AdhAThTQ SSp4zOzsqtlhYK9AeOgnDb5T5GH+7KYhA7UNdrLA= 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.18 071/879] x86/platform/uv: Update TSC sync state for UV5 Date: Tue, 7 Jun 2022 18:53:09 +0200 Message-Id: <20220607165004.752723928@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607165002.659942637@linuxfoundation.org> References: <20220607165002.659942637@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 f5a48e66e4f5..a6e9c2794ef5 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