Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp11156457ybi; Thu, 25 Jul 2019 10:59:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwTBVxDJzNSceTHmm1yMAc30B1NicmlFf4oi/6LlUCU2NDCqrml+/GJUPaMCMAFHxY0dGoP X-Received: by 2002:a17:902:24c:: with SMTP id 70mr91373453plc.2.1564077569989; Thu, 25 Jul 2019 10:59:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564077569; cv=none; d=google.com; s=arc-20160816; b=R2J7AzqdVP46SvxfbWFB41BdkTbIFVbGu2JUCie/NrukquTpHtwfaylvSkERaat1FS cVD3UyFC3gyPgLSWDfZf9euYqw/gRvV/2AV3FWKQCWWZFrcN8rxOXflP40hlacKggHov Ypkf6yWmkn/nw+wFLcON55W9rxG5o7W+JvlVqSIB2AFL1Lj95wCAkr+TxudW8462N6un bDwxga/wwwLyBvjdrU/i8IVj/R3q5vpMWc12DTdqwLEQC4L9a1pAhZQ/soAfF1mKar3t tDTsT+P5zTUJuk/Pl5HLU5RvPu5UzoVtjm367TX9WABUCasHE/4Q1yVHbZuf03mu1PEY 1TYw== 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:dkim-signature; bh=zz+4xc5f556ik5dVIHkOBcpiQhkWRlNhJiib+8wLNDI=; b=mKIkUlXGxE52uMSXahkhfKhm5zHosFM/vJzj6cXhB9Ds1nB/biSG3Y/EMTXxhWyKp5 z72NVbd/pMZ/E15mg64zJPTKYrTK7d1xuoxjPpyuZMpN5B9GMI0S3e1YGvOMiFjUlD2Z ol0/Kv/la6s/J48VSGgObVmIej6Iqk4CH894sDg9mfScufPCvL8QZNomJ/QMZ0Yca8IR hbI4OaZJKy6BBckcEvepTZNG4ABimJL9azHzIOBuCdV4ZRr1fmM1ZoIfE4vaeYDnNJrK 7BKB/JcmmzQg2OzCMrdfrfoK/XnJ4oTxB+tml7cQ229MyBkxZ/NU2+0HuPbSzJXzUkfn tQOA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=i+C6MOf2; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z185si19325337pfb.109.2019.07.25.10.59.15; Thu, 25 Jul 2019 10:59:29 -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; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=i+C6MOf2; 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; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388263AbfGYO0Y (ORCPT + 99 others); Thu, 25 Jul 2019 10:26:24 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:35188 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727937AbfGYO0Y (ORCPT ); Thu, 25 Jul 2019 10:26:24 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x6PEPqXp117924; Thu, 25 Jul 2019 09:25:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1564064752; bh=zz+4xc5f556ik5dVIHkOBcpiQhkWRlNhJiib+8wLNDI=; h=Subject:To:CC:References:From:Date:In-Reply-To; b=i+C6MOf2C+7Ox6ak0GFOM3KZf2HLv2JdwWowGGpw+dStFh3oI9YR29IsZmMcKGJ16 55xzh94E3MaN9HD/A3tuOnkgZzSxuozxGm0NTYUMknyRake0JaerdMNii1T6ymAUe5 +TfCzJqEuH4pYmTq43p5uTgnQ3GWvObrtEWtR+eg= Received: from DLEE107.ent.ti.com (dlee107.ent.ti.com [157.170.170.37]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x6PEPqDK099670 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 25 Jul 2019 09:25:52 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE107.ent.ti.com (157.170.170.37) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 25 Jul 2019 09:25:52 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Thu, 25 Jul 2019 09:25:52 -0500 Received: from [10.250.86.29] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id x6PEPobU051141; Thu, 25 Jul 2019 09:25:51 -0500 Subject: Re: [PATCH v6 4/5] dma-buf: heaps: Add CMA heap to dmabuf heaps To: Christoph Hellwig CC: John Stultz , lkml , Laura Abbott , Benjamin Gaignard , Sumit Semwal , Liam Mark , Pratik Patel , Brian Starkey , Vincent Donnefort , Sudipto Paul , Xu YiPing , "Chenfeng (puck)" , butao , "Xiaqing (A)" , Yudongbin , Chenbo Feng , Alistair Strachan , dri-devel References: <20190624194908.121273-1-john.stultz@linaro.org> <20190624194908.121273-5-john.stultz@linaro.org> <20190718100840.GB19666@infradead.org> <20190724065958.GC16225@infradead.org> <8e6f8e4f-20fc-1f1f-2228-f4fd7c7c5c1f@ti.com> <20190725125014.GD20286@infradead.org> <0eae0024-1fdf-bd06-a8ff-1a41f0af3c69@ti.com> <20190725140448.GA25010@infradead.org> <8e2ec315-5d18-68b2-8cb5-2bfb8a116d1b@ti.com> <20190725141144.GA14609@infradead.org> From: "Andrew F. Davis" Message-ID: Date: Thu, 25 Jul 2019 10:25:50 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20190725141144.GA14609@infradead.org> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/25/19 10:11 AM, Christoph Hellwig wrote: > On Thu, Jul 25, 2019 at 10:10:08AM -0400, Andrew F. Davis wrote: >> Pages yes, but not "normal" pages from the kernel managed area. >> page_to_pfn() will return bad values on the pages returned by this >> allocator and so will any of the kernel sync/map functions. Therefor >> those operations cannot be common and need special per-heap handling. > > Well, that means this thing is buggy and abuses the scatterlist API > and we can't merge it anyway, so it is irrelevant. > Since when do scatterlists need to only have kernel virtual backed memory pages? Device memory is stored in scatterlists and dma_sync_sg_for_* would fail just the same when the cache ops were attempted.