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=-5.2 required=3.0 tests=BAYES_00, 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 A063FC2D0A7 for ; Wed, 16 Sep 2020 06:14:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 539C1208E4 for ; Wed, 16 Sep 2020 06:14:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726172AbgIPGOE (ORCPT ); Wed, 16 Sep 2020 02:14:04 -0400 Received: from verein.lst.de ([213.95.11.211]:51030 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726129AbgIPGOD (ORCPT ); Wed, 16 Sep 2020 02:14:03 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 3122868B05; Wed, 16 Sep 2020 08:13:59 +0200 (CEST) Date: Wed, 16 Sep 2020 08:13:59 +0200 From: Christoph Hellwig To: Mathieu Poirier Cc: Christoph Hellwig , iommu@lists.linux-foundation.org, Russell King , Santosh Shilimkar , Greg Kroah-Hartman , Jim Quinlan , Nathan Chancellor , Florian Fainelli , Robin Murphy , Rob Herring , Frank Rowand , Ohad Ben-Cohen , Bjorn Andersson , linux-remoteproc@vger.kernel.org, linux-usb@vger.kernel.org, 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, arnaud.pouliquen@st.com, loic.pallardy.st.com@lst.de Subject: Re: [PATCH 6/6] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset Message-ID: <20200916061359.GA8424@lst.de> References: <20200914073343.1579578-1-hch@lst.de> <20200914073343.1579578-7-hch@lst.de> <20200914230147.GA3251212@xps15> <20200915054122.GA18079@lst.de> <20200915195501.GA3666944@xps15> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200915195501.GA3666944@xps15> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-acpi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-acpi@vger.kernel.org On Tue, Sep 15, 2020 at 01:55:01PM -0600, Mathieu Poirier wrote: > That did the trick - the stm32 platform driver's probe() function completes and > the remote processor is operatinal. > > That being said the value returned by function dma_to_pfn() > is 0x137fff in the original code and 0xfffff with your patches applied. Yes, that is intentional. The old code just applied the range and got an out of range offset, the new one reports the max offset. 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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,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 AA306C433E2 for ; Wed, 16 Sep 2020 06:14:08 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.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 1BB4B208E4 for ; Wed, 16 Sep 2020 06:14:07 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1BB4B208E4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C3AE88734F; Wed, 16 Sep 2020 06:14:07 +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 NzDq6N30SQap; Wed, 16 Sep 2020 06:14:07 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by hemlock.osuosl.org (Postfix) with ESMTP id 3C0BB8720D; Wed, 16 Sep 2020 06:14:07 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 2C668C0859; Wed, 16 Sep 2020 06:14:07 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 233DCC0051 for ; Wed, 16 Sep 2020 06:14:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 11C9D8723B for ; Wed, 16 Sep 2020 06:14:05 +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 HHYVK4GbEyeI for ; Wed, 16 Sep 2020 06:14:04 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by hemlock.osuosl.org (Postfix) with ESMTPS id E79C58720D for ; Wed, 16 Sep 2020 06:14:03 +0000 (UTC) Received: by verein.lst.de (Postfix, from userid 2407) id 3122868B05; Wed, 16 Sep 2020 08:13:59 +0200 (CEST) Date: Wed, 16 Sep 2020 08:13:59 +0200 From: Christoph Hellwig To: Mathieu Poirier Subject: Re: [PATCH 6/6] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset Message-ID: <20200916061359.GA8424@lst.de> References: <20200914073343.1579578-1-hch@lst.de> <20200914073343.1579578-7-hch@lst.de> <20200914230147.GA3251212@xps15> <20200915054122.GA18079@lst.de> <20200915195501.GA3666944@xps15> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200915195501.GA3666944@xps15> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: linux-sh@vger.kernel.org, linux-pci@vger.kernel.org, linux-remoteproc@vger.kernel.org, Frank Rowand , Christoph Hellwig , Florian Fainelli , Russell King , linux-acpi@vger.kernel.org, loic.pallardy.st.com@lst.de, Ohad Ben-Cohen , devicetree@vger.kernel.org, Rob Herring , Santosh Shilimkar , Nathan Chancellor , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, arnaud.pouliquen@st.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Jim Quinlan , Robin Murphy 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 Tue, Sep 15, 2020 at 01:55:01PM -0600, Mathieu Poirier wrote: > That did the trick - the stm32 platform driver's probe() function completes and > the remote processor is operatinal. > > That being said the value returned by function dma_to_pfn() > is 0x137fff in the original code and 0xfffff with your patches applied. Yes, that is intentional. The old code just applied the range and got an out of range offset, the new one reports the max offset. _______________________________________________ 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 From: Christoph Hellwig Date: Wed, 16 Sep 2020 06:13:59 +0000 Subject: Re: [PATCH 6/6] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset Message-Id: <20200916061359.GA8424@lst.de> List-Id: References: <20200914073343.1579578-1-hch@lst.de> <20200914073343.1579578-7-hch@lst.de> <20200914230147.GA3251212@xps15> <20200915054122.GA18079@lst.de> <20200915195501.GA3666944@xps15> In-Reply-To: <20200915195501.GA3666944@xps15> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Mathieu Poirier Cc: Christoph Hellwig , iommu@lists.linux-foundation.org, Russell King , Santosh Shilimkar , Greg Kroah-Hartman , Jim Quinlan , Nathan Chancellor , Florian Fainelli , Robin Murphy , Rob Herring , Frank Rowand , Ohad Ben-Cohen , Bjorn Andersson , linux-remoteproc@vger.kernel.org, linux-usb@vger.kernel.org, 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, arnaud.pouliquen@st.com, loic.pallardy.st.com@lst.de On Tue, Sep 15, 2020 at 01:55:01PM -0600, Mathieu Poirier wrote: > That did the trick - the stm32 platform driver's probe() function completes and > the remote processor is operatinal. > > That being said the value returned by function dma_to_pfn() > is 0x137fff in the original code and 0xfffff with your patches applied. Yes, that is intentional. The old code just applied the range and got an out of range offset, the new one reports the max offset. 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=-8.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 95CEEC433E2 for ; Wed, 16 Sep 2020 06:15:17 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 2B5B0208E4 for ; Wed, 16 Sep 2020 06:15:17 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="JrKtJZ5P" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2B5B0208E4 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de 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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=SbdgbkB34GIWYV0jrTtt2nDnIPc8ZYwwK9D3Hn5ppc0=; b=JrKtJZ5P3Yi5YIak+EUCaF2iJ ila926szBF5H9CgLMyTJ7r8/Xmq5Jjyudf9qmV/NeqiqjmnZ2of/KrvqZfyAcYv0Ms461IyjZG6HK pLi+PT4h7vHnB3Mg1cqtpwi0Z1Yqa0h7+Ip+41wmutXBnDna5aT1UgZTtziDYCcVDNvbzfyhZL7/d FI1MxKyIFTfxqQZ2HbqJVKAUzUB9KgPG+0uUU9Oc7H0YAdSfVcsVIyO3G/0bgxTKMTEEYRvo2MNey KkIuI8qv8dZkMHWGoxkYnY9xOhdqmQgCf4977WMQQ01dq7JBzEcyG+KGpT8h5tqxsNH4PlkVYi9UK +NqewBY/Q==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIQhh-0004go-7l; Wed, 16 Sep 2020 06:14:05 +0000 Received: from verein.lst.de ([213.95.11.211]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kIQhe-0004g9-Bq for linux-arm-kernel@lists.infradead.org; Wed, 16 Sep 2020 06:14:03 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id 3122868B05; Wed, 16 Sep 2020 08:13:59 +0200 (CEST) Date: Wed, 16 Sep 2020 08:13:59 +0200 From: Christoph Hellwig To: Mathieu Poirier Subject: Re: [PATCH 6/6] dma-mapping: introduce DMA range map, supplanting dma_pfn_offset Message-ID: <20200916061359.GA8424@lst.de> References: <20200914073343.1579578-1-hch@lst.de> <20200914073343.1579578-7-hch@lst.de> <20200914230147.GA3251212@xps15> <20200915054122.GA18079@lst.de> <20200915195501.GA3666944@xps15> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200915195501.GA3666944@xps15> User-Agent: Mutt/1.5.17 (2007-11-01) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200916_021402_556082_4AE21FF3 X-CRM114-Status: GOOD ( 11.99 ) 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-sh@vger.kernel.org, linux-pci@vger.kernel.org, linux-remoteproc@vger.kernel.org, Bjorn Andersson , Frank Rowand , Christoph Hellwig , Florian Fainelli , Russell King , linux-acpi@vger.kernel.org, loic.pallardy.st.com@lst.de, Ohad Ben-Cohen , devicetree@vger.kernel.org, Rob Herring , Santosh Shilimkar , Nathan Chancellor , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , linux-usb@vger.kernel.org, arnaud.pouliquen@st.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Jim Quinlan , Robin Murphy 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 Tue, Sep 15, 2020 at 01:55:01PM -0600, Mathieu Poirier wrote: > That did the trick - the stm32 platform driver's probe() function completes and > the remote processor is operatinal. > > That being said the value returned by function dma_to_pfn() > is 0x137fff in the original code and 0xfffff with your patches applied. Yes, that is intentional. The old code just applied the range and got an out of range offset, the new one reports the max offset. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel