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=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS 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 2E1A4C433E0 for ; Thu, 25 Mar 2021 21:42:09 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0338361A4A for ; Thu, 25 Mar 2021 21:42:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231159AbhCYVli (ORCPT ); Thu, 25 Mar 2021 17:41:38 -0400 Received: from mail.kernel.org ([198.145.29.99]:57548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230470AbhCYVl0 (ORCPT ); Thu, 25 Mar 2021 17:41:26 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D75CE61A41; Thu, 25 Mar 2021 21:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616708485; bh=RPr0+GAQJYl2SXFGMPkIt54GGFqTX+CVANOyfY1QFiY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=k5NiMFpnmGFDfTsTgKkHIfzy4Q87nBn6/uezhrr7m3mdolnhlED3LoG2wzf7SLR0T 6pJzRE49SLYcBdd4RAg+iDP6Hp19foyZiJFV1U4ve6HWe9qMn5bVFVEFjZ1V15mpeV in8BH2QDhzOkk4kZeC/xFj0gzIgg2AIUXregXyHPu4glOXPYvR7pCBjb9tYWgChXnG D+eZZZCxkB6I66pyymVQi+/j4qs6M9S0Lb1FncI41V8nC1n7SFypn5EVyWrbNgdIGv eD8ZxcfeA9cYjZODc8ytNDL+5RbW8uEXJnrsSvNWz/E1/QPT7wOpKO2oz5jn4NSMzz JkxGn/cloYGJQ== Received: by mail-ot1-f42.google.com with SMTP id l12-20020a9d6a8c0000b0290238e0f9f0d8so3396036otq.8; Thu, 25 Mar 2021 14:41:25 -0700 (PDT) X-Gm-Message-State: AOAM530X5Q+aMS4MPWv4Txjyfi6DksEIc9x/aobSURkMt838RhzTUZFw aLaQPsnY0aUC0kb2GrY0Z2O9ff1ACs4yA/UbOA4= X-Google-Smtp-Source: ABdhPJxlCcqleUvoMM0qnZXW4lBarEjgZ1ug3Hjq78DPfvPnEuxx7Lua3VGxdB55kpr9ovRvIeqvFoRKnXWmtETo1pU= X-Received: by 2002:a05:6830:148c:: with SMTP id s12mr9471035otq.251.1616708485174; Thu, 25 Mar 2021 14:41:25 -0700 (PDT) MIME-Version: 1.0 References: <20210320151903.60759-1-sven@svenpeter.dev> <20210323205346.GA1283560@robh.at.kernel.org> <43685c67-6d9c-4e72-b320-0462c2273bf0@www.fastmail.com> In-Reply-To: <43685c67-6d9c-4e72-b320-0462c2273bf0@www.fastmail.com> From: Arnd Bergmann Date: Thu, 25 Mar 2021 22:41:09 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/3] Apple M1 DART IOMMU driver To: Sven Peter Cc: Rob Herring , Mark Kettenis , "open list:IOMMU DRIVERS" , Joerg Roedel , Will Deacon , Robin Murphy , Hector Martin , Marc Zyngier , Mohamed Mediouni , Stan Skowronek , Linux ARM , Linux Kernel Mailing List , DTML Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Mar 25, 2021 at 8:53 AM Sven Peter wrote: > On Tue, Mar 23, 2021, at 21:53, Rob Herring wrote: > > I'm probably just confused or maybe the documentation is outdated but I don't > see how I could specify "this device can only use DMA addresses from > 0x00100000...0x3ff00000 but can map these via the iommu to any physical > address" using 'dma-ranges'. It sounds like this is a holdover from the original powerpc iommu, which also had a limited set of virtual addresses in the iommu. I would think it's sufficient to describe it in the iommu itself, since the limitation is more "addresses coming into the iommu must be this range" than "this device must use that address range for talking to the iommu". If the addresses are allocated by the iommu driver, and each iommu only has one DMA master attached to it, having a simple range property in the iommu node should do the trick here. If there might be multiple devices on the same iommu but with different address ranges (which I don't think is the case), then it could be part of the reference to the iommu. Arnd 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=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 4B6A1C433DB for ; Thu, 25 Mar 2021 21:41:30 +0000 (UTC) Received: from smtp4.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 E761461A25 for ; Thu, 25 Mar 2021 21:41:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E761461A25 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id A1DD240EB0; Thu, 25 Mar 2021 21:41:29 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eyRHFteX8ZOC; Thu, 25 Mar 2021 21:41:28 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp4.osuosl.org (Postfix) with ESMTP id 6B16B40EBD; Thu, 25 Mar 2021 21:41:28 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 325B4C000D; Thu, 25 Mar 2021 21:41:28 +0000 (UTC) Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by lists.linuxfoundation.org (Postfix) with ESMTP id 0FA15C000A for ; Thu, 25 Mar 2021 21:41:27 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id E9E8060B65 for ; Thu, 25 Mar 2021 21:41:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Authentication-Results: smtp3.osuosl.org (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id DGMqPRxOlQpV for ; Thu, 25 Mar 2021 21:41:26 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp3.osuosl.org (Postfix) with ESMTPS id 5B60E60B2C for ; Thu, 25 Mar 2021 21:41:26 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id CF5AA61A25 for ; Thu, 25 Mar 2021 21:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616708485; bh=RPr0+GAQJYl2SXFGMPkIt54GGFqTX+CVANOyfY1QFiY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=k5NiMFpnmGFDfTsTgKkHIfzy4Q87nBn6/uezhrr7m3mdolnhlED3LoG2wzf7SLR0T 6pJzRE49SLYcBdd4RAg+iDP6Hp19foyZiJFV1U4ve6HWe9qMn5bVFVEFjZ1V15mpeV in8BH2QDhzOkk4kZeC/xFj0gzIgg2AIUXregXyHPu4glOXPYvR7pCBjb9tYWgChXnG D+eZZZCxkB6I66pyymVQi+/j4qs6M9S0Lb1FncI41V8nC1n7SFypn5EVyWrbNgdIGv eD8ZxcfeA9cYjZODc8ytNDL+5RbW8uEXJnrsSvNWz/E1/QPT7wOpKO2oz5jn4NSMzz JkxGn/cloYGJQ== Received: by mail-ot1-f41.google.com with SMTP id 91-20020a9d08640000b0290237d9c40382so3366006oty.12 for ; Thu, 25 Mar 2021 14:41:25 -0700 (PDT) X-Gm-Message-State: AOAM532Qw11nGjQgKOQt4eRJTkWyLHnItlIKdKgpO46qJk1iZa6eX/pU /fEHOfRbetDfqfMlVvg2YJvwXY52rEenfLKMZz8= X-Google-Smtp-Source: ABdhPJxlCcqleUvoMM0qnZXW4lBarEjgZ1ug3Hjq78DPfvPnEuxx7Lua3VGxdB55kpr9ovRvIeqvFoRKnXWmtETo1pU= X-Received: by 2002:a05:6830:148c:: with SMTP id s12mr9471035otq.251.1616708485174; Thu, 25 Mar 2021 14:41:25 -0700 (PDT) MIME-Version: 1.0 References: <20210320151903.60759-1-sven@svenpeter.dev> <20210323205346.GA1283560@robh.at.kernel.org> <43685c67-6d9c-4e72-b320-0462c2273bf0@www.fastmail.com> In-Reply-To: <43685c67-6d9c-4e72-b320-0462c2273bf0@www.fastmail.com> From: Arnd Bergmann Date: Thu, 25 Mar 2021 22:41:09 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/3] Apple M1 DART IOMMU driver To: Sven Peter Cc: Rob Herring , DTML , Will Deacon , Hector Martin , Linux Kernel Mailing List , "open list:IOMMU DRIVERS" , Marc Zyngier , Mohamed Mediouni , Stan Skowronek , Robin Murphy , Linux ARM , Mark Kettenis 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-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Thu, Mar 25, 2021 at 8:53 AM Sven Peter wrote: > On Tue, Mar 23, 2021, at 21:53, Rob Herring wrote: > > I'm probably just confused or maybe the documentation is outdated but I don't > see how I could specify "this device can only use DMA addresses from > 0x00100000...0x3ff00000 but can map these via the iommu to any physical > address" using 'dma-ranges'. It sounds like this is a holdover from the original powerpc iommu, which also had a limited set of virtual addresses in the iommu. I would think it's sufficient to describe it in the iommu itself, since the limitation is more "addresses coming into the iommu must be this range" than "this device must use that address range for talking to the iommu". If the addresses are allocated by the iommu driver, and each iommu only has one DMA master attached to it, having a simple range property in the iommu node should do the trick here. If there might be multiple devices on the same iommu but with different address ranges (which I don't think is the case), then it could be part of the reference to the iommu. Arnd _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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=-4.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 2AE33C433C1 for ; Thu, 25 Mar 2021 21:43:40 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 BD82561A25 for ; Thu, 25 Mar 2021 21:43:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BD82561A25 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+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=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:Cc: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=Kcml7I1oW5FArfcO9P0SNT/L+S03byfzuISClv9emDU=; b=miXqdTDbshE4QcMnA00skE71U rUyLQf5WesoVBaukTA39QDDUPUTZEbm6dejYsnn64mQ7fTG5EBAvwOQl1mx4GICVNoszqqvP0FmYA ppBbZWCV5K7Jf9FF21SFYubAuYx4JVjHVlyajdGRmZBQRDPVe6S6+HyfkCrVMKMBVYgZK3h1RF2/G 4ls3PUDGcCY3Jg3h8yrt9+86DLW+4bp1/+v3eYExnIz8KlgKpW442PSSqRIRXYPcmaSs0I0hWrAIe TKyKQZl1pH0dCFVA49w0eX5EvrJH8Md5ho5vSWt3H4azw8GPHVSUMSeG8QmKBV6MukBEFPEsk5KrT r/k4tAjCQ==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lPXjT-002EKd-B9; Thu, 25 Mar 2021 21:41:35 +0000 Received: from mail.kernel.org ([198.145.29.99]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lPXjO-002EJb-2G for linux-arm-kernel@lists.infradead.org; Thu, 25 Mar 2021 21:41:32 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id CA076619EE for ; Thu, 25 Mar 2021 21:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616708485; bh=RPr0+GAQJYl2SXFGMPkIt54GGFqTX+CVANOyfY1QFiY=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=k5NiMFpnmGFDfTsTgKkHIfzy4Q87nBn6/uezhrr7m3mdolnhlED3LoG2wzf7SLR0T 6pJzRE49SLYcBdd4RAg+iDP6Hp19foyZiJFV1U4ve6HWe9qMn5bVFVEFjZ1V15mpeV in8BH2QDhzOkk4kZeC/xFj0gzIgg2AIUXregXyHPu4glOXPYvR7pCBjb9tYWgChXnG D+eZZZCxkB6I66pyymVQi+/j4qs6M9S0Lb1FncI41V8nC1n7SFypn5EVyWrbNgdIGv eD8ZxcfeA9cYjZODc8ytNDL+5RbW8uEXJnrsSvNWz/E1/QPT7wOpKO2oz5jn4NSMzz JkxGn/cloYGJQ== Received: by mail-ot1-f51.google.com with SMTP id g8-20020a9d6c480000b02901b65ca2432cso3411584otq.3 for ; Thu, 25 Mar 2021 14:41:25 -0700 (PDT) X-Gm-Message-State: AOAM530JAsppAK5VfNSV5rsfYdzhud73SKfRAorAkaR+L7PVcqg4Aq+c Vab43jDXAq7ElvKF3YJj9On6AEfdq+r5Bfklf50= X-Google-Smtp-Source: ABdhPJxlCcqleUvoMM0qnZXW4lBarEjgZ1ug3Hjq78DPfvPnEuxx7Lua3VGxdB55kpr9ovRvIeqvFoRKnXWmtETo1pU= X-Received: by 2002:a05:6830:148c:: with SMTP id s12mr9471035otq.251.1616708485174; Thu, 25 Mar 2021 14:41:25 -0700 (PDT) MIME-Version: 1.0 References: <20210320151903.60759-1-sven@svenpeter.dev> <20210323205346.GA1283560@robh.at.kernel.org> <43685c67-6d9c-4e72-b320-0462c2273bf0@www.fastmail.com> In-Reply-To: <43685c67-6d9c-4e72-b320-0462c2273bf0@www.fastmail.com> From: Arnd Bergmann Date: Thu, 25 Mar 2021 22:41:09 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 0/3] Apple M1 DART IOMMU driver To: Sven Peter Cc: Rob Herring , Mark Kettenis , "open list:IOMMU DRIVERS" , Joerg Roedel , Will Deacon , Robin Murphy , Hector Martin , Marc Zyngier , Mohamed Mediouni , Stan Skowronek , Linux ARM , Linux Kernel Mailing List , DTML X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210325_214130_983750_912122B6 X-CRM114-Status: GOOD ( 15.78 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Mar 25, 2021 at 8:53 AM Sven Peter wrote: > On Tue, Mar 23, 2021, at 21:53, Rob Herring wrote: > > I'm probably just confused or maybe the documentation is outdated but I don't > see how I could specify "this device can only use DMA addresses from > 0x00100000...0x3ff00000 but can map these via the iommu to any physical > address" using 'dma-ranges'. It sounds like this is a holdover from the original powerpc iommu, which also had a limited set of virtual addresses in the iommu. I would think it's sufficient to describe it in the iommu itself, since the limitation is more "addresses coming into the iommu must be this range" than "this device must use that address range for talking to the iommu". If the addresses are allocated by the iommu driver, and each iommu only has one DMA master attached to it, having a simple range property in the iommu node should do the trick here. If there might be multiple devices on the same iommu but with different address ranges (which I don't think is the case), then it could be part of the reference to the iommu. Arnd _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel