Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3504989pxb; Mon, 24 Jan 2022 10:58:21 -0800 (PST) X-Google-Smtp-Source: ABdhPJxMOjh2a3s/VkQBvQ8DqYcHXD+vqq05PJdi8wTaXZaWnmhTDjNl/dW2v6uD8ZzvdqynYIev X-Received: by 2002:a05:6a00:890:b0:4bd:347d:8aaf with SMTP id q16-20020a056a00089000b004bd347d8aafmr15283895pfj.61.1643050701248; Mon, 24 Jan 2022 10:58:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643050701; cv=none; d=google.com; s=arc-20160816; b=UaP76UbILqNZgg32iVFmKYNgpDICpF7g+w3gyBpKUck+LktKoHTva2SNoW5esTx6aB up1IAUE5rk/xIJnAlolnjzXTY22o5/TNOxpPRFV1+NvMZVhE6dyS+PfCxzbeOdu7rQIV o4UKVXqrTT8lOzra7Qha/jZAbMl1ZK/Xog6Z37N7Vbidc4MQRJxuzNgYj4wbizmFche0 NAAoZCmn3dh0Dcyf9Xa/YKAf6WMy7Dm6kELW0/ZhUGE6q5868DUHCOiVDanDNWaJPVMK SSONJSubrsszOfdABUC5DnVs+2Lw+XQc1A/DcxLJ2Ipf++MNbN9d9vRwRYdHrIu1aCew ORrw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=+Cbhoao8YGSMbLhLMvHmRWGSewCaoxDNcEjjCdUssKY=; b=uXZLZOUB6105PXh8g8wnu0JZ3j9uYcEEsUpJ3Y5KZABKUDDN+E1nDofE+Vm7/4i4P4 aC2lhPB1aU7ewGu75qmYo0r+PhjnwzCNUrPl5WyxsFBp+6bldWTy5My1gG0AYDSDnqhH g/yWSJ8JQqWq5+qMJ99N21wep6MVXlYHebvi0WOGhMqYfUipe6RxCc4Fj3aESLOK18aa S3E87WkaAdZBPOgIcnKghC8CG3EjL7GlzQ+k/MedxOyF1Eo0dFnI/+TkOdwNt4i5m7ej g2j0aDexNleV0hqvrrVk0v4ydVKudhwmnkEEtzGizCwwOStIx3+5a4yp5sUnEYu+VfWJ EYaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=G6sqF+8Q; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x6si14838249pgi.290.2022.01.24.10.58.09; Mon, 24 Jan 2022 10:58:21 -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; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=G6sqF+8Q; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233931AbiAXJaH (ORCPT + 99 others); Mon, 24 Jan 2022 04:30:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233809AbiAXJaF (ORCPT ); Mon, 24 Jan 2022 04:30:05 -0500 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91728C06173D for ; Mon, 24 Jan 2022 01:30:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; 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=+Cbhoao8YGSMbLhLMvHmRWGSewCaoxDNcEjjCdUssKY=; b=G6sqF+8Q7cLOd4wGmirGsKPswL BKg/uDXdGa8RZ7jTwvJQGtb8iZbh2HLDi1ClyvRjkik/iLL3N6JAgQjzmEaO+Yh/N4sfcg1BjnDW+ RARriawQ3akmmVWqwsSY/3T2waQE8FudFuiGrHIW29RUVY66Y+oWfDx9Yl5Mawrn/FuI8yj+/PpIu dEz1meLry+wtMTDeLqG+lW5wIWkD8WHEbOU9y1vYHfyFMQmTwuepUmQseiMWXnJwcyBHvvBIjtM+A 3SrECgTgN19wA0OlVKDbz4RmoZ7PjLEBBTHLZHZDLhEXZ8i08ZdJvedeS4fQG5qbQ6eCM6G0r9vGH Tvscrkpw==; Received: from hch by bombadil.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1nBvfh-002nXX-9U; Mon, 24 Jan 2022 09:29:57 +0000 Date: Mon, 24 Jan 2022 01:29:57 -0800 From: Christoph Hellwig To: Lu Baolu Cc: Joerg Roedel , Jason Gunthorpe , Christoph Hellwig , Ben Skeggs , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy , Alex Williamson , Eric Auger , Liu Yi L , Jacob jun Pan , David Airlie , Daniel Vetter , Thierry Reding , Jonathan Hunter , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 5/7] drm/nouveau/device: Get right pgsize_bitmap of iommu_domain Message-ID: References: <20220124071103.2097118-1-baolu.lu@linux.intel.com> <20220124071103.2097118-6-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220124071103.2097118-6-baolu.lu@linux.intel.com> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jan 24, 2022 at 03:11:00PM +0800, Lu Baolu wrote: > The supported page sizes of an iommu_domain are saved in the pgsize_bitmap > field. Retrieve the value from the right place. > > Signed-off-by: Lu Baolu > Reviewed-by: Robin Murphy > Link: https://lore.kernel.org/r/20211218074546.1772553-1-baolu.lu@linux.intel.com Looks good: Reviewed-by: Christoph Hellwig Wouldn't it mke sense to remove the pgsize_bitmap in struct iommu_ops and initialize the domain field in the domain_alloc methods? Or am I missing something?