Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp2183645iof; Tue, 7 Jun 2022 22:28:43 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzpyoWFtfoP5KzrPSVonZZsB8wAeE4Fu5e7nr+nFNsl1JgpW4rougU8k8gWcFTTEu3yHpLi X-Received: by 2002:a63:788:0:b0:3fc:6922:704 with SMTP id 130-20020a630788000000b003fc69220704mr28564197pgh.6.1654666123112; Tue, 07 Jun 2022 22:28:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654666123; cv=none; d=google.com; s=arc-20160816; b=I9hmyZas9yvAPKazt4q0PC7/pBCaRA19cQ1bm0yet007ixIRp+8rvXsZKVx1FR2Ev7 KOdVoj/L75PGW46ymZ74bi7MVHQkjmz5k7xsDUSqmqNeMyoQG2F9JiO+4kt5hoQDVQGN HAetMQsfPB1pwMMlq6S7XpF0iNXurSdz14Nxl9GQGy8aeJa0y2VzbeJFfhnJx4+SM7Av eplidKIMzG2sES9z3fOI/rRK9RipSYoJ2tVxl3EPQT13U9QEpAjg5aMKuanOoMK9dUL8 GXPCeASzpYYPocLDa0ZJ7dhlLW7hAZKxbRykEB4PWV77NLF2OrBdKa/Py1zigoMVQsds dpoA== 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=L5JDuvLxzq94BXzCOUewsnuJ/n3k/+JO4L5VzRihttM=; b=Url/uRiu5Abm98j64g6UV2ZIGeG4Eruymvhg8DzskAptNf+txS4hwUaOtoT0+fMbdz Dd1OqiqQ/KyDn5+XBP174/881RWgqLnGUWaZ9kTv9ZfUz9sptvMNN4LHveEtPnsk4BFO 5oyMdc3SmXlddh/51JSEqHrXq14EJ6wCUf3mFIuP8EVx9KXLm0YJwxbDSZ3xY47nW/qL wZwebaiv9qMsFVV0HO2rK6+Nh8BDhKaCKgIEOLsKgIy45EK4TvMmI1iMA/PtiwrvL199 RirC5taypzZmzY1s+AGQboE00hFy9bsaD7uYX5qGaPKsSqfDj4hns9S57EL+QUscS5H6 tUyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=woRR6bFs; 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 w5-20020a639345000000b003fad857c97bsi28841605pgm.314.2022.06.07.22.28.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jun 2022 22:28:43 -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=woRR6bFs; 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 5C10112088E; Tue, 7 Jun 2022 21:54:50 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349991AbiFGV3q (ORCPT + 99 others); Tue, 7 Jun 2022 17:29:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46114 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377989AbiFGUeo (ORCPT ); Tue, 7 Jun 2022 16:34:44 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8752C1E8E86; Tue, 7 Jun 2022 11:37: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 dfw.source.kernel.org (Postfix) with ESMTPS id 2059461579; Tue, 7 Jun 2022 18:37:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2B5E2C341D8; Tue, 7 Jun 2022 18:37:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1654627027; bh=WCdXBnjmg8UTEr+psG5ugmTy+sk2qrCsBrAAaFPk4Zw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=woRR6bFsn5L/yEquPLGbjB2bLmpjD7ZgE/Xdf2rExJYoylq0SeC3ybymfSW52Jidc Y48lt4rNzr1AECXP+HMaILKG0VbVO85uOu3q4WSEZCwPXBRc/G2EjWc2W4y8f+tqud rrRPBl4pnDkdpyglLTRzWREH854Sqb2KLMCB2tzQ= 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.17 590/772] iommu/amd: Increase timeout waiting for GA log enablement Date: Tue, 7 Jun 2022 19:03:02 +0200 Message-Id: <20220607165006.331620403@linuxfoundation.org> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220607164948.980838585@linuxfoundation.org> References: <20220607164948.980838585@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 7bfe37e52e21..6418a0445d6f 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