Received: by 2002:ab2:6203:0:b0:1f5:f2ab:c469 with SMTP id o3csp69608lqt; Thu, 18 Apr 2024 08:40:04 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXJ8NNhrqtbaXIzZZGxGsAco62EIipJcSSxn5e2xjlEAHTSeeZ7FoPIytCMcYC6xAq93yvU7v2kSM79/V+wk7AB8ZrIZctU+IoqC0K34w== X-Google-Smtp-Source: AGHT+IHvDTfBKOjzfUqSNFp4ZC/LFiKcyagOcL6lVZ+M08w2oREoH3A1CJEoixbBuOot7qipiaJo X-Received: by 2002:a05:6a21:168e:b0:1a3:64e8:eb8f with SMTP id np14-20020a056a21168e00b001a364e8eb8fmr3908596pzb.11.1713454804373; Thu, 18 Apr 2024 08:40:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713454804; cv=pass; d=google.com; s=arc-20160816; b=jjCiWp7iEn93IWB851fS96nqxSZ9PeDMHiGNS3oN8vmI/lFZOtrb61koLhaI8xCqUL 1giHGPldg2eoo4WiqiP596uP37hGcMs0ikIo3D6JhGdqqYlPHCR6bAySUFSJymffvrFT zJNuz4qRzsvi/62yRKzEaJsD3BkObWkBNzJxH7ZePcVX+UeksJGXu7oOjdubSP1UUeX7 RhNOjcmgzmmuYUJoZjP03gFUg9RV1kxbZc3CYtPjPw/a29Ufa3M/OM9lcRKQxoYq5Pm0 YiHAd+Vue6+qGegRdIzqY0eIFJnU0i3qD8ekJ7rNms+n1qGYE2E0lqALcv8HH/mBp5hA qx6w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=KiB0o+jVhF1CLQhKFyf/81T8bBmdPfULP1ceIgm0uGE=; fh=A1hmsaV5gO9SiJogAv7JGGpemFGTUXTJQrHhK5F3hCA=; b=MP+NhtRbKzk7ZDgLxNVxLJPQetkOXHr9TZwokVp4ir4Z5ZmJNukSW/OTI6uE0R8n6Q 0Nc0LtCz+wmJ96aL4Z2Ftavak04LD8+oowz0PN2odgZZwYN9y8yHrIt2U1xUwJbsWMjx I3DNUfTITHVtxAcXvFOXWCNp1G+Hj/+jyLL+kvwLUeVBEX4vGS0v/1rZtJQx3ZBweZnV KradkpUsJ8P9+DI6A8XYU7E909QbERSgCE7J7HHFTQbL80QUBl/OL5AKmQXj5XNnfABc /TLhgc+8tq67oA4fmw3/jrBvFXJ3ZcoOPPlSIgwJ5iNdrTJEnpfDuUw6GsLhMIvIeuOt WvZA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ewajqedC; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-150310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150310-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id s29-20020a63ff5d000000b005dc50694bb3si1579424pgk.718.2024.04.18.08.40.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Apr 2024 08:40:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-150310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=ewajqedC; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-150310-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-150310-linux.lists.archive=gmail.com@vger.kernel.org" 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 89446B24FC7 for ; Thu, 18 Apr 2024 14:31:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2C091168B05; Thu, 18 Apr 2024 14:28:55 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="ewajqedC" Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (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 9BA331411E4; Thu, 18 Apr 2024 14:28:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713450534; cv=none; b=aughiVwx1mu72oPn4tLiYLxMZ0+a9bdNfIgKdW7jwsVIfBNlc3VN+VFSV0oiBItaxM8jIS8o48pXE4YNLFDOJCU++U9fIkRpbgyA+6VuxwqwcRdHvajVozfYjPfjmqV9mD2aE43gLwFz9+jzrD0R60+Wnu3IlSFUtNpMgAKC5+M= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713450534; c=relaxed/simple; bh=g9aW0yKi9LhdVrspFApEnJlHcPlnA4Sbkv91eE43FPA=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=dhcXiaNPGs2QcK45mgJc6571woVjFh+c6NKrQ2rPm08dJFq1HIJhRKumsvXC+ow8Cq6SFN+c4UalNpPhGW/UkERuzxIsYAq9JoyrYI1JDrKILC1K/LJpBQwNhJZ/SqCrJJiTdKpKI0Avq7toJC0ytCp9VF16Wv9oWYcPHp/WRnE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=ewajqedC; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=KiB0o+jVhF1CLQhKFyf/81T8bBmdPfULP1ceIgm0uGE=; b=ewajqedCwqccTk//ZCZ6mL8nMd Ypd11wlsChKGQ6szQ8gHTJ0hi6c4n6JPgyP9F/b35SQaHEyfMw/dc5NfXBAhHQ1YsEwKgWfbvG4sa lL7etxyLAcdBPK1A+0mxS+ofBQWL/UrfOfwPcFREmtBtGlrTLHfdRSwIL+jT1bEaFhEi3jWRKnSwy LIKFW2BO28AXFiStWq8EGEv5PewRFbdE+HfWYfI3XPy/yrA0eyZE64eiX1ex/JjtQeyI6an3FeMlo Q+9JoqvmHYO0dxEw3c4Oqnp9SfQzRpiwpT5Gfk/a7/W17VP2XUjjgTq9kWBmDHpA2KBK+nYSu1pfM vKbjMW+g==; Received: from willy by casper.infradead.org with local (Exim 4.97.1 #2 (Red Hat Linux)) id 1rxSki-00000005W7K-0uVU; Thu, 18 Apr 2024 14:28:40 +0000 Date: Thu, 18 Apr 2024 15:28:40 +0100 From: Matthew Wilcox To: mhklinux@outlook.com Cc: robin.murphy@arm.com, joro@8bytes.org, will@kernel.org, hch@lst.de, m.szyprowski@samsung.com, corbet@lwn.net, iommu@lists.linux.dev, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, petr@tesarici.cz, roberto.sassu@huaweicloud.com Subject: Re: [PATCH 1/1] Documentation/core-api: Add swiotlb documentation Message-ID: References: <20240418135213.426671-1-mhklinux@outlook.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240418135213.426671-1-mhklinux@outlook.com> On Thu, Apr 18, 2024 at 06:52:13AM -0700, mhkelley58@gmail.com wrote: > There's currently no documentation for the swiotlb. Add documentation > describing usage scenarios, the key APIs, and implementation details. > Group the new documentation with other DMA-related documentation. This is really well written. Thank you. One minor nit below. > +Usage Scenarios > +--------------- > +The swiotlb was originally created to handle DMA for devices > +with addressing limitations. As physical memory sizes grew > +beyond 4 Gbytes, some devices could only provide 32-bit DMA > +addresses. By allocating bounce buffer memory below the 4 Gbyte I'd prefer GiB to Gbytes; we might also prefer GB, Gigabyte or Gibibyte, but Gbytes seems wrong. You've written a lot here, and I'm not an expert on swiommu, but nothing else leapt out at me.