From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB2A1C433C1 for ; Tue, 30 Mar 2021 12:24:26 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5B75E6190A for ; Tue, 30 Mar 2021 12:24:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5B75E6190A Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=pr3LbNKabfXP5unlQizGkG8lP4IUQzzeLsZYSssJMbg=; b=kotndK/z1DNr41EySs/4k568E U1vL53cLCSE3zeZd3MGF5gAxSbGBboxaUCRcQ6myRQUGLyvIIXrgXL5jXC6Sb317My39UYb8MFs/0 L5z04gnj7npNt0MHS1F+xEsnWaoddU/uOzXtJuaaQeovZWOhRTnwnCQxa/4PO8YC5LE+PWr6g3IYO ploYL1tEYi0GgLjOxHvgkYZ03Hx0YUaJt9YM/qmLZhap4I6k8J96gR0ErxtvpsL1i9tsJ7WIhnO+O YLWBLYHd6/sOQD7eq5XJdcVbrXVywz6c7wfR84NotvCk5yFAYeSQKwNWG3k9ha6Hkj+tdSXtmjGTE Dika6TLFg==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lRDOR-003h8p-SX; Tue, 30 Mar 2021 12:22:48 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lRDOM-003h7S-4m for linux-arm-kernel@lists.infradead.org; Tue, 30 Mar 2021 12:22:44 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 007BD619B4; Tue, 30 Mar 2021 12:22:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1617106960; bh=/aM64zjLfZ9icJTYRZuJLiDfQTnTZcq/QS8CixcectI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WK5wU8QzM2RAlf0A2tPmCsCSrZ6xX/6kymJwUDezvxGq+zEpbtRiqJE6Tk7/uqfXS ZWuDra3MPyeLzukYzhLpHEZ3cyApoLPN1Alj/vVZbTad1wWRWYgHApBLjKb+OSQQ0b khQj7nJ4uP5lzLP8zR1ohRZgZhkeZk+WPpSV+7k/5QZjHX0PjUYGMkFTEn/AilCqDm 1+QXeCSskrL3TI3hIq3qv28Ukt2hJG6SDrmUXCr60YaJvYVyhLEqb4KEM4eG9XEBlX 4YOreXixQ5uL+t7JzueqrMXfoiokiQNL24aC6BcZ2UBMoW/bDqocR+rtAu2Jrsoavg 9z/uGdduijzXQ== Date: Tue, 30 Mar 2021 13:22:34 +0100 From: Will Deacon To: Christoph Hellwig Cc: Joerg Roedel , Li Yang , Michael Ellerman , David Woodhouse , Lu Baolu , linuxppc-dev@lists.ozlabs.org, linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, iommu@lists.linux-foundation.org, linux-arm-kernel@lists.infradead.org, kvm@vger.kernel.org, virtualization@lists.linux-foundation.org, netdev@vger.kernel.org Subject: Re: [PATCH 05/18] iommu/fsl_pamu: remove support for multiple windows Message-ID: <20210330122234.GE5908@willie-the-truck> References: <20210316153825.135976-1-hch@lst.de> <20210316153825.135976-6-hch@lst.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210316153825.135976-6-hch@lst.de> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210330_132243_116833_1630C027 X-CRM114-Status: GOOD ( 25.12 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Mar 16, 2021 at 04:38:11PM +0100, Christoph Hellwig wrote: > The only domains allocated forces use of a single window. Remove all > the code related to multiple window support, as well as the need for > qman_portal to force a single window. > > Remove the now unused DOMAIN_ATTR_WINDOWS iommu_attr. > > Signed-off-by: Christoph Hellwig > Acked-by: Li Yang > --- > drivers/iommu/fsl_pamu.c | 264 +------------------------- > drivers/iommu/fsl_pamu.h | 10 +- > drivers/iommu/fsl_pamu_domain.c | 275 +++++----------------------- > drivers/iommu/fsl_pamu_domain.h | 12 +- > drivers/soc/fsl/qbman/qman_portal.c | 7 - > include/linux/iommu.h | 1 - > 6 files changed, 59 insertions(+), 510 deletions(-) [...] > + set_bf(ppaace->impl_attr, PAACE_IA_ATM, PAACE_ATM_WINDOW_XLATE); > + ppaace->twbah = rpn >> 20; > + set_bf(ppaace->win_bitfields, PAACE_WIN_TWBAL, rpn); > + set_bf(ppaace->addr_bitfields, PAACE_AF_AP, prot); > + set_bf(ppaace->impl_attr, PAACE_IA_WCE, 0); > + set_bf(ppaace->addr_bitfields, PPAACE_AF_MW, 0); > mb(); (I wonder what on Earth that mb() is doing...) > diff --git a/drivers/iommu/fsl_pamu_domain.h b/drivers/iommu/fsl_pamu_domain.h > index 53d359d66fe577..b9236fb5a8f82e 100644 > --- a/drivers/iommu/fsl_pamu_domain.h > +++ b/drivers/iommu/fsl_pamu_domain.h > @@ -17,23 +17,13 @@ struct dma_window { > }; > > struct fsl_dma_domain { > - /* > - * Number of windows assocaited with this domain. > - * During domain initialization, it is set to the > - * the maximum number of subwindows allowed for a LIODN. > - * Minimum value for this is 1 indicating a single PAMU > - * window, without any sub windows. Value can be set/ > - * queried by set_attr/get_attr API for DOMAIN_ATTR_WINDOWS. > - * Value can only be set once the geometry has been configured. > - */ > - u32 win_cnt; > /* > * win_arr contains information of the configured > * windows for a domain. This is allocated only > * when the number of windows for the domain are > * set. > */ The last part of this comment is now stale ^^ > - struct dma_window *win_arr; > + struct dma_window win_arr[1]; > /* list of devices associated with the domain */ > struct list_head devices; > /* dma_domain states: Acked-by: Will Deacon Will _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel