Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp157981lqh; Thu, 30 May 2024 18:19:25 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWLlpj+0vIYslvzPGGMHAaPyX7VS3jsdLt3defdI16hl5In9gQZ8GAVGZ5wyNW2WfmIpHmQPHW3wOSFhXBYWVeZz9wGdhrMXj0NwFEwAA== X-Google-Smtp-Source: AGHT+IGM1GNKkcqhI9pDlmXUBkL+BYLWJDC1ehO0x+ED5N6Aq04nScWaNu/4mOmm8NuAs5ixwwrQ X-Received: by 2002:a17:906:f1d4:b0:a59:aa68:99a0 with SMTP id a640c23a62f3a-a6820136bf9mr24589866b.18.1717118365495; Thu, 30 May 2024 18:19:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717118365; cv=pass; d=google.com; s=arc-20160816; b=bVTNH/+fkz/kRUALDo5hHtb2MI6SIEVbkyWn2e93zvZDKizf7D5GV9M9I5mBsuGNsh nP3CRAULM11DXtHIdRY+GFKpJqytTyYUtccBtOhavh5vnyOOKu9euf/150jpjZH77OPB leaB3oAluh/j7+TaeetbIX7MHHPDbFcDfrnczZj1I3m5645Di24v5vtBZbeWdu4y62o9 67aM1d8bqAJ8TEJoTYM1vvxmyc62aswO9yikVPKlxPZI3fvr/VJbO66j4F6FS6QDqQ2v Wh2kmOZ5UOYjhwlgfsgkiVJRdoqO/27JDj25kfClw7/O24+kiYpNyZugEL/AXlPOnQCW lgog== 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=GUIjhA5nt4D8nBM23HdI8JzWcNw7bBei0z8IQaxuaHY=; fh=FMj7OYYgVfLBtL0nF6CAPNVKX0g+Qp96aW0wB0SH3V8=; b=GmKCTrnLZHWYNOysyBQfkjCiK+Okv44iMVrWjJDSf6wgyFQg3746C1loVp3TQNydwt S6IEMfhvqoD0HQu1SiWqWnBOkOUpOFL95iFk0id5UmEMVsIoofC1zbgqNK8MCysfR1YM w4WctsVrSEcGC+uZ4ezVZXr/j7V27ACn7fChiyuwIWvniP0j9/0H/rKKqUOsEXUkEEog mE/8UIOHyXp4OMSiHWTn9XbOamWs9y2F6/mkJROsmgupNrE3Fs9enSElPwWZJ9IlHfpz /57skCFHlc30V3hhxloX0RnhCoAvQiESJnp9XNCTycfzMmJo0XX1fwCo0fVHyah3L3RI zOAw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OhwSnPGD; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-196128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196128-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a640c23a62f3a-a68131ccb1dsi24352266b.950.2024.05.30.18.19.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 May 2024 18:19:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-196128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=OhwSnPGD; arc=pass (i=1 dkim=pass dkdomain=intel.com dmarc=pass fromdomain=linux.intel.com); spf=pass (google.com: domain of linux-kernel+bounces-196128-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-196128-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 am.mirrors.kernel.org (Postfix) with ESMTPS id 2FC7C1F24341 for ; Fri, 31 May 2024 01:19:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 48FB57489; Fri, 31 May 2024 01:19:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="OhwSnPGD" Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) (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 34417613D for ; Fri, 31 May 2024 01:19:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.17 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717118356; cv=none; b=ZibBq7xyEzuYqO71Csf1YiMZA3+ugEy4lCjc0sIulgO0w7BOTIU6ASRxbPtQMWE+CX1S2dlBmj/We16oZJius/KA2+kN46/cnO2rfqT3GebLdvgLC1VKaF7sReRODjyY8FEL2VY7d6Tao1AT+OlmdfcCMb8yktmqsH6U1OaM+II= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717118356; c=relaxed/simple; bh=LFRDMDUTn01WZjrLsF2FrdVRP8HD0U8X+Q6SBR2aAQ0=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=HhSAI+HFSBVa58sScJUzf8TiRhuaCSnmNUmRRSqmovwDcga4KZQJb6diB+hA8mJ3n0owdS8goxPtmWfqATCQjDyiKePvVFDpbBLbBaq6pVfbkYGRDvMCX/+WCI0q343qeIKfNSIb+ElTzCfeIGIE4rMsLq8n5fPeeZCgzx3oOOI= 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=OhwSnPGD; arc=none smtp.client-ip=198.175.65.17 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=1717118356; x=1748654356; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=LFRDMDUTn01WZjrLsF2FrdVRP8HD0U8X+Q6SBR2aAQ0=; b=OhwSnPGDvOImctGtHWGxg1cFV+Pav3YjXmwFmMkshTlfC/NGwr34NLpj PjGgcNIMo1mN+8jB6TjDTeKbIfrkpWWpuInhWe9esDp1EEHHZlTdXkdld hmDuXGcNjcOMOiZr4NQjjrg1dUToNJl5C684uR8ctIDCVwEVsk3tEtCO4 oQOTeXUFMAvBF6Ljw45WhhBOoovHydncxFcMkj4i6yP646kF2djYTeoHV eGdiEHulYk71+Vpp30Kglh77nmg0jIvlHgIl/+Q9fFDhCXyAitGQpydfV X8FmONohW6LbCNx+cIzHbWqYdaXS4JpqQp0/j3lRADQYh+rJd3uCam0++ g==; X-CSE-ConnectionGUID: r7GCS1WNSIyq9jEgjdgyHQ== X-CSE-MsgGUID: svBJEapZSI6r0vIV17zceg== X-IronPort-AV: E=McAfee;i="6600,9927,11088"; a="13771006" X-IronPort-AV: E=Sophos;i="6.08,202,1712646000"; d="scan'208";a="13771006" Received: from fmviesa004.fm.intel.com ([10.60.135.144]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2024 18:19:15 -0700 X-CSE-ConnectionGUID: AcSUE+0cROSDB+Rbre3XqQ== X-CSE-MsgGUID: oQQ1JPt2RCKqgao01z8BHA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.08,202,1712646000"; d="scan'208";a="40571285" Received: from unknown (HELO [10.239.159.127]) ([10.239.159.127]) by fmviesa004.fm.intel.com with ESMTP; 30 May 2024 18:19:13 -0700 Message-ID: Date: Fri, 31 May 2024 09:17:05 +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, Robin Murphy , iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: Re: device_def_domain_type documentation header does not match implementation To: Diederik de Haas , David Woodhouse , Joerg Roedel , Will Deacon References: <14311965.TaHA55BQu8@bagend> Content-Language: en-US From: Baolu Lu In-Reply-To: <14311965.TaHA55BQu8@bagend> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/30/24 9:57 PM, Diederik de Haas wrote: > 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. Yeah, I think the @startup line should be removed. It is irrelevant. Others remain good to me. Best regards, baolu