Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3201051imm; Sun, 13 May 2018 06:28:33 -0700 (PDT) X-Google-Smtp-Source: AB8JxZos2YrQQ7vhZn2J3ESCIZ6Fmfis/pRRhObuSwuJ0PFq7FEr0u2YylV+XA6RccY4V1ocyUDe X-Received: by 2002:a65:44c3:: with SMTP id g3-v6mr4725373pgs.428.1526218113112; Sun, 13 May 2018 06:28:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526218113; cv=none; d=google.com; s=arc-20160816; b=zKOJpJZez/D7GOEcQTbpl0X/U9M/ZXHNZbbFH/qV/M5080IwmUqws/rV/iQoAZJtgZ Cijf5DhOCmTBkTEecDnKYH2pa1FY528Q9/sUlWh9p7J08t+JuYdzdrlO3x9JWbztxmH9 BS2wVcrpxkkn5Jyhy5b5O3OZAsJaukYhDnYaYgj93WG4QCaFZnv1ZuVogzKeYn+0e6t0 hcOQeqduWVE1/BXDh+QuS3qZLXgqssnAomUOH2stJatPj6rFpXFzqCBo3TigyoPeYZEn VPxptuMZkqv1hh+flnxwzzoP4jZ/M3vzi3TOTj90vThoR3dcW6BA0aoBtcCqfL+s74Md muHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=IEp1gIFE8mkuXBS4U8mYCjuw6n5Tp3OdcxV51oNJH8g=; b=pp92kBiQ42Vat/SH16g3LmkxivdxMlfHsLcAasz85ndIedHG7poDBFTyj0H7zj3GcE DCEBZ7bUhHhFqDGN68b6t4pIvR+SNuS7Uqy04jLHtoNhwlzY/7OqxgBRAq6RFTyXr0Lc DF06+PhOiql1V0EYP20jLPjFUknGofCNTs/FJM9olIZB76igGTSWAeKzUwri9z2fOhfm ocU/nmWwbcmMnu7nYh5hb2wA/Ess95NlVmTj18SaVU7hhKTX8cH75H02tQEZ3Lh8sTDp XtobFHNuiUkUalvGt8xJ3Cr8Kixyos+xK7N+a1jXvvxdHS9Ez9NmEN8ibqEXPJ8KvtFA pPeg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 75-v6si5877968pgf.653.2018.05.13.06.28.18; Sun, 13 May 2018 06:28:33 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751871AbeEMN1A (ORCPT + 99 others); Sun, 13 May 2018 09:27:00 -0400 Received: from mout.gmx.net ([212.227.17.22]:55933 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751345AbeEMN0y (ORCPT ); Sun, 13 May 2018 09:26:54 -0400 Received: from [192.168.20.60] ([89.247.32.230]) by mail.gmx.com (mrgmx103 [212.227.17.168]) with ESMTPSA (Nemesis) id 0MDR21-1f3lTb1TaP-00Go6r; Sun, 13 May 2018 15:26:26 +0200 Subject: Re: common non-cache coherent direct dma mapping ops To: Christoph Hellwig , iommu@lists.linux-foundation.org, James Bottomley Cc: linux-arch@vger.kernel.org, Michal Simek , Greentime Hu , Vincent Chen , linux-alpha@vger.kernel.org, linux-snps-arc@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-c6x-dev@linux-c6x.org, linux-hexagon@vger.kernel.org, linux-m68k@lists.linux-m68k.org, nios2-dev@lists.rocketboards.org, openrisc@lists.librecores.org, linux-parisc@vger.kernel.org, linux-sh@vger.kernel.org, sparclinux@vger.kernel.org, linux-kernel@vger.kernel.org References: <20180511075945.16548-1-hch@lst.de> From: Helge Deller Message-ID: <1834767f-0430-8f7f-61b1-560353cd6e5f@gmx.de> Date: Sun, 13 May 2018 15:26:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180511075945.16548-1-hch@lst.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:20QWLIhFXyRzbujUp8MnwFYNwBnQjTSC3Od6k/1r6d54moMZEd+ rq9NHZtRAHy7zFaLtMWjj+9dMaLAQh2wGIs9ROkUw1hV1CraD4thVXHYRBCM3fjX5glb4gm /PLoW5QkQxS1adc1l2gjiNj6qmSW0R0TqcAMAifI8YuWkWx9UvNiLOs+ZL4zT3pnio7NhFw AdJ/nh6pshCLan8Yw8hMA== X-UI-Out-Filterresults: notjunk:1;V01:K0:JFNPQCVINME=:Hwo7z3keqp6255cKnXUNz4 whYHnbcUogtlkgbYHbUeuFSqYeUR1C9EL+zfMv3QM7C7t5XIDsdkdeknflP8K1nYxQm4C4V9w YRDT+pihsoF/5sQ8zgINAU+BKPl1EQDKl9JMWqFcVAuvPgnp01qz5lhhUJ2bXQcwt7MLFySd7 n1dSpyoEZBjvHdbaojzh6GmK7SgrJqryciX4zwuJ5RHhFPZ/S1BpNxR13kXqyWiVIfVzoSnYd lzdT2RqLpP9UslQB2fw4gu9oVgektX5hWcwBzXCS7fnK0Z2TNYfHsZjKLzJZGShyJV012Qcjj 4/X7NSFwUvuJorWCvCmgiPpWY+Y+Zy4B6f9QTiBWs4weNs2u1O0qluVNGpPJbVBM+ErXI9GbO qslFE5SHDVpTHsEqJhs/QntNuiPyEKgJ+snzWSpmdiZs/aK6+Eib1YDjTZInzehH06Z9ONPNw xwq9/ErHw00O1opb+qNW8wFjfWKrUTNI3HZTPfTyYTyFyq19r+ljFM4qla1ID0TWpWDE/fPzx WtOUEpjjBHfx/UIMPB8C7XF23k7bEmNaVo2iw3oJsMXrTLnv9vQFm1P4Znbs4/WStbt/c7Qf2 +gv/NvQEpr8H5woEdj3HcUT3fNpwJskDiIBbWMGwKhPmZ/p8b8A4HTRYEzKV/A3H0yVL+kTDx yO0Vf32fQgj7nhO58Z+rPnN8P3CtJe/U9casZMaFZmk7E1aMmGSQ/aX/FOOIho6FDBGF8X/td SmjDL18V8Xa19++vF18XoJgujWVo6bWRK0NKM8dgFEtROUl7FZP3EFuHLcI16Wi+3DOi4afCz ZKnoC/x Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 11.05.2018 09:59, Christoph Hellwig wrote: > this series continues consolidating the dma-mapping code, with a focus > on architectures that do not (always) provide cache coherence for DMA. > Three architectures (arm, mips and powerpc) are still left to be > converted later due to complexity of their dma ops selection. > > The dma-noncoherent ops calls the dma-direct ops for the actual > translation of streaming mappins and allow the architecture to provide > any cache flushing required for cpu to device and/or device to cpu > ownership transfers. The dma coherent allocator is for now still left > entirely to architecture supplied implementations due the amount of > variations. Hopefully we can do some consolidation for them later on > as well. > > A lot of architectures are currently doing very questionable things > in their dma mapping routines, which are documented in the changelogs > for each patch. Please review them very careful and correct me on > incorrect assumptions. > > Because this series sits on top of two previously submitted series > a git tree might be useful to actually test it. It is provided here: > > git://git.infradead.org/users/hch/misc.git generic-dma-noncoherent > > Gitweb: > > http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/generic-dma-noncoherent > > Changes since RFC: > - fix a typo accidentally disabling the device to cpu transfer sync > - fixed a few compile failures I tested it again on parisc (this time again on top of git head) and it still breaks the same way as I reported in my mail on April 21st: the lasi82956 network driver works unreliable. NIC gets IP, but ping doesn't work. See drivers/net/ethernet/i825xx/lasi_82596.c, it uses dma*sync() functions. See comment in James mail from April 21st too: -> you just made every 32 bit parisc system unnecessarily use non-coherent. Helge