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=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,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 07A05C43215 for ; Mon, 25 Nov 2019 16:33:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D9B6520740 for ; Mon, 25 Nov 2019 16:33:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728852AbfKYQd0 (ORCPT ); Mon, 25 Nov 2019 11:33:26 -0500 Received: from foss.arm.com ([217.140.110.172]:52534 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728683AbfKYQd0 (ORCPT ); Mon, 25 Nov 2019 11:33:26 -0500 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 8683A31B; Mon, 25 Nov 2019 08:33:25 -0800 (PST) Received: from [10.1.196.37] (e121345-lin.cambridge.arm.com [10.1.196.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 0A7713F6C4; Mon, 25 Nov 2019 08:33:20 -0800 (PST) Subject: Re: [PATCH v2] dma-mapping: treat dev->bus_dma_mask as a DMA limit To: Christoph Hellwig , Nathan Chancellor Cc: Nicolas Saenz Julienne , Dave Hansen , Andy Lutomirski , Peter Zijlstra , Bjorn Helgaas , Lorenzo Pieralisi , Hanjun Guo , Sudeep Holla , Jens Axboe , Joerg Roedel , Rob Herring , Frank Rowand , Marek Szyprowski , Benjamin Herrenschmidt , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org, Paul Mackerras , "H. Peter Anvin" , Paul Burton , Michael Ellerman , x86@kernel.org, linux-acpi@vger.kernel.org, Ingo Molnar , James Hogan , Len Brown , devicetree@vger.kernel.org, Borislav Petkov , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, "Rafael J. Wysocki" , linux-mips@vger.kernel.org, Ralf Baechle , iommu@lists.linux-foundation.org, linuxppc-dev@lists.ozlabs.org References: <20191121092646.8449-1-nsaenzjulienne@suse.de> <20191123165108.GA15306@ubuntu-x2-xlarge-x86> <20191125074412.GA30595@lst.de> From: Robin Murphy Message-ID: <0b851d0e-37c7-062e-c287-05f8c8a54c16@arm.com> Date: Mon, 25 Nov 2019 16:33:17 +0000 User-Agent: Mozilla/5.0 (X11; Linux aarch64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <20191125074412.GA30595@lst.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On 25/11/2019 7:44 am, Christoph Hellwig wrote: > On Sat, Nov 23, 2019 at 09:51:08AM -0700, Nathan Chancellor wrote: >> Just as an FYI, this introduces a warning on arm32 allyesconfig for me: > > I think the dma_limit argument to iommu_dma_alloc_iova should be a u64 > and/or we need to use min_t and open code the zero exception. > > Robin, Nicolas - any opinions? Yeah, given that it's always held a mask I'm not entirely sure why it was ever a dma_addr_t rather than a u64. Unless anyone else is desperate to do it I'll get a cleanup patch ready for rc1. > Also I wonder how this file gets compiled on arm32 given that arm32 > has its own set of iommu dma ops.. As long as the dependencies for CONFIG_IOMMU_DMA are met it can be built even when it's not actually used. That said, I might have expected that arm allyesconfig ends up with CONFIG_ARCH_DMA_ADDR_T_64BIT=y anyway; I guess it must pick some of CONFIG_ARM_LPAE's negative dependencies. (/me doesn't feel like jumping down the all*config rabbit hole today) Robin.