Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp158864lqh; Thu, 30 May 2024 18:22:01 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU4VYes0LU4udfCTjZ2A+BV4wC/7PDiAQUcOsZod/16JpS/gV6AlvRYN31QOI0r1kEE0I825JIho48r6r+DSTvTXmF7Qw+pVonRYtOZMQ== X-Google-Smtp-Source: AGHT+IHZbZizNNBjB4L9HWSvMk7bLwh5EyGElI3vNMid5eIF1S5wuQKSdmHmuZW3Bm+D3jEwbTdF X-Received: by 2002:ac8:5d88:0:b0:43d:d78e:68f4 with SMTP id d75a77b69052e-43ff5500b4dmr4228221cf.64.1717118521285; Thu, 30 May 2024 18:22:01 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717118521; cv=pass; d=google.com; s=arc-20160816; b=V/PonggKStgXxK03s5/El5YIYCzrxUFyCwCsVObXYvutNiwAV/g/pHoQAMpKnIXJkA Ui4LhG1zZbbjP/vb2muDeKLsRqj/3RwqTjelyjid3Bzz/ntDHDbaGt2K14hF/GrHj3BR TbyKAfD7/Onlb5cO29tgBUoULGmyf3yTbg6jJL3muNxRfYa8ZLlYHWI6hpYqKBo9vFsP dvotWhqKSSFOuqGgA/woIeqrnXVtIE7rlPT99mCjVhCze6ncY64dy5SHCTJhshhgzUDu GHuVXaPTbYGsTS2yMF8my3IrD9h/3dXdQ1k4qtrBEDiUcpRCLWCSQJXSxtvKUOo1BbYf 2KgQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:cc:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=KDEss6+df5zSq8tfm6+WoGr4qR8Dvgz0z5EBXim5pgc=; fh=FB56DyTgjnP+MsvJ+xHVk2McQNgfG/pPR9vidyqEih4=; b=uB29gUSPRHjrPuObgmcuKrnRSBozzBIe0riV3qvectMTPCmYz2jEO0yAJjybyvXbMk qjkuLK7HsoLmZWmqJSelvsPD8TMgN1IePDIhXKY6cTx2DIsaDXl3umJsDxGAD5CYMV8D vi38cftcvk0/zrwMTRzUqBA1233lLUPbAqLsR4dS7fLDGpT76c8BEDsup1pg7nfZvQAo 7ZhqPbuLtymQQvThym6wrD591d9F/GpM+YqL+ypoyXaLmvMzFHhOWFKf/4PDFZNNtnCe Rs4SHGiqY05kLxiAJ87PonzMr1To2I23kxBMHia6ZGOsx75GDku4w4qhAMzeLq0FRBzl Dpaw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cCRn7uNY; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-196131-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196131-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-43ff2467d46si9083341cf.338.2024.05.30.18.22.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 18:22:01 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196131-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=cCRn7uNY; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-196131-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196131-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 066031C23BAB for ; Fri, 31 May 2024 01:22:01 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6CE36846C; Fri, 31 May 2024 01:21:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="cCRn7uNY" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.9]) (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 4AD19134AB for ; Fri, 31 May 2024 01:21:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.9 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717118508; cv=none; b=MLhghcSF2+rAOCgmU93wpM2sUX9WWV4JGVFj7v06rYUNDbQsg89keKdbh9GC3gzrWwYduKMfL39zoql1SufIV9xb0IZDqGjNJjW+xXL2+KeDWal1bCJAV3cpj53mb+vP4GErkUQuTiqIeF1mpn0AaPO3mNMxIPS3jn9A/UhyQO4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717118508; c=relaxed/simple; bh=oduJrBgxC7GPahDyRFBPQ85EMmHXFVU+B7UUePfvsVo=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=lUvV466FpU7lZe69ugK2VUkdSfMtTuT0NZXhnb7QSPu2uCabWs+mym8gPrY+7E83D8a06cNvUaGnLXtcyrXG7FTpS2vpdlAqJHrg9kUaTQgEzbd6+zI3YHuAlTqwRLngkaTB7BBW39XgZhUYyW2yY0r0gckL4M4xqxcUyQyN/H0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=none smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=cCRn7uNY; arc=none smtp.client-ip=198.175.65.9 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=linux.intel.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1717118507; x=1748654507; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=oduJrBgxC7GPahDyRFBPQ85EMmHXFVU+B7UUePfvsVo=; b=cCRn7uNYwb++7opeutKEMEtve3gQ5saoOP3lC2d91ABFFa6pnae/XRFy mjHqSzwyGHeX4PYzjUxKsZjrjyCsobIjfdqIIYOpVwE1x/iMN9642erh/ cwY1RqB9pC27qdDWs8iCikeXkIFX71z0CJ4ym2xyzNrxgm1reSnr4QMBQ y0GnxIukSSAo+T1iBEG3CqmhIjc7GqQPxn6oky6IJfl2TtUSmlRL9YBvm WY+NXWEWMIKMHalBdGN5rDCTCXBqfGw6qq/MVfgyCZcL7v+vqXQcyc4zQ ugUF7kjuVf6r/TqHYnGBKnWor5cLSobQutZPjuhle8fy2I9E8UNNZMySg A==; X-CSE-ConnectionGUID: cZ1Ln5KETVORVK3ccuXuDw== X-CSE-MsgGUID: BVnrqKdCTiOXh/cYf0a67w== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="36180235" X-IronPort-AV: E=Sophos;i="6.08,202,1712646000"; d="scan'208";a="36180235" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by orvoesa101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 18:21:46 -0700 X-CSE-ConnectionGUID: knuVU2IfRFWTjds6ES9ncg== X-CSE-MsgGUID: KOMsvPMzTfe0JmIFF4SbHQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,202,1712646000"; d="scan'208";a="40921229" Received: from unknown (HELO [10.239.159.127]) ([10.239.159.127]) by orviesa003.jf.intel.com with ESMTP; 30 May 2024 18:21:45 -0700 Message-ID: <1333039e-ec61-467e-a0ee-d3cb86e769f5@linux.intel.com> Date: Fri, 31 May 2024 09:19:37 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: baolu.lu@linux.intel.com, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: device_def_domain_type documentation header does not match implementation To: Robin Murphy , Diederik de Haas , David Woodhouse , Joerg Roedel , Will Deacon References: <14311965.TaHA55BQu8@bagend> <32921840-43d6-4ad9-99eb-aac32e67e04c@arm.com> Content-Language: en-US From: Baolu Lu In-Reply-To: <32921840-43d6-4ad9-99eb-aac32e67e04c@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 5/30/24 11:49 PM, Robin Murphy wrote: > 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 ???? Agreed. I will make a patch to remove it later. Best regards, baolu