Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp1405891lqb; Thu, 30 May 2024 09:12:43 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW2jWmwPhXLE1ZlxO2Uy8G6riQQlivMM11bQNkETplUF1dHJLwb7+yShUDRgsT4tjyLwpgzAXrv+H1AxulE4lgg+oQ58osGus1Iom7UNQ== X-Google-Smtp-Source: AGHT+IH9xxoRzDCrFPms8QBabmeZ8GPUh7UFocGV/xiftoDYmiUOqummdg+ubGSuHVPymt6iCV3a X-Received: by 2002:a17:90a:b117:b0:2c1:a4ec:25d0 with SMTP id 98e67ed59e1d1-2c1abc3c4admr2978087a91.37.1717085563034; Thu, 30 May 2024 09:12:43 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717085563; cv=pass; d=google.com; s=arc-20160816; b=FQMepZSGMttVjkq+XVQt4SHZjZ43wN6LSW8Z/qeTFWILw8zvl6zTAlJMjfMgrNKW4G mcC8B1H04LQSF7T78KqqYSbAiPRxXLg4vxuEBtLjAl+5aTz+45KHyMEc3p4upjnQOqGa yfUH5Edq/3JxaJlG46NvNz8+8Hrg/8bV/pHjnbbdmoO7LPGFbLcGDZ2+6hNKLk+vTxt+ VfqGTrhg3cBv/745+8fRctuPr2V9YPWkM0LvVK8L+Em8/+6roglmMFD0tkEZV10AQ1Cq j5Of9IumeSGNvVZ0r936B1zbUM4luNroQswBffkim74aSQhgRU+/S2oMzkSaycOj+U6/ APbg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:content-language:from :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=peFa3AwoUtYiPa+e5UdXhlLqx3/puCmJGFHR2llsClE=; fh=lOXKE40k+JQY3qaBtv4b2FaDydRYQZ2BmHURd8tVBSQ=; b=d0EScUPAGXVXmR0hz3392z1Bhi2M8a3n5m6rlMbWUDAn+TmV8oK03Rza31XlV9gUCk 5QCFWeHxrylGwbil3SUiLRe6PN3ErEIHSWNf6jsNMzypI1qgAj7mv9AcT3H7qBZEuHGL OSOmVseZI84QlI1gKBV9Of/5VOcWWODqi9afWcOAwLljsCFW0zkFm6H15HYjLml+pFk7 rPdsRYl/uBTvRm600+VqBdVrQKjphpwCcUOcbZ75SLF4A6ZczxmiSwStDUBSlrbNWUrR KkAcdI6byibnonfPHnfIPlDR6llfsGC0ORs5xkVESWwwFWi7i0MCzfmZ3IBsQP1Z0X3A 5Iqw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-195622-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195622-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id 98e67ed59e1d1-2c1a77ac7afsi1802845a91.173.2024.05.30.09.12.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 09:12:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-195622-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-195622-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-195622-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id 835D3B2821A for ; Thu, 30 May 2024 15:49:31 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A150D1F94C; Thu, 30 May 2024 15:49:22 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C63DF21345 for ; Thu, 30 May 2024 15:49:20 +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=1717084162; cv=none; b=FkUvYZDul43iOyEhUrhhchrWJ3rcgZEiAwUlwca/kQka2RCjBCcoBb9G45/fFTeEbJd0QOR6s0GRfBkzKV1b8CeY23e3PN8ITo5x3sukwzppzHELO7AlxVOJvm+PPpLJ6gppvm/7rGI04FpRELF8tWhODIenuBgIy/vX5+JBjfA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717084162; c=relaxed/simple; bh=9mFsdyyM3ElhSR7egIawAprRDmxySE5698Uao7l+NK8=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=iCwtZUtoyjv+zX5goHCj2CEvJjs6KYLhagxGRbr7B85L/+4NOVcH1zpOAS+LMsoXZStCCJCC9oN16vj0ABdVjrkIZfb0Pl2dSh2lF5JPK8FYheySy3Eig/1NYvk1gHY7oBGuy/j3bdq8Aq7Dsiz5UD533ihAzY9cSkvDqkn4R4s= 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 6E07D339; Thu, 30 May 2024 08:49:44 -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 4F5EB3F792; Thu, 30 May 2024 08:49:19 -0700 (PDT) Message-ID: <32921840-43d6-4ad9-99eb-aac32e67e04c@arm.com> Date: Thu, 30 May 2024 16:49:17 +0100 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: device_def_domain_type documentation header does not match implementation To: Diederik de Haas , David Woodhouse , Lu Baolu , Joerg Roedel , Will Deacon Cc: iommu@lists.linux.dev, linux-kernel@vger.kernel.org References: <14311965.TaHA55BQu8@bagend> From: Robin Murphy Content-Language: en-GB In-Reply-To: <14311965.TaHA55BQu8@bagend> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 30/05/2024 2:57 pm, Diederik de Haas wrote: > Hi, > > While looking into ``drivers/iommu/intel/iommu.c::device_def_domain_type`` > function I noticed a discrepancy between the documentation header and the > implementation. > > ``@startup: true if this is during early boot`` > 0e31a7266508 ("iommu/vt-d: Remove startup parameter from > device_def_domain_type()") > removed the ``startup`` function parameter > > returns ``IOMMU_DOMAIN_DMA: device requires a dynamic mapping domain`` > 28b41e2c6aeb ("iommu: Move def_domain type check for untrusted device into > core") > moved the possible return of ``IOMMU_DOMAIN_DMA`` to ``drivers/iommu/iommu.c`` > > But neither updated the documentation header. TBH it could probably just be deleted now, since the iommu_ops::def_domain_type callback is properly documented in iommu.h, so individual implementations shouldn't need to repeat that. It's also never been actual kerneldoc either, since it's a regular "/*" comment. Feel free to send a patch :) Thanks, Robin.