[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191003085528.GB21629@arrakis.emea.arm.com>
Date: Thu, 3 Oct 2019 09:55:28 +0100
From: Catalin Marinas <catalin.marinas@....com>
To: Mark Salyzyn <salyzyn@...roid.com>
Cc: linux-kernel@...r.kernel.org, kernel-team@...roid.com,
Andrew Morton <akpm@...ux-foundation.org>,
Yue Hu <huyue2@...ong.com>, Mike Rapoport <rppt@...ux.ibm.com>,
Will Deacon <will@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ryohei Suzuki <ryh.szk.cmnty@...il.com>,
Doug Berger <opendmb@...il.com>,
Andrey Konovalov <andreyknvl@...gle.com>,
Peng Fan <peng.fan@....com>, linux-mm@...ck.org,
Christoph Hellwig <hch@....de>,
Robin Murphy <robin.murphy@....com>
Subject: Re: [PATCH] mm: export cma alloc and release
On Wed, Oct 02, 2019 at 02:22:48PM -0700, Mark Salyzyn wrote:
> Some drivers can not be turned into a module without cma_alloc and
> cma_release exported. Examples include ion, and we also found some
> out of tree infiniband and camera drivers.
>
> Signed-off-by: Mark Salyzyn <salyzyn@...roid.com>
> Cc: kernel-team@...roid.com
> Cc: linux-kernel@...r.kernel.org
> ---
> mm/cma.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/mm/cma.c b/mm/cma.c
> index 7fe0b8356775..65d830eea3b1 100644
> --- a/mm/cma.c
> +++ b/mm/cma.c
> @@ -500,6 +500,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_release() - release allocated pages
> @@ -533,6 +534,7 @@ bool cma_release(struct cma *cma, const struct page *pages, unsigned int count)
>
> return true;
> }
> +EXPORT_SYMBOL_GPL(cma_release);
Aren't drivers supposed to use the DMA API for such allocations rather
than invoking cma_*() directly?
--
Catalin
Powered by blists - more mailing lists