From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 82EC015D5AB; Tue, 2 Jul 2024 12:24:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923046; cv=none; b=P5KLws3o3VCUIdh9otbB+cxw9LNaazjS1x9FZMvf9NPgiLr3vMUMHzdKxWPh9Sx8sD1UBo+tZ+Xty8aUjKYVuNamNBytBfoOWLcICXxH6gctKlAGMJnnPMsrnEX3e8uQ5bJN6S1fXLszj00dUUV+qNkFbJEaIXcwXQElX4YEGr4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1719923046; c=relaxed/simple; bh=ZlcDNI6pGGDPH5HC2e7A4qlmK/71B8n6Njrvg7BCTg4=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=BIpqYWMS0/kdobXEqYnzIouafMPIKgXPqDihhr/EzvpRyKSOaXUuFXNX5fS6npvyGff7Hd8u/PUPS16cXpNrbxqfsHVjWBkvAIXFmmpf3F0N2OfOrQiTYy099jnUOqoDZNkzA7HRzytd2ofPrREDiI5vvn2tG+otvaq7ash6KkQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id EBA4A339; Tue, 2 Jul 2024 05:24:28 -0700 (PDT) Received: from [10.1.196.40] (e121345-lin.cambridge.arm.com [10.1.196.40]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DE07A3F762; Tue, 2 Jul 2024 05:24:01 -0700 (PDT) Message-ID: Date: Tue, 2 Jul 2024 13:23:56 +0100 Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 0/4] iommu: Remove iommu_fwspec ops To: Saravana Kannan Cc: Will Deacon , Joerg Roedel , linux-acpi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, iommu@lists.linux.dev, devicetree@vger.kernel.org, Rob Herring , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , "Rafael J. Wysocki" , Len Brown , Jean-Philippe Brucker , Andy Shevchenko References: From: Robin Murphy Content-Language: en-GB In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 21/06/2024 9:51 pm, Saravana Kannan wrote: > On Fri, Jun 21, 2024 at 8:46 PM Robin Murphy wrote: >> >> v1: https://lore.kernel.org/linux-iommu/cover.1713523251.git.robin.murphy@arm.com >> >> Hi all, >> >> Here's v2 of this little cleanup, with acks and the additional cosmetic >> tweak suggested by Andy. There were some slightly non-trivial changes in >> the rebase so I've left off Jean-Philippe's tested-by from v1, but I've >> given it a quick spin on arm64 ACPI and DT and all seems well still. > > Hi Robin, > > I see in this series you talk about figuring out if a device has a > driver that could match. There has been a "can_match" flag in every > device that's set if a driver that match it is present, but hasn't > probed the device yet (for whatever reason). Just pointing that out in > case that makes things a lot easier for you. As of now, we don't > handle clearing it when the driver is unregistered, but if that really > needs to be handled, that shouldn't be too difficult. Thanks, that's interesting to know. I'm not sure it's directly applicable here since we have the more general case where the IOMMU driver may also be a module that's not even loaded yet. What ultimately matters is whether someone has called iommu_device_register() for a matching IOMMU instance, or may do within a reasonable timeframe, so as long as we can keep relying on fw_devlink and deferred_probe_timeout to do most of the heavy lifting then I'd actually hope we can avoid getting into the low-level details here. Cheers, Robin.