Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2195159iof; Tue, 7 Jun 2022 22:51:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZhgvjXSJZvM/i6L1VlSQ7QzJvYA60gfaydTl9ZCDE85MHDAwGzxEHR+Av2/7t7opHetST X-Received: by 2002:a63:555d:0:b0:3fd:5d54:2708 with SMTP id f29-20020a63555d000000b003fd5d542708mr17551480pgm.92.1654667463062; Tue, 07 Jun 2022 22:51:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654667463; cv=none; d=google.com; s=arc-20160816; b=ZW2UKxBzm0EguzQBVj43lViG0N4X3Eae427dzPm1BJCYnef1ylprOviwMi7SdUJSM2 9V8aNp1zedzybwXt8mBBG6/cwFnT7wHN3U2FXmjO0vgNDcYnyZ7k7gioqvJKvQBIx+WB 4FNLPJZcaT0Rf8yUvfJ+bDgnwYoT8Bj5M8J0pv8U2tQ78c8oV4e3vKIJdYT9tHwq1a/Z MX//mJgUH9ABvtBUXIFrRmezEHnXijUoAzeja/rky+AAgh2ATlBsvPlC5OCBAabiFNKj TNSlZWmBRZ/9iMuQYOQUhSUCPtH2RQHPx4DbCWad7W4ktME7iBI8sqGvvwbqnQyFEoFE 6TpQ== 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=stHPFM8QjJlvKuo+3wamV8zbJWX2SPe7Np7Wc5GhlLY=; b=h8S4JkwpRSNpEjEyMdSpksnQXmwIEggfoSw8HBidZxbtlO6RH7vjYSlR33TLBG4byU w79Dh8YPrgfsYMFu1RzFrCVQrS8BTVMlYnp+CEyDLEHXfYdZXb8v2ZWXXTwHYljDuRKq 1OzUc+PqYwt6nP8PRmQq6+7R4gbAJHB55sDExSZHVJvHsBh4sKY3NQdXaYXtjNCTBFJT FkTxre+z2VL5eAhuWfPjuZqxHnw1oGmTdSB48IjDW5V3PcmO5n7rRycGLCVWyvBu0Cq+ +WbGkziyfVM+Gq9hK3b7Jepwq7JgU5yqP9vTtQJ69GVA9lEezEPCyuC3+WKhiqWYuQQw kcMw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=qVaP8LQU; 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 l189-20020a6388c6000000b003fe30ec8267si1433134pgd.612.2022.06.07.22.51.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:51:03 -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=qVaP8LQU; 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 A15BC3E48E5; Tue, 7 Jun 2022 22:17:56 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1391876AbiFHAqy (ORCPT + 99 others); Tue, 7 Jun 2022 20:46:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1383695AbiFGWGJ (ORCPT ); Tue, 7 Jun 2022 18:06:09 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 07CCB25225D; Tue, 7 Jun 2022 12:17:08 -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 BB9C1B8237B; Tue, 7 Jun 2022 19:17:06 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12862C385A5; Tue, 7 Jun 2022 19:17:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654629425; bh=+rr6wQg1UXT8+9VQVPiZnQB4JkYD2ZkKEtekqVIyEF0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qVaP8LQUeLOISYzQ8HMG9IeH6P9jHE0sj4vT5o7AuEiuXSVIdcOhQZFKxWFzopWV3 wZmSwecElJTI/v0gaYuuuNfGuGnMpdCOiPPivDhLogIt15L4IJt/5U4AdEMl88vf3x y5VGPPv05oxSFYf2bl70IFoEScWrEeqnpCno4SKk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "D. Ziegfeld" , =?UTF-8?q?J=C3=B6rg-Volker=20Peetz?= , Joerg Roedel , Sasha Levin Subject: [PATCH 5.18 687/879] iommu/amd: Increase timeout waiting for GA log enablement Date: Tue, 7 Jun 2022 19:03:25 +0200 Message-Id: <20220607165022.791728528@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: Joerg Roedel [ Upstream commit 42bb5aa043382f09bef2cc33b8431be867c70f8e ] On some systems it can take a long time for the hardware to enable the GA log of the AMD IOMMU. The current wait time is only 0.1ms, but testing showed that it can take up to 14ms for the GA log to enter running state after it has been enabled. Sometimes the long delay happens when booting the system, sometimes only on resume. Adjust the timeout accordingly to not print a warning when hardware takes a longer than usual. There has already been an attempt to fix this with commit 9b45a7738eec ("iommu/amd: Fix loop timeout issue in iommu_ga_log_enable()") But that commit was based on some wrong math and did not fix the issue in all cases. Cc: "D. Ziegfeld" Cc: Jörg-Volker Peetz Fixes: 8bda0cfbdc1a ("iommu/amd: Detect and initialize guest vAPIC log") Signed-off-by: Joerg Roedel Link: https://lore.kernel.org/r/20220520102214.12563-1-joro@8bytes.org Signed-off-by: Sasha Levin --- drivers/iommu/amd/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index b4a798c7b347..d8060503ba51 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -84,7 +84,7 @@ #define ACPI_DEVFLAG_LINT1 0x80 #define ACPI_DEVFLAG_ATSDIS 0x10000000 -#define LOOP_TIMEOUT 100000 +#define LOOP_TIMEOUT 2000000 /* * ACPI table definitions * -- 2.35.1