Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp1535480pxb; Thu, 4 Feb 2021 16:03:13 -0800 (PST) X-Google-Smtp-Source: ABdhPJwuO/ZdzV5V1WIAcIeDp3GJ5q9iYxtARbyclOCE9uxU2RtBK3WWk5KYEHX2U+ZhMMDW94gx X-Received: by 2002:aa7:d98f:: with SMTP id u15mr997435eds.267.1612483393213; Thu, 04 Feb 2021 16:03:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612483393; cv=none; d=google.com; s=arc-20160816; b=f+w9p12oHGCVQ/AgUGm4OzA1QBIjF3kC6vcqGj8fpxaysM58FyCyH9fLaRakyRgqcd BntN4mFddKT/Zfcuo+0Ijx7bH3va1zwjJi9AjWkUH5V3SwCVcz4gV0NBQKRljsklpOnx FySfmDQo71Ce7Db46CgGkK04QIRgJmep6XcDZNxTxl3FrNacWFIOa8j5nsl9atgeQR6/ NyDilrltVW/PTVxhJnv41ffQaWS4l6WOmnnTUiTX3hVIqC4KBEikoDJooMBcuFepRhIr 690BIByGlQkvPnj9AITUDXibcOaUowUC6i7Tk+TANfx5jUI4R4+C+zv6ZVUoKRPnHynq yhYg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=rqe/WVslQl+LCFFvX85GG6rZXyEMgej1QuXU2bRRGY0=; b=lvK4kfh/IGGDqD6HH4145tCda4asX1+SdPbcSErRfOBvPAmxDnNEvrJS4Ijq4Lo9oL vAh3hYia4HztEpTZNNkH3S0LD5e55l1XSNlvru/Iv7GvuQ87e92kLpGevah0ooyQyDDX Xbj5DedoIwQ5BTEj5DMyJae7rKufipgJ9lkVPEB6a/s4rh79aevMRz9BzNfcP0ptFQtf HDRwsML7QIEkOn7Sei5jOxxK6Y3dJSuGrHMLov4wYK+mHVx/r8pcsOThJk73AxTEwSOj qUR0B+UQ05ENoGwiDq6m5lRpBq4DdY3CL9FvRqKntmlJhEnsfWS3u+9xBNA2RReyXVpK 7rEg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g13si4032834eds.52.2021.02.04.16.02.48; Thu, 04 Feb 2021 16:03:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235736AbhBDLuU (ORCPT + 99 others); Thu, 4 Feb 2021 06:50:20 -0500 Received: from foss.arm.com ([217.140.110.172]:56926 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235683AbhBDLuS (ORCPT ); Thu, 4 Feb 2021 06:50:18 -0500 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 E69ABD6E; Thu, 4 Feb 2021 03:49:31 -0800 (PST) Received: from [10.57.49.26] (unknown [10.57.49.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 6C76A3F73B; Thu, 4 Feb 2021 03:49:25 -0800 (PST) Subject: Re: [PATCH RFC v1 2/6] swiotlb: convert variables to arrays To: Christoph Hellwig , Dongli Zhang Cc: dri-devel@lists.freedesktop.org, intel-gfx@lists.freedesktop.org, iommu@lists.linux-foundation.org, linux-mips@vger.kernel.org, linux-mmc@vger.kernel.org, linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, nouveau@lists.freedesktop.org, x86@kernel.org, xen-devel@lists.xenproject.org, linux-kernel@vger.kernel.org, adrian.hunter@intel.com, akpm@linux-foundation.org, benh@kernel.crashing.org, bskeggs@redhat.com, bhelgaas@google.com, bp@alien8.de, boris.ostrovsky@oracle.com, chris@chris-wilson.co.uk, daniel@ffwll.ch, airlied@linux.ie, hpa@zytor.com, mingo@kernel.org, mingo@redhat.com, jani.nikula@linux.intel.com, joonas.lahtinen@linux.intel.com, jgross@suse.com, konrad.wilk@oracle.com, m.szyprowski@samsung.com, matthew.auld@intel.com, mpe@ellerman.id.au, rppt@kernel.org, paulus@samba.org, peterz@infradead.org, rodrigo.vivi@intel.com, sstabellini@kernel.org, bauerman@linux.ibm.com, tsbogend@alpha.franken.de, tglx@linutronix.de, ulf.hansson@linaro.org, joe.jin@oracle.com, thomas.lendacky@amd.com, Claire Chang References: <20210203233709.19819-1-dongli.zhang@oracle.com> <20210203233709.19819-3-dongli.zhang@oracle.com> <20210204072947.GA29812@lst.de> From: Robin Murphy Message-ID: Date: Thu, 4 Feb 2021 11:49:23 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.7.0 MIME-Version: 1.0 In-Reply-To: <20210204072947.GA29812@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2021-02-04 07:29, Christoph Hellwig wrote: > On Wed, Feb 03, 2021 at 03:37:05PM -0800, Dongli Zhang wrote: >> This patch converts several swiotlb related variables to arrays, in >> order to maintain stat/status for different swiotlb buffers. Here are >> variables involved: >> >> - io_tlb_start and io_tlb_end >> - io_tlb_nslabs and io_tlb_used >> - io_tlb_list >> - io_tlb_index >> - max_segment >> - io_tlb_orig_addr >> - no_iotlb_memory >> >> There is no functional change and this is to prepare to enable 64-bit >> swiotlb. > > Claire Chang (on Cc) already posted a patch like this a month ago, > which looks much better because it actually uses a struct instead > of all the random variables. Indeed, I skimmed the cover letter and immediately thought that this whole thing is just the restricted DMA pool concept[1] again, only from a slightly different angle. Robin. [1] https://lore.kernel.org/linux-iommu/20210106034124.30560-1-tientzu@chromium.org/