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=-7.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 83B87C43461 for ; Fri, 11 Sep 2020 11:27:30 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.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 99DE7221EB for ; Fri, 11 Sep 2020 11:27:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 99DE7221EB Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arm.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 130AE8783B; Fri, 11 Sep 2020 11:27:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 0SJXf+7eRv6S; Fri, 11 Sep 2020 11:27:27 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id ACC2387838; Fri, 11 Sep 2020 11:27:27 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8F59AC0859; Fri, 11 Sep 2020 11:27:27 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5FB77C0051 for ; Fri, 11 Sep 2020 11:27:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 4E9618783A for ; Fri, 11 Sep 2020 11:27:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m45U316OdKva for ; Fri, 11 Sep 2020 11:27:25 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by hemlock.osuosl.org (Postfix) with ESMTP id 8F5AD87838 for ; Fri, 11 Sep 2020 11:27:25 +0000 (UTC) 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 ECC2F113E; Fri, 11 Sep 2020 04:27:24 -0700 (PDT) Received: from [10.57.40.122] (unknown [10.57.40.122]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 59C303F68F; Fri, 11 Sep 2020 04:27:22 -0700 (PDT) Subject: Re: [PATCH 2/3] ARM/keystone: move the DMA offset handling under ifdef CONFIG_ARM_LPAE To: Russell King - ARM Linux admin , Christoph Hellwig References: <20200910054038.324517-1-hch@lst.de> <20200910054038.324517-3-hch@lst.de> <20200911111551.GG1551@shell.armlinux.org.uk> From: Robin Murphy Message-ID: <211af505-04fa-9cff-3178-1c8c24548485@arm.com> Date: Fri, 11 Sep 2020 12:27:21 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200911111551.GG1551@shell.armlinux.org.uk> Content-Language: en-GB Cc: devicetree@vger.kernel.org, Florian Fainelli , linux-sh@vger.kernel.org, linux-pci@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org, iommu@lists.linux-foundation.org, Rob Herring , Jim Quinlan , Santosh Shilimkar , Nathan Chancellor , Frank Rowand , linux-arm-kernel@lists.infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On 2020-09-11 12:15, Russell King - ARM Linux admin wrote: > On Thu, Sep 10, 2020 at 07:40:37AM +0200, Christoph Hellwig wrote: >> The DMA offset notifier can only be used if PHYS_OFFSET is at least >> KEYSTONE_HIGH_PHYS_START, which can't be represented by a 32-bit >> phys_addr_t. Currently the code compiles fine despite that, a pending >> change to the DMA offset handling would create a compiler warning for >> this case. Add an ifdef to not compile the code except for LPAE >> configs. > > However, to have use of the high physical offset, LPAE needs to be > enabled, which ensures that phys_addr_t is 64-bit. > > I believe that DMA is non-coherent on this platform unless the high > physical address is used. Or something like that. Yeah, it's probably not a configuration that anyone would actually want to use in anger on Keystone itself, but as long as folks might have ARCH_KEYSTONE selected in their non-LPAE multiplatform config we should avoid build regressions. I did wonder if Keystone should simply have a hard dependency on LPAE, but there does appear to be some explicit support for running directly from the non-coherent low 2G alias :/ Robin. _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu