From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3E1462EFDB0; Thu, 3 Jul 2025 15:10:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751555447; cv=none; b=NdYxp5T8UQm3ZEqiG5grsXomDzDAyC/mh7V7UJKMC2WMkmpluN7aaHMNN5SEFqWoGmao/xKWvhfLmNmjOKE647SqG5GlpDG3iyrCFe10DbNMYl/skhFszR8yGtimzjJuKn9ztCOURckPcvkHo0NRP+p2zBMcAbp+C61otcVR30s= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1751555447; c=relaxed/simple; bh=hnEVQTXQYV8xxmb2STIZER7B1XopycvTJLc9Wak3N7U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=hj5MO+502uleUy7qGwbvZfjfD0EZjr/9wzYUKc0atzWRHu37nkB9vF1PB3qoGz3D8EV3kK01MH4T2tUqThqmlHXsT+1rUHnS5chvRMpakCjfJ/jtk9OxQTVaKas52n5eHQpe2tqEvTyu42kCl65K0cuOpk5XnKpH/Pam+siVj80= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=YN3+5WP8; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="YN3+5WP8" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A74BDC4CEE3; Thu, 3 Jul 2025 15:10:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1751555447; bh=hnEVQTXQYV8xxmb2STIZER7B1XopycvTJLc9Wak3N7U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YN3+5WP8jCBb4Kp93QRPdVePQRfftOWgDUJo/biS7nbWEZ7Hktq0NRag/H75KSLYA ByvuGrgLjXg27qZtGPl+0OA5VVLMUkxa2+KOViczTTQQ5TopQCWIXI/ENRHR04HDE6 3XyaKhlzv2IT926sUKH7/kN3bwI4SXQ4/RmUzbVo= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lukas Wunner , Bjorn Helgaas , =?UTF-8?q?Krzysztof=20Wilczy=C5=84ski?= , Joerg Roedel , Sasha Levin Subject: [PATCH 6.6 017/139] Revert "iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices" Date: Thu, 3 Jul 2025 16:41:20 +0200 Message-ID: <20250703143941.850863107@linuxfoundation.org> X-Mailer: git-send-email 2.50.0 In-Reply-To: <20250703143941.182414597@linuxfoundation.org> References: <20250703143941.182414597@linuxfoundation.org> User-Agent: quilt/0.68 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lukas Wunner [ Upstream commit 3be5fa236649da6404f1bca1491bf02d4b0d5cce ] Commit 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") changed IRQ handling on PCI driver probing. It inadvertently broke resume from system sleep on AMD platforms: https://lore.kernel.org/r/20150926164651.GA3640@pd.tnic/ This was fixed by two independent commits: * 8affb487d4a4 ("x86/PCI: Don't alloc pcibios-irq when MSI is enabled") * cbbc00be2ce3 ("iommu/amd: Prevent binding other PCI drivers to IOMMU PCI devices") The breaking change and one of these two fixes were subsequently reverted: * fe25d078874f ("Revert "x86/PCI: Don't alloc pcibios-irq when MSI is enabled"") * 6c777e8799a9 ("Revert "PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()"") This rendered the second fix unnecessary, so revert it as well. It used the match_driver flag in struct pci_dev, which is internal to the PCI core and not supposed to be touched by arbitrary drivers. Signed-off-by: Lukas Wunner Signed-off-by: Bjorn Helgaas Signed-off-by: Krzysztof WilczyƄski Acked-by: Joerg Roedel Link: https://patch.msgid.link/9a3ddff5cc49512044f963ba0904347bd404094d.1745572340.git.lukas@wunner.de Signed-off-by: Sasha Levin --- drivers/iommu/amd/init.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/iommu/amd/init.c b/drivers/iommu/amd/init.c index 2e7a12f306510..7296e02e2b849 100644 --- a/drivers/iommu/amd/init.c +++ b/drivers/iommu/amd/init.c @@ -2090,9 +2090,6 @@ static int __init iommu_init_pci(struct amd_iommu *iommu) if (!iommu->dev) return -ENODEV; - /* Prevent binding other PCI device drivers to IOMMU devices */ - iommu->dev->match_driver = false; - /* ACPI _PRT won't have an IRQ for IOMMU */ iommu->dev->irq_managed = 1; -- 2.39.5