Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp198573pxk; Fri, 11 Sep 2020 04:34:02 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzwkHJFB5C0Ayy4J1VXLh3C/jUpxjFNNaBsdYS5axpEVW0bojMplHwm2etbiGv3s7YESaps X-Received: by 2002:a17:906:68cd:: with SMTP id y13mr1606419ejr.132.1599824041800; Fri, 11 Sep 2020 04:34:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599824041; cv=none; d=google.com; s=arc-20160816; b=0UG3hcSSenOhls8W4UpFy8VJB5RaQnNA0FsHOf5+ElEjnASSzKX4ZMmzWh7binTdoR sjGahkttgCjF77ahWfAcNTIZFmMrr+y15Nm9Ocv8Di8rH6OYfVHyG96WLy4gyRrj7Gyo vH8dNuE7VhnfdOxoo9oGBBg3RXAChdU8Av/XYLHwAqIE0NOjtLYKOu2hwJUVIloK793C 6Mc9j14jaLY/WN/IMbyfgXv/WumeW4FBCT3ZSnlhFN62SNG1rcNDFUTULTnMUfUKR7hj 6a9mG7qysGzsMpVsAouGCp9p/+/a23PGwvGhmDt4Rfb6tkwyNoWbirccvIynETHUWtp0 rLxA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=sJYzI3Lx4319UDPRUdFQu+Nr6dCioXZb2Ck/KBdeFTk=; b=ntBalq8ZNAOU16ajfoOe+9tNfQEWKjKdZ9lnr7HmzYoek8YnVUYKfXiK6/nk9QeXGO xDDrTy7AxaRy5A/EotbOIrNlsviJBewLFgjX6WlYmmcR9KxZodJ9ua4gdHqMAIM5lt+l +L6H42XAiwABnTsdazQHRSIoGgLCf2V1UeoEv/7VXQ3CAJWD80GKHxN3UOqNJo9acULm c2zPC5kPCsyzz+XW+OdJor8jORUYIl39w2P40sOP6zSzUm238fSvrkQfkTjQv1F8mQcE /NLxoq1YXu9PYhUrBYNLK7UnlF75OW9rPyzmhJG6HtOF2ARVjB5KxvjFrSfGIVHuYPV3 Rc0g== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id ay1si1067004edb.440.2020.09.11.04.33.36; Fri, 11 Sep 2020 04:34:01 -0700 (PDT) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725783AbgIKLag (ORCPT + 99 others); Fri, 11 Sep 2020 07:30:36 -0400 Received: from foss.arm.com ([217.140.110.172]:60404 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725730AbgIKL2v (ORCPT ); Fri, 11 Sep 2020 07:28:51 -0400 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 Cc: iommu@lists.linux-foundation.org, Santosh Shilimkar , Jim Quinlan , Nathan Chancellor , Florian Fainelli , Rob Herring , Frank Rowand , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, linux-pci@vger.kernel.org, linux-acpi@vger.kernel.org, devicetree@vger.kernel.org, linux-usb@vger.kernel.org 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-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.