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=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED 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 5D2FAC41514 for ; Mon, 29 Jul 2019 09:57:37 +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 3713C2075B for ; Mon, 29 Jul 2019 09:57:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vDXQZFUI" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3713C2075B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.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:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=j2ZwIBd9YphpBMs53V1bF/yOOhpRk7Aeitd+RTxZGNw=; b=vDXQZFUIi1O5+P 4uXx9RKso2ueGSjag4GJEvORjjjSXTkvTUQMzLIRblVOumNEM0JXTrDfsVnxdmI9wiCYUvFgRZFZ4 /btVqUrk2pKqB0hGezyD/GguzgKpWyGTJFhhrF5VphZ++cUtLnH3aEKnDneHxs1rN5wdlS4mZmwFz OW1MiRxM5NHvvOM24WqlYXy+2pCAzMJnJOufSokPyNVMettihXChn1KxaKTN4i8welQ3yk3SjkN82 8qf0RQ55FRxn2OdRxz/nQtBzqllAAXGt6vO/fWvkLEDQuxiNL1fixgiIK9qhyRqhf6VT8ljCO7Cfn Hgp/V5dOXn1HyxLKds6w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hs2PQ-00086q-M6; Mon, 29 Jul 2019 09:57:36 +0000 Received: from mail-wr1-f68.google.com ([209.85.221.68]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hs2PN-000850-EH for linux-arm-kernel@lists.infradead.org; Mon, 29 Jul 2019 09:57:34 +0000 Received: by mail-wr1-f68.google.com with SMTP id x4so7952800wrt.6 for ; Mon, 29 Jul 2019 02:57:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=3EgmHLFik/OPgDdGuLMAdfuPiX1r55Htn8ht8rmVprc=; b=mJRBHPh6MnpsZaPK10yKm2cCuqYS34hE6hxTifJVc7Mmi6xWZCi0njSeLWbDE9829e eWciQuq7PlgSf8TfT/v9cQ+ZTpZDs/Z593xZu7NClgPP0AxeAPpkulOS84oulMDtmmmv 4VOWztS7X5n2CwGgqQCmTzfGevjufbFCanTPR+VMcc/pxkaZuQzuAhUYk764gFlgq46l PrrfTl24hT+Aq28k28hGZX1h1X0DZEfd56/ekxx2aPa6TECR/sHFvN2mN/vUIBwJmpab NztjeEUb1hxSDpF+pIoFkldv/8cUmeLhvthZ3ulK2mAKR/iUCHYbQtC6L8aZa3JRsGU5 fFRQ== X-Gm-Message-State: APjAAAXpgSNUSyrVtngiojlzS13LibnnSr5N+9q0G8eLGp40gAuTDJmo MfnJMz3CkGFcnSJKm8TLD2BTEa3R2NV1mLCSHIY= X-Google-Smtp-Source: APXvYqwjfJqS4NGp1R7UrJA2JKANbRDFjcVknk63xGwZnvz1sSMLkkUqcYNpnDqWGXG4WZ8w21QgE4NZzRTpKbjjx94= X-Received: by 2002:adf:f08f:: with SMTP id n15mr35431224wro.213.1564394251709; Mon, 29 Jul 2019 02:57:31 -0700 (PDT) MIME-Version: 1.0 References: <20190725063401.29904-1-hch@lst.de> <20190725063401.29904-5-hch@lst.de> In-Reply-To: <20190725063401.29904-5-hch@lst.de> From: Geert Uytterhoeven Date: Mon, 29 Jul 2019 11:57:19 +0200 Message-ID: Subject: Re: [PATCH 4/5] dma-mapping: provide a better default ->get_required_mask To: Christoph Hellwig X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190729_025733_483047_3A791BE7 X-CRM114-Status: GOOD ( 10.45 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-xtensa@linux-xtensa.org, Michal Simek , Parisc List , Linux-sh list , Takashi Iwai , linuxppc-dev , the arch/x86 maintainers , linux-m68k , Linux Kernel Mailing List , Linux IOMMU , Robin Murphy , Linux ARM , Marek Szyprowski 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 Hi Christoph, On Thu, Jul 25, 2019 at 8:35 AM Christoph Hellwig wrote: > Most dma_map_ops instances are IOMMUs that work perfectly fine in 32-bits > of IOVA space, and the generic direct mapping code already provides its > own routines that is intelligent based on the amount of memory actually > present. Wire up the dma-direct routine for the ARM direct mapping code > as well, and otherwise default to the constant 32-bit mask. This way > we only need to override it for the occasional odd IOMMU that requires > 64-bit IOVA support, or IOMMU drivers that are more efficient if they > can fall back to the direct mapping. As I know you like diving into cans of worms ;-) Does 64-bit IOVA support actually work in general? Or only on 64-bit platforms, due to dma_addr_t to unsigned long truncation on 32-bit? https://lore.kernel.org/linux-renesas-soc/CAMuHMdWkQ918Y61tMJbHEu29AGLEyNwbvZbSBB-RRH7YYUNRcA@mail.gmail.com/ Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel