From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bmailout1.hostsharing.net (bmailout1.hostsharing.net [83.223.95.100]) (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 3081F17BD9 for ; Sat, 21 Jun 2025 12:29:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=83.223.95.100 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750508977; cv=none; b=LdGP1r21w3iaGZFTi38PecPO0nXTiZWphQbcLWTWBWjuPPSgYlTGUkhbc1z25vzH1/7x9Rnqihd+SmByRJmtjMYMXeYshoGtD7CQqVolSgINDhE4rEw8E34LZlhzaE/aYLoOWXDvfPmAIRiUcDen5jmY48mGGSNjdiwL7oQ9veU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1750508977; c=relaxed/simple; bh=B9/NmsWY3nHQBr0tUcXtW3K/Z0zrpsLFxCripgEsImg=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=K56QJBXtGrF1KTzOZOUStZws0wgr7F8PJM+jpYKe9l9+YXcdqpW9b0SH9IOOhU5QAl9foOBGzy7IaZMPnfE8NAt7dTw/KHQ4Et96ksT0OPMweSbyZH3rFSCx8yM4+I+iS2xiLQ3uK8sJbBEWY3GAR4uW4QDRQ1JAC1iEfRNsYyM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de; spf=none smtp.mailfrom=h08.hostsharing.net; arc=none smtp.client-ip=83.223.95.100 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=wunner.de Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=h08.hostsharing.net Received: from h08.hostsharing.net (h08.hostsharing.net [IPv6:2a01:37:1000::53df:5f1c:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "*.hostsharing.net", Issuer "RapidSSL TLS RSA CA G1" (verified OK)) by bmailout1.hostsharing.net (Postfix) with ESMTPS id 760EC2C62E1F; Sat, 21 Jun 2025 14:29:33 +0200 (CEST) Received: by h08.hostsharing.net (Postfix, from userid 100393) id 58EE73A6357; Sat, 21 Jun 2025 14:29:33 +0200 (CEST) Date: Sat, 21 Jun 2025 14:29:33 +0200 From: Lukas Wunner To: Ben Hutchings Cc: David Airlie , Bjorn Helgaas , Joerg Roedel , Suravee Suthikulpanit , Andi Kleen , Ahmed Salem , Borislav Petkov , dri-devel@lists.freedesktop.org, iommu@lists.linux.dev, linux-pci@vger.kernel.org Subject: Re: [PATCH] agp/amd64: Bind to unsupported devices only if AGP is present Message-ID: References: Precedence: bulk X-Mailing-List: iommu@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Sat, Jun 21, 2025 at 02:07:40PM +0200, Ben Hutchings wrote: > On Sat, 2025-06-21 at 11:40 +0200, Lukas Wunner wrote: > > Since commit 172efbb40333 ("AGP: Try unsupported AGP chipsets on x86-64 by > > default"), the AGP driver for AMD Opteron/Athlon64 CPUs attempts to bind > > to any PCI device. > > > > On modern CPUs exposing an AMD IOMMU, this results in a message with > > KERN_CRIT severity: > > > > pci 0000:00:00.2: Resources present before probing > > > > The driver used to bind only to devices exposing the AGP Capability, but > > that restriction was removed by commit 6fd024893911 ("amd64-agp: Probe > > unknown AGP devices the right way"). > > That didn't remove any restriction as the probe function still started > by checking for an AGP capability. The change I made was that the > driver would actually bind to devices with the AGP capability instead of > starting to use them without binding. The message above would not be emitted without your change. The check for the AGP capability in agp_amd64_probe() is too late to prevent the message. That's because the message is emitted before ->probe() is even called. Thanks, Lukas