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=-13.7 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,NICE_REPLY_A, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 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 2E269C43461 for ; Fri, 11 Sep 2020 11:12:18 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 910DB221EE for ; Fri, 11 Sep 2020 11:12:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 910DB221EE 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 fraxinus.osuosl.org (Postfix) with ESMTP id 03E4D873D9; Fri, 11 Sep 2020 11:12:17 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id g9eiMhK-dySE; Fri, 11 Sep 2020 11:12:15 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0828686CA1; Fri, 11 Sep 2020 11:12:15 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id D94B0C0859; Fri, 11 Sep 2020 11:12:14 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 45502C0051 for ; Fri, 11 Sep 2020 11:12:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 40C0E87837 for ; Fri, 11 Sep 2020 11:12:13 +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 xHmxte5q0zzg for ; Fri, 11 Sep 2020 11:12:12 +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 4B28387836 for ; Fri, 11 Sep 2020 11:12:12 +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 88107113E; Fri, 11 Sep 2020 04:12:11 -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 8C36F3F68F; Fri, 11 Sep 2020 04:12:05 -0700 (PDT) Subject: Re: [PATCH 2/3] ARM/keystone: move the DMA offset handling under ifdef CONFIG_ARM_LPAE To: Christoph Hellwig , iommu@lists.linux-foundation.org, Russell King , Santosh Shilimkar References: <20200910054038.324517-1-hch@lst.de> <20200910054038.324517-3-hch@lst.de> From: Robin Murphy Message-ID: Date: Fri, 11 Sep 2020 12:12:00 +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: <20200910054038.324517-3-hch@lst.de> 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, Rob Herring , Jim Quinlan , 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-10 06:40, 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. Seems reasonable - once again I wonder whether this notifier is really needed any more since "dma-ranges" should now be handled properly for PCI devices as well, but that's not something to worry about in this series. Reviewed-by: Robin Murphy > Signed-off-by: Christoph Hellwig > --- > arch/arm/mach-keystone/keystone.c | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/arch/arm/mach-keystone/keystone.c b/arch/arm/mach-keystone/keystone.c > index 638808c4e12247..dcd031ba84c2e0 100644 > --- a/arch/arm/mach-keystone/keystone.c > +++ b/arch/arm/mach-keystone/keystone.c > @@ -24,6 +24,7 @@ > > #include "keystone.h" > > +#ifdef CONFIG_ARM_LPAE > static unsigned long keystone_dma_pfn_offset __read_mostly; > > static int keystone_platform_notifier(struct notifier_block *nb, > @@ -48,14 +49,17 @@ static int keystone_platform_notifier(struct notifier_block *nb, > static struct notifier_block platform_nb = { > .notifier_call = keystone_platform_notifier, > }; > +#endif /* CONFIG_ARM_LPAE */ > > static void __init keystone_init(void) > { > +#ifdef CONFIG_ARM_LPAE > if (PHYS_OFFSET >= KEYSTONE_HIGH_PHYS_START) { > keystone_dma_pfn_offset = PFN_DOWN(KEYSTONE_HIGH_PHYS_START - > KEYSTONE_LOW_PHYS_START); > bus_register_notifier(&platform_bus_type, &platform_nb); > } > +#endif > keystone_pm_runtime_init(); > } > > _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu