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=-5.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham 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 DDEC1C10F13 for ; Thu, 11 Apr 2019 13:16:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 AF9E52077C for ; Thu, 11 Apr 2019 13:16:05 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="lRVoL/UN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AF9E52077C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=8bytes.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-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=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject: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=t31nXOEyoFx1IK5cr177TRSo1Gs6ed04KiAIVA38azI=; b=lRVoL/UNwg1ysA 1eFjiA14zi4ai5O/Xxw7siRePkI8ilgiQfKUBJysEEspBEC5OP2AlclLI4alRXsfOG8I0qkIDcssf xcnG7wtlzNndKmlbL55rIJRd4N/NrSiUp+O8iHXpQ6iQ/ut1w55ijk/iPtNXzA4veQ2QmgS9jz0xe v2tiwFNOLm/aqKwqZZx5FUSxBt6qZrbUEO04tEpZdzjAPHEtW0cYB9lFxo23SX90F/SRGjp5HQRgf aq7cbzV73ZnvIn0E9H0cNO55NsLZSeuKQZ7WFGKRfnVC9Y8O6IH0DePzr4bEl42xdP/Wv+mueVqXa vpPAt+ldknfgEnbh9s/g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEZYi-0000Eb-PN; Thu, 11 Apr 2019 13:16:04 +0000 Received: from 8bytes.org ([2a01:238:4383:600:38bc:a715:4b6d:a889] helo=theia.8bytes.org) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hEZYb-0008Hh-8A for linux-arm-kernel@lists.infradead.org; Thu, 11 Apr 2019 13:15:59 +0000 Received: by theia.8bytes.org (Postfix, from userid 1000) id B1A6E42D; Thu, 11 Apr 2019 15:15:51 +0200 (CEST) Date: Thu, 11 Apr 2019 15:15:49 +0200 From: Joerg Roedel To: Robin Murphy Subject: Re: [PATCH v3 1/3] iommu: io-pgtable: Add ARM Mali midgard MMU page table format Message-ID: <20190411131549.GB4518@8bytes.org> References: <20190401074730.12241-1-robh@kernel.org> <20190401074730.12241-2-robh@kernel.org> <8d091874-11b0-e348-c4f1-dd1bcfa4bf97@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <8d091874-11b0-e348-c4f1-dd1bcfa4bf97@arm.com> 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-20190411_061557_490803_3B59E2DF X-CRM114-Status: GOOD ( 13.14 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rob Herring , Lyude Paul , Eric Anholt , Maxime Ripard , Maarten Lankhorst , Neil Armstrong , Will Deacon , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, David Airlie , iommu@lists.linux-foundation.org, Alyssa Rosenzweig , Daniel Vetter , Sean Paul , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Apr 01, 2019 at 08:11:00PM +0100, Robin Murphy wrote: > With the diff below squashed in to address my outstanding style nits, > > Acked-by: Robin Murphy > > I don't foresee any conflicting io-pgtable changes to prevent this going via > DRM, but I'll leave the final say up to Joerg. No objection from my side with merging this via DRM. With Robin's concerns addressed: Acked-by: Joerg Roedel > > Thanks, > Robin. > > ----->8----- > diff --git a/drivers/iommu/io-pgtable-arm.c b/drivers/iommu/io-pgtable-arm.c > index 98551d0cff59..55ed039da166 100644 > --- a/drivers/iommu/io-pgtable-arm.c > +++ b/drivers/iommu/io-pgtable-arm.c > @@ -197,12 +197,13 @@ struct arm_lpae_io_pgtable { > > typedef u64 arm_lpae_iopte; > > -static inline bool iopte_leaf(arm_lpae_iopte pte, int l, enum > io_pgtable_fmt fmt) > +static inline bool iopte_leaf(arm_lpae_iopte pte, int lvl, > + enum io_pgtable_fmt fmt) > { > - if ((l == (ARM_LPAE_MAX_LEVELS - 1)) && (fmt != ARM_MALI_LPAE)) > - return iopte_type(pte,l) == ARM_LPAE_PTE_TYPE_PAGE; > + if (lvl == (ARM_LPAE_MAX_LEVELS - 1) && fmt != ARM_MALI_LPAE) > + return iopte_type(pte, lvl) == ARM_LPAE_PTE_TYPE_PAGE; > > - return iopte_type(pte,l) == ARM_LPAE_PTE_TYPE_BLOCK; > + return iopte_type(pte, lvl) == ARM_LPAE_PTE_TYPE_BLOCK; > } > > static arm_lpae_iopte paddr_to_iopte(phys_addr_t paddr, > @@ -310,13 +311,10 @@ static void __arm_lpae_init_pte(struct > arm_lpae_io_pgtable *data, > if (data->iop.cfg.quirks & IO_PGTABLE_QUIRK_ARM_NS) > pte |= ARM_LPAE_PTE_NS; > > - if (lvl == ARM_LPAE_MAX_LEVELS - 1) { > - if (data->iop.fmt == ARM_MALI_LPAE) > - pte |= ARM_LPAE_PTE_TYPE_BLOCK; > - else > - pte |= ARM_LPAE_PTE_TYPE_PAGE; > - } else > + if (data->iop.fmt != ARM_MALI_LPAE && lvl != ARM_LPAE_MAX_LEVELS - 1) > pte |= ARM_LPAE_PTE_TYPE_BLOCK; > + else > + pte |= ARM_LPAE_PTE_TYPE_PAGE; > > if (data->iop.fmt != ARM_MALI_LPAE) > pte |= ARM_LPAE_PTE_AF; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel