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.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,USER_AGENT_MUTT 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 BCB5BC43219 for ; Tue, 30 Apr 2019 10:57:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9802621670 for ; Tue, 30 Apr 2019 10:57:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727470AbfD3K5D (ORCPT ); Tue, 30 Apr 2019 06:57:03 -0400 Received: from verein.lst.de ([213.95.11.211]:45502 "EHLO newverein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727100AbfD3K5C (ORCPT ); Tue, 30 Apr 2019 06:57:02 -0400 Received: by newverein.lst.de (Postfix, from userid 2407) id B83E068B20; Tue, 30 Apr 2019 12:56:40 +0200 (CEST) Date: Tue, 30 Apr 2019 12:56:40 +0200 From: Christoph Hellwig To: Nicolin Chen Cc: hch@lst.de, robin.murphy@arm.com, m.szyprowski@samsung.com, vdumpa@nvidia.com, linux@armlinux.org.uk, catalin.marinas@arm.com, will.deacon@arm.com, chris@zankel.net, jcmvbkbc@gmail.com, joro@8bytes.org, dwmw2@infradead.org, tony@atomide.com, akpm@linux-foundation.org, sfr@canb.auug.org.au, treding@nvidia.com, keescook@chromium.org, iamjoonsoo.kim@lge.com, wsa+renesas@sang-engineering.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-xtensa@linux-xtensa.org, iommu@lists.linux-foundation.org Subject: Re: [RFC/RFT PATCH 1/2] dma-contiguous: Simplify dma_*_from_contiguous() function calls Message-ID: <20190430105640.GA20021@lst.de> References: <20190430015521.27734-1-nicoleotsuka@gmail.com> <20190430015521.27734-2-nicoleotsuka@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190430015521.27734-2-nicoleotsuka@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org So while I really, really like this cleanup it turns out it isn't actually safe for arm :( arm remaps the CMA allocation in place instead of using a new mapping, which can be done because they don't share PMDs with the kernel. So we'll probably need a __dma_alloc_from_contiguous version with an additional bool fallback argument - everyone but arms uses dma_alloc_from_contiguous as in your patch, just arm will get the non-fallback one. Sorry for not sorting this our earlier. 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.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT 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 65F0FC43219 for ; Tue, 30 Apr 2019 10:57:30 +0000 (UTC) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (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 3F43F21707 for ; Tue, 30 Apr 2019 10:57:30 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3F43F21707 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 mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 25B57F18; Tue, 30 Apr 2019 10:57:30 +0000 (UTC) Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 290BCF10 for ; Tue, 30 Apr 2019 10:57:02 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from newverein.lst.de (verein.lst.de [213.95.11.211]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id AD4AE5F4 for ; Tue, 30 Apr 2019 10:57:01 +0000 (UTC) Received: by newverein.lst.de (Postfix, from userid 2407) id B83E068B20; Tue, 30 Apr 2019 12:56:40 +0200 (CEST) Date: Tue, 30 Apr 2019 12:56:40 +0200 From: Christoph Hellwig To: Nicolin Chen Subject: Re: [RFC/RFT PATCH 1/2] dma-contiguous: Simplify dma_*_from_contiguous() function calls Message-ID: <20190430105640.GA20021@lst.de> References: <20190430015521.27734-1-nicoleotsuka@gmail.com> <20190430015521.27734-2-nicoleotsuka@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190430015521.27734-2-nicoleotsuka@gmail.com> User-Agent: Mutt/1.5.17 (2007-11-01) Cc: tony@atomide.com, catalin.marinas@arm.com, will.deacon@arm.com, jcmvbkbc@gmail.com, hch@lst.de, sfr@canb.auug.org.au, linux@armlinux.org.uk, treding@nvidia.com, linux-xtensa@linux-xtensa.org, keescook@chromium.org, akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org, chris@zankel.net, wsa+renesas@sang-engineering.com, robin.murphy@arm.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, iamjoonsoo.kim@lge.com, dwmw2@infradead.org X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.12 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="UTF-8" Content-Transfer-Encoding: 7bit Sender: iommu-bounces@lists.linux-foundation.org Errors-To: iommu-bounces@lists.linux-foundation.org Message-ID: <20190430105640.2yqTdQD01DQTNiTwHAR9POsmLbDqzLWV_T0Tio1-wRo@z> So while I really, really like this cleanup it turns out it isn't actually safe for arm :( arm remaps the CMA allocation in place instead of using a new mapping, which can be done because they don't share PMDs with the kernel. So we'll probably need a __dma_alloc_from_contiguous version with an additional bool fallback argument - everyone but arms uses dma_alloc_from_contiguous as in your patch, just arm will get the non-fallback one. Sorry for not sorting this our earlier. _______________________________________________ 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=-2.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS, URIBL_BLOCKED,USER_AGENT_MUTT 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 55319C43219 for ; Tue, 30 Apr 2019 10:58:44 +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 2367E21670 for ; Tue, 30 Apr 2019 10:58:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="tp+Spq16"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="j31sqtMP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2367E21670 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+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: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=YlHMWmrYnkKnqF8J6cYk6X5d4BHZO3A3jfelnZg6kgU=; b=tp+Spq16QABoFD DBi0TV+88U6t7sFTqVrnH6DTBJTvWRsidOj/WxdlA/CqEdJc0EBacrS4gvySrXcv0aXB5wPMFRmAv foyfjHIz9St5gQF9WbNVvacDddQdvfZWlBvvPqtdjm4tgr2co7iOXCJDYajVtfv7MmLSTTt138ypn +AoZRz8xlD7Z5K+c2sOsUrq1SJFKn7KqX4nOUOl4FI5PEuFp9VjvcHg4nYbQbhXBqxfhxQoGYODzg KbSrJFFOFTR7LWhLDasT0G5zzuicW1mqiJkXvGW8Z9u3PTmtWf4Kou451DdqaaLJLHh6SdIz9LxLS 79w4hFqJgHjHpK2Ratuw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLQT8-00072j-Q0; Tue, 30 Apr 2019 10:58:38 +0000 Received: from merlin.infradead.org ([2001:8b0:10b:1231::1]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLQRf-0005mJ-Ok for linux-arm-kernel@bombadil.infradead.org; Tue, 30 Apr 2019 10:57:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=ra2kVibUVn9/VQ0SNXVhYqTlrrhSqFlW+gpyazu5fno=; b=j31sqtMPWq78gM6GoaDwfINA/ ho72r37XZbFCvSIW6IRin6euc2DTtQlk28/Oh2b8dx37AO/uDHnnz8cedVLdph37j9Ajio4uOF5qS MpL+oWDYGhbPBNQssT9/1Mn2hG7BVUXL36eA48+0/eTL0AYTo0ar0W8JpLXT0hYeeghxHlsLOvEdm 0me+maBH9ZmpLAmpfGFcH87HVHk9C1Akhr2qVcRPRtCdrqFf2SzGmmhnKhtHv4Z93O12DhK36rnK7 80xOZ3kjZzuZS7z9X1tvcU7D+UJ1JIMylp8CkPbM8IlYsM2aZmVfS6j0cYadovvvOvVsoxFSvBEGC EQjTDKENQ==; Received: from verein.lst.de ([213.95.11.211] helo=newverein.lst.de) by merlin.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hLQRc-0008Ld-PP for linux-arm-kernel@lists.infradead.org; Tue, 30 Apr 2019 10:57:05 +0000 Received: by newverein.lst.de (Postfix, from userid 2407) id B83E068B20; Tue, 30 Apr 2019 12:56:40 +0200 (CEST) Date: Tue, 30 Apr 2019 12:56:40 +0200 From: Christoph Hellwig To: Nicolin Chen Subject: Re: [RFC/RFT PATCH 1/2] dma-contiguous: Simplify dma_*_from_contiguous() function calls Message-ID: <20190430105640.GA20021@lst.de> References: <20190430015521.27734-1-nicoleotsuka@gmail.com> <20190430015521.27734-2-nicoleotsuka@gmail.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20190430015521.27734-2-nicoleotsuka@gmail.com> 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-20190430_065704_938051_77199C83 X-CRM114-Status: UNSURE ( 6.05 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: tony@atomide.com, catalin.marinas@arm.com, will.deacon@arm.com, jcmvbkbc@gmail.com, hch@lst.de, m.szyprowski@samsung.com, sfr@canb.auug.org.au, joro@8bytes.org, linux@armlinux.org.uk, treding@nvidia.com, linux-xtensa@linux-xtensa.org, keescook@chromium.org, akpm@linux-foundation.org, linux-arm-kernel@lists.infradead.org, chris@zankel.net, wsa+renesas@sang-engineering.com, robin.murphy@arm.com, linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, iamjoonsoo.kim@lge.com, dwmw2@infradead.org 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 So while I really, really like this cleanup it turns out it isn't actually safe for arm :( arm remaps the CMA allocation in place instead of using a new mapping, which can be done because they don't share PMDs with the kernel. So we'll probably need a __dma_alloc_from_contiguous version with an additional bool fallback argument - everyone but arms uses dma_alloc_from_contiguous as in your patch, just arm will get the non-fallback one. Sorry for not sorting this our earlier. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel