linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Catalin Marinas <catalin.marinas@arm.com>
To: Mark Salyzyn <salyzyn@android.com>
Cc: linux-kernel@vger.kernel.org, kernel-team@android.com,
	Andrew Morton <akpm@linux-foundation.org>,
	Yue Hu <huyue2@yulong.com>, Mike Rapoport <rppt@linux.ibm.com>,
	Will Deacon <will@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ryohei Suzuki <ryh.szk.cmnty@gmail.com>,
	Doug Berger <opendmb@gmail.com>,
	Andrey Konovalov <andreyknvl@google.com>,
	Peng Fan <peng.fan@nxp.com>,
	linux-mm@kvack.org, Christoph Hellwig <hch@lst.de>,
	Robin Murphy <robin.murphy@arm.com>
Subject: Re: [PATCH] mm: export cma alloc and release
Date: Thu, 3 Oct 2019 09:55:28 +0100	[thread overview]
Message-ID: <20191003085528.GB21629@arrakis.emea.arm.com> (raw)
In-Reply-To: <20191002212257.196849-1-salyzyn@android.com>

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@android.com>
> Cc: kernel-team@android.com
> Cc: linux-kernel@vger.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


  reply	other threads:[~2019-10-03  8:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-02 21:22 [PATCH] mm: export cma alloc and release Mark Salyzyn
2019-10-03  8:55 ` Catalin Marinas [this message]
2019-10-05  8:37   ` Christoph Hellwig
2019-10-07 16:50     ` Mark Salyzyn
2019-10-07 16:53       ` Christoph Hellwig
2019-10-07 17:06         ` Mark Salyzyn

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191003085528.GB21629@arrakis.emea.arm.com \
    --to=catalin.marinas@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=andreyknvl@google.com \
    --cc=hch@lst.de \
    --cc=huyue2@yulong.com \
    --cc=kernel-team@android.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=opendmb@gmail.com \
    --cc=peng.fan@nxp.com \
    --cc=robin.murphy@arm.com \
    --cc=rppt@linux.ibm.com \
    --cc=ryh.szk.cmnty@gmail.com \
    --cc=salyzyn@android.com \
    --cc=tglx@linutronix.de \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).