Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp91195pxb; Wed, 18 Nov 2020 17:26:47 -0800 (PST) X-Google-Smtp-Source: ABdhPJxEZ66/TVAI21u3AAORhMmbCHT23us44Cx7Ii3cfiskfb7qcF06iO8IJkmIyWrb3w74/E6f X-Received: by 2002:a17:906:c41:: with SMTP id t1mr26397123ejf.19.1605749207479; Wed, 18 Nov 2020 17:26:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605749207; cv=none; d=google.com; s=arc-20160816; b=AHxW/Tdw26/fgdkV1YHxtt8RL8li0x8ZeDMPTkcEn3WWfduEIwlCxw0jsUElneeXj8 fwD7fP2VhZ5KLurh32Gec/5E6LoNXLU781CLoMqi1JHrUw2b6CmYa03K+5cotPcnDPyS N3oBI16fLKCPLWxsl53cInk821neeXjb/VohTWiD5VL5o/W1gyoq2TqfA9WrTC5eSX3/ suwPIaTl5BACyL5EMI9jv3oip5cwNpmxMW0/60s6cWbgHBm6uUk/KGNV+nJpc1LC/E7Y TtC09zmXm+QY57w0YxfrSA6CwcuRnSnrWFCqOldwLer6XNDe/gFnfXD0rbjKnRaJQ1OB 6Vcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:dlp-filter:cms-type:user-agent :in-reply-to:mime-version:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=LeXwRNKcehHWUG2cdfOqOVbePlLQRsG7q4c4w5O9DBo=; b=rtYSp5DI2xbrVILDtGThfX2Hi/11cx3Ou2p0KcuOjxkC0aM/qvD7Jq0UWiQd4eUPXH Oex8EClRMd/ovXaoYrgsDobWrZ43hZFZgm0WxuNBUYQHAldHCRTVBfjnkQ7NYRzJt2rF OLprdPWnmoAGnpyJnOsaraWJBlLkUGjcUw2B1HHHJoswsBGbRt6dWpTO+PVuCV97XbuY VW+UBFAIqFCEcXtnVLlTncsqymDQV+KC+ams9EOHofrsmgcYfc25xdcyTaTaw9nECUv8 nAk0eYzcD7T06YSF/ywlYevwMLBUdmvmNJLozvKdNE58D1PN6iOmRANabkik4FsbsbD9 BNpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="vIgC+/bB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i24si16091672eja.728.2020.11.18.17.26.24; Wed, 18 Nov 2020 17:26:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@samsung.com header.s=mail20170921 header.b="vIgC+/bB"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727078AbgKSBXy (ORCPT + 99 others); Wed, 18 Nov 2020 20:23:54 -0500 Received: from mailout2.samsung.com ([203.254.224.25]:58821 "EHLO mailout2.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725947AbgKSBXy (ORCPT ); Wed, 18 Nov 2020 20:23:54 -0500 Received: from epcas2p4.samsung.com (unknown [182.195.41.56]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20201119012352epoutp02593a01762b10ca87b17e73a9fb8aa93b~IxDy-Me_l2419524195epoutp02u for ; Thu, 19 Nov 2020 01:23:52 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20201119012352epoutp02593a01762b10ca87b17e73a9fb8aa93b~IxDy-Me_l2419524195epoutp02u DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1605749032; bh=LeXwRNKcehHWUG2cdfOqOVbePlLQRsG7q4c4w5O9DBo=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=vIgC+/bB2SsZYPQNAKz+UaYencBwyO4Vn91vCb+HDsqZZhyryyIi6EVsv+DBKHfX7 v0pZB5aIZC53KmB0QVH5pFYtumTtsaDWHKAskokidmM3wiiBSXgPGZw+EhkLUSzX/u Vur2v9pxlw38NaTnrT6TQIP6+MknB+pUpwyioVoU= Received: from epsnrtp3.localdomain (unknown [182.195.42.164]) by epcas2p2.samsung.com (KnoxPortal) with ESMTP id 20201119012351epcas2p21508f0bcfb2b90afe2f956c8e62f590b~IxDyU4sfq1488314883epcas2p2j; Thu, 19 Nov 2020 01:23:51 +0000 (GMT) Received: from epsmges2p2.samsung.com (unknown [182.195.40.182]) by epsnrtp3.localdomain (Postfix) with ESMTP id 4Cc2522LgqzMqYkr; Thu, 19 Nov 2020 01:23:50 +0000 (GMT) Received: from epcas2p3.samsung.com ( [182.195.41.55]) by epsmges2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 38.48.56312.429C5BF5; Thu, 19 Nov 2020 10:23:48 +0900 (KST) Received: from epsmtrp1.samsung.com (unknown [182.195.40.13]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20201119012348epcas2p25300933258a716781298cff068eb973a~IxDvaXDuZ2421724217epcas2p2G; Thu, 19 Nov 2020 01:23:48 +0000 (GMT) Received: from epsmgms1p2.samsung.com (unknown [182.195.42.42]) by epsmtrp1.samsung.com (KnoxPortal) with ESMTP id 20201119012348epsmtrp1199b2fe640195f011894329191b00ad4~IxDvZlY9P1094210942epsmtrp1D; Thu, 19 Nov 2020 01:23:48 +0000 (GMT) X-AuditID: b6c32a46-1d9ff7000000dbf8-e3-5fb5c924840f Received: from epsmtip1.samsung.com ( [182.195.34.30]) by epsmgms1p2.samsung.com (Symantec Messaging Gateway) with SMTP id C2.CE.08745.429C5BF5; Thu, 19 Nov 2020 10:23:48 +0900 (KST) Received: from KEI (unknown [12.36.155.227]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20201119012348epsmtip14dd99af005e62d55fbb42664e57008a2~IxDvRS-JD1546815468epsmtip1f; Thu, 19 Nov 2020 01:23:48 +0000 (GMT) Date: Thu, 19 Nov 2020 10:16:14 +0900 From: Hyesoo Yu To: Hillf Danton Cc: Minchan Kim , Andrew Morton , LKML , linux-mm , john.stultz@linaro.org, linux-media@vger.kernel.org Subject: Re: [PATCH 3/4] dma-buf: heaps: add chunk heap to dmabuf heaps Message-ID: <20201119011614.GB136599@KEI> MIME-Version: 1.0 In-Reply-To: <20201118090013.434-1-hdanton@sina.com> User-Agent: Mutt/1.5.24 (2015-08-30) X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprJJsWRmVeSWpSXmKPExsWy7bCmua7Kya3xBk/vm1rMWb+GzeLAz+cs Fmd+61pc3jWHzaJnw1ZWi3tr/rNaLPv6nt2B3WPTqk42j02fJrF73Lm2h83jxIzfLB6TXrh7 fN4kF8AWlWOTkZqYklqkkJqXnJ+SmZduq+QdHO8cb2pmYKhraGlhrqSQl5ibaqvk4hOg65aZ A3SJkkJZYk4pUCggsbhYSd/Opii/tCRVISO/uMRWKbUgJafA0LBArzgxt7g0L10vOT/XytDA wMgUqDIhJ2PV+X/MBRc4K9bs/8jcwPiQvYuRk0NCwETiw9m5zF2MXBxCAjsYJbpPzGMCSQgJ fGKUuDNVHSLxmVGif+FRFpiOla2rGSESuxgltuzbywbhPGSU2Lz4GtAsDg4WAVWJo/+TQRrY BNQlTmxZxghiiwgoS3RemMUKUs8scIZRYuZRkHpODmEBd4lJnw6ygPTyCmhK7DttARLmFRCU ODnzCdhiTqDFyxbsYAUpERVQkXh1sB5kjIRAK4dE36lbrBDHuUjMfrUMyhaWeHV8C9SbUhIv +9ug7HKJsy2PWCGaWxglLk67ygaRMJaY9awd7FBmg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/HCBhTqCTly3YwQoSFhVQkXh1sH4Co+AsJM2zkDTP QmhewMi8ilEytaA4Nz232LDAKC+1XK84Mbe4NC9dLzk/dxMjOAa0tHYw7ln1Qe8QIxMH4yFG CQ5mJRHetZpb44V4UxIrq1KL8uOLSnNSiw8xSnOwKInzfp21ME5IID2xJDU7NbUgtQgmy8TB KdXANHP9m+o/Dqtrhe6lMX/4E1n4z8yNc9eB+WZuKl/vt8p9f/Ncgz3k5syNG71UvunNPOj9 R0Iv8thM9yusaRMWv3o587VE1Gl2XRehqbsc5ufwZnw6fWnlxPssqvzBF2YIusoFic/PXBP5 +oZdd5wyk01GYJv8XVbPvA/y4ZWL7W5M7NqmoWLQ+nPVJ9Gcy3ElV2V5/WrTTUQVN3apNIrW uJ7kCq29vGYO36T+jbu7NPcKNAmw/iyQ5Sr7sD9xjstttl2X46Wd6jVWvFXRz0yYwzf/dKP2 vSgx37MZ/g/cv+90E1zYrhg7Qa1vg3t41WH/zowXbernBF+u/Nn/cqVQ2b9jbSsWmpm+UX36 x49RiaU4I9FQi7moOBEAn5Cc1vACAAA= X-CMS-MailID: 20201119012348epcas2p25300933258a716781298cff068eb973a X-Msg-Generator: CA Content-Type: multipart/mixed; boundary="----4WYzU9ra2zsysXCCwV9o7Bet81fjsxgzse5jnxws3Y-xTz8o=_15f447_" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20201118090020epcas2p3244a130a7b02a42127213a0b99f90291 References: <20201117181935.3613581-1-minchan@kernel.org> <20201118090013.434-1-hdanton@sina.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org ------4WYzU9ra2zsysXCCwV9o7Bet81fjsxgzse5jnxws3Y-xTz8o=_15f447_ Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline Hello, Hillf danton. On Wed, Nov 18, 2020 at 05:00:13PM +0800, Hillf Danton wrote: > On Tue, 17 Nov 2020 10:19:34 -0800 Minchan Kim wrote: > + > +static int chunk_heap_mmap(struct dma_buf *dmabuf, struct vm_area_struct *vma) > +{ > + struct chunk_heap_buffer *buffer = dmabuf->priv; > + struct sg_table *table = &buffer->sg_table; > + unsigned long addr = vma->vm_start; > + struct sg_page_iter piter; > + int ret; > + > + for_each_sgtable_page(table, &piter, vma->vm_pgoff) { > + struct page *page = sg_page_iter_page(&piter); > + > + ret = remap_pfn_range(vma, addr, page_to_pfn(page), PAGE_SIZE, > + vma->vm_page_prot); > + if (ret) > + return ret; > + addr = PAGE_SIZE; > > Typo? > addr += PAGE_SIZE; > Yes, It is typo. I will change it. Thanks for your review. Regards. > + if (addr >= vma->vm_end) > + return 0; > + } > + return 0; > +} > ------4WYzU9ra2zsysXCCwV9o7Bet81fjsxgzse5jnxws3Y-xTz8o=_15f447_ Content-Type: text/plain; charset="utf-8" ------4WYzU9ra2zsysXCCwV9o7Bet81fjsxgzse5jnxws3Y-xTz8o=_15f447_--