Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp75097pxb; Tue, 17 Nov 2020 21:23:01 -0800 (PST) X-Google-Smtp-Source: ABdhPJw8xRCO9W7ibyRA+7JNRCZremeroepOLjTQgWYOPD61mk6/RbhS5gvA6ALz6cEsqkeByXlC X-Received: by 2002:aa7:d7d7:: with SMTP id e23mr5312602eds.78.1605676980960; Tue, 17 Nov 2020 21:23:00 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605676980; cv=none; d=google.com; s=arc-20160816; b=qKHOXVZ0D+RLYPhIHSlx5u1ZpTwBT1NOrMnGQ6JUhdBG5kLbyUl+dGUSRnYeIJoLVJ QXx8/DHdBjWzY0t6KWU6Jb3bOhrwm9HrpsNFdryOKaQ9ym8CcROg9C4kjOUStm06YLcy rZp63aQXufkYtmmMMAGuFoSW1rXkCwsDcQAuPy2fiLN6B8Tl+U52oL6mrqcpODyAIjoe 43Zra4jLluRcUVuQ8YvSvDU1zft/OWREBAt7N5dW01czvCnaGfbzFH0oAEaFzSfbnPnI de59FeAl2ZDkBIVrokm6KdFAxcD+pgAkTnkV6fQn1Jd0WZTj0JQUwUaqb/x2J7dIdfWT JuVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=F7sKJwkzdbeLOyKiVuDYfrrRTcjeln31HNpMolHCz84=; b=AcWD/CfPZsW/glSHSYFs2aLh8+OnIGmcP1WfliG3hzMMSwr8KX0RZIzF7CRNKMQvvM URKhBTscMij+TcqV9U0udT4O+K88ptJ8XZim9clWljG0hKTU7re86cPoM6vwo1IT20Uq CwU5kNkIHoY+lT9xAuPVhTZLeYgREdNO59HML8G4O7bC8/rtWA56o0ruPM+E9nk/vN5Z QtVxjcau01TvUMVr9B5N3REhIakNeig+dwczX3mhWLeBwN8On3ZoZ2TUmUwfv6pZq8ZV VfMv1nS8RwLDAksxoM8K76Tv7W0H9aW6X5kF4LtcdLk9NtxQtQViRYzoyDNTArrfTobc 0Hgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=dhgZBRUw; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si2075722edy.19.2020.11.17.21.22.38; Tue, 17 Nov 2020 21:23:00 -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=@linaro.org header.s=google header.b=dhgZBRUw; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726234AbgKRFSb (ORCPT + 99 others); Wed, 18 Nov 2020 00:18:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38812 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725772AbgKRFSb (ORCPT ); Wed, 18 Nov 2020 00:18:31 -0500 Received: from mail-ot1-x344.google.com (mail-ot1-x344.google.com [IPv6:2607:f8b0:4864:20::344]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09CC2C061A4D for ; Tue, 17 Nov 2020 21:18:31 -0800 (PST) Received: by mail-ot1-x344.google.com with SMTP id f16so586061otl.11 for ; Tue, 17 Nov 2020 21:18:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=F7sKJwkzdbeLOyKiVuDYfrrRTcjeln31HNpMolHCz84=; b=dhgZBRUwhlMJGYy5B5kg0/hTc+PVW/P9fwbxUQJYELxJr3sFTgqZUB3YOpBKAzffVk DY8UNWEqVw/HybCxEg7v6elONW5OXpewFmWZL47EXnXpZ8KRUpN25OyEbQ9waYsX2RYx Z7M6iEvChYlW5DZl2OVnarihlbMHfZ+iw9QzaRzN3biQjmkcdmZfzEv9o1SvTTS68wEa j8YjGL9BGrbAOtVkCtPFjv7oRrzDU3i75AjHiOH8d7M/p3Fs5gn7lA76LSbCUU4yP3Pf y279jWnjt9FlaQSVf4leq5rK885Ko1y0Kv581qhqm/jDkmphNYUXOMTTDpKcLJGF9Wct d2EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=F7sKJwkzdbeLOyKiVuDYfrrRTcjeln31HNpMolHCz84=; b=FFBEeyuECyUFcRYgMbWuA20iQORMnkOTwg7vwM+UhIyRIIUJRRijYxf/RUfmanW+Df 3i5vCC1UwznvonZChq4W6xzt2DL+mAZKDBSBNyD94UA3sPwSrt/5XbjVZMxT2hkvBxew LwhxnoqcBSaxG3sfU1xeeD/QeBnsm6+Acg0idQmMGXGceDBgIel+CCMsCto66z6/p3b5 H0XYp9WlAtTp72czQ2GJlPqjEDsGoWNzVq/FOMxnYwxeXM+ugryEjLE1+RmsGvRcupvT 4CaoD13JDtP+qWrurmiIJbQsMvsOz8CB2KCKQ/qxFWgVk5Z8DnJfJeVhn+KXfu24aSZ7 2LiA== X-Gm-Message-State: AOAM533B9H15qKN27oaPPzt+ugplUkW4djhW6jvSJDy+bJTp5npV/FBG 3ey3xO7VmY854reN59CH//yHL1UYUyfGOoP2rpACSg== X-Received: by 2002:a9d:64ce:: with SMTP id n14mr5354340otl.352.1605676710354; Tue, 17 Nov 2020 21:18:30 -0800 (PST) MIME-Version: 1.0 References: <20201117181935.3613581-1-minchan@kernel.org> <20201117181935.3613581-3-minchan@kernel.org> In-Reply-To: <20201117181935.3613581-3-minchan@kernel.org> From: John Stultz Date: Tue, 17 Nov 2020 21:18:17 -0800 Message-ID: Subject: Re: [PATCH 2/4] dma-buf: add export symbol for dma-heap To: Minchan Kim Cc: Andrew Morton , LKML , linux-mm , Hyesoo Yu , Matthew Wilcox , david@redhat.com, iamjoonsoo.kim@lge.com, vbabka@suse.cz, Suren Baghdasaryan , KyongHo Cho , John Dias , Hridya Valsaraju , Sumit Semwal , Brian Starkey , linux-media , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Rob Herring , Christian Koenig , "moderated list:DMA BUFFER SHARING FRAMEWORK" , Christoph Hellwig Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Nov 17, 2020 at 10:19 AM Minchan Kim wrote: > > From: Hyesoo Yu > > The heaps could be added as module, so some functions should > be exported to register dma-heaps. And dma-heap of module can use > cma area to allocate and free. However the function related cma > is not exported now. Let's export them for next patches. > > Signed-off-by: Hyesoo Yu > Signed-off-by: Minchan Kim > --- > drivers/dma-buf/dma-heap.c | 2 ++ > mm/cma.c | 3 +++ > 2 files changed, 5 insertions(+) > > diff --git a/drivers/dma-buf/dma-heap.c b/drivers/dma-buf/dma-heap.c > index afd22c9dbdcf..cc6339cbca09 100644 > --- a/drivers/dma-buf/dma-heap.c > +++ b/drivers/dma-buf/dma-heap.c > @@ -189,6 +189,7 @@ void *dma_heap_get_drvdata(struct dma_heap *heap) > { > return heap->priv; > } > +EXPORT_SYMBOL_GPL(dma_heap_get_drvdata); > > struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info) > { > @@ -272,6 +273,7 @@ struct dma_heap *dma_heap_add(const struct dma_heap_export_info *exp_info) > kfree(heap); > return err_ret; > } > +EXPORT_SYMBOL_GPL(dma_heap_add); > > static char *dma_heap_devnode(struct device *dev, umode_t *mode) > { Thanks so much for sending this series along! I'm ok with the dma-heap exports to support modules. > diff --git a/mm/cma.c b/mm/cma.c > index 7c11ec2dc04c..87834e2966fa 100644 > --- a/mm/cma.c > +++ b/mm/cma.c > @@ -54,6 +54,7 @@ const char *cma_get_name(const struct cma *cma) > { > return cma->name; > } > +EXPORT_SYMBOL_GPL(cma_get_name); > > static unsigned long cma_bitmap_aligned_mask(const struct cma *cma, > unsigned int align_order) > @@ -498,6 +499,7 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align, > pr_debug("%s(): returned %p\n", __func__, page); > return page; > } > +EXPORT_SYMBOL_GPL(cma_alloc); > > /* > * cma_alloc_bulk() - allocate high order bulk pages from contiguous area with > @@ -641,6 +643,7 @@ bool cma_release(struct cma *cma, const struct page *pages, unsigned int count) > > return true; > } > +EXPORT_SYMBOL_GPL(cma_release); > > int cma_for_each_area(int (*it)(struct cma *cma, void *data), void *data) > { > -- Though Christoph's (cc'ed) input would probably be good for the cma ones, as I know he had concerns previously with similar patches. thanks -john