Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp70013ybg; Fri, 25 Oct 2019 16:51:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyqYR16m1i2Du/NFlEtE8T+Td/7j5swzFgC/WOBiEwGlsnJVzXZmOvXX4R0NaVtU9zD6C4t X-Received: by 2002:a50:8a90:: with SMTP id j16mr7068191edj.283.1572047511084; Fri, 25 Oct 2019 16:51:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572047511; cv=none; d=google.com; s=arc-20160816; b=RjWe2Waxe6NqaGFwXaIKwikpussLEAAXr9O4+u8jYTTsW1kXMpeKBqkaDAmb90tdDu 8q593RZnVcyiBnP6LFyDJHu1cFgpYtGwRyd9wHhzg3kJyhzS1skJExiEqm7hFzHWVPum Hs9GM8g5bzRFJJ25/m8OJw5FHs/d8vCaLp7KtnjIwQqOiG0xdMAyq8QCcFCNaH0kwV5d XtDl+pBcR71PLN1xxaBvVE10YtSb0SObwdyfPYew6CtAsvxDJmbvSBduHTkyUb4AdVS8 yDLghbjezZrSA1/RIyTzDvrOujTHOsuqCCG/zfYuxWal8P1c9gdrML+Cpu5lsAC29bTM OfWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=kpP5L5ZL9jr9Wuirrq/wpxNCtz1x33e9wP9JwvG83tE=; b=xSokwgm8NC4hDyrjVuO+Gcl7Dwd7B1/LbXkyZNaiM96/ydP7v/J4mAhBjBflOQzNym qzbV+q6E0g+SVBbf3JZkzJN5ECuwhQsqUJZDAlMdL+YvwxCEe7jfJEQJ/eUxNhKHboxO 6mRGhYYd3vVHoh+/8bwLo9hh7yRtrXs0xhXWJH01qLnW9x/1CCEDLEB7I0kg3dO0pnPd 2ykl0Pu3k/XRjd3cV83JJg2yiZmYPv6YlAJfF3MrULhrvtLS0FicKDU4SRiyAnzoxNVL xzbK19J2NShxchE/X+/RYAvfMHgef58MhLW90nAkYGcGLcsGVF7JSdlyGAJPlfgw3G2X 4AaA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aH+q1oJw; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c36si2707296edf.165.2019.10.25.16.51.27; Fri, 25 Oct 2019 16:51:51 -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=@linaro.org header.s=google header.b=aH+q1oJw; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725919AbfJYXsl (ORCPT + 99 others); Fri, 25 Oct 2019 19:48:41 -0400 Received: from mail-pl1-f195.google.com ([209.85.214.195]:36458 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725847AbfJYXsk (ORCPT ); Fri, 25 Oct 2019 19:48:40 -0400 Received: by mail-pl1-f195.google.com with SMTP id g9so1536131plp.3 for ; Fri, 25 Oct 2019 16:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=kpP5L5ZL9jr9Wuirrq/wpxNCtz1x33e9wP9JwvG83tE=; b=aH+q1oJwle0nqOjUevAI2mb8wKUrtDhyNCymP6wx1Ejk2vXIr1dGQFtWul5+98jwl5 NO9Iy0gKcfG72k6QZO9qhdGo7LSYi0XtxBHzmFcp9Isx9v1/v6olIDuSiz8ZyEYNQEib ibY4cf3DmZZuXO/k7TCOxJOoVEUq1q9IGNs9O36Zv62yADhnhDv/ea+isimPR9ixiX0J S7AVKbruLRl+6+C5qP1BB4gA+aaGLy3wtcy1dJhqRG5Y7KeXR9sDkspCuLQZPbL0Am4L KYy8KYY6fS36vL5cyXVmwC9VUEPcZHQJ6gcR7JBqhiYKRIA0N07LPYw1nkLntijgcZZg s5/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=kpP5L5ZL9jr9Wuirrq/wpxNCtz1x33e9wP9JwvG83tE=; b=qTXhFNilk1NDiuw8pBTB2vJPIkxrlg1/qvzu3mAcp8pNlrQNTWux2EOxLOGlASB6HE I0WRC67Hbtzvs9FKgiokBFj6nwYn72cXMYDmndglzuVNBeIduO0j84DRm3Glhegla/B6 8MQupbnKQ9aXrhSBCTjpABL+8KQmgiwK76Ak9byS5vDBjyuq8A6RRfZOhGBpEMeThQEE 781suiJ1d+46jIzvCCX97iMampFxxFAZkK5h/ogHa5tkrGnUCsK3CqI4twpvsarBMEsy CE2gUlMKgq9tWL5fwLCZ7z8/KuMxE/PHCBiYG3g+SnovcOEeobgs3IHzcv/uckhMK3qi tE1w== X-Gm-Message-State: APjAAAVmY5UpCEZPUv+7Fgn6/IbTzFckT1bqY1bfNjtLZkaxLC3G5g16 14ru84pbDR2El0LXBocOm7tTJmLu/24= X-Received: by 2002:a17:902:aa07:: with SMTP id be7mr6818499plb.242.1572047319332; Fri, 25 Oct 2019 16:48:39 -0700 (PDT) Received: from localhost.localdomain ([2601:1c2:680:1319:692:26ff:feda:3a81]) by smtp.gmail.com with ESMTPSA id cx22sm2817179pjb.19.2019.10.25.16.48.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 25 Oct 2019 16:48:38 -0700 (PDT) From: John Stultz To: lkml Cc: Sandeep Patil , Laura Abbott , Benjamin Gaignard , Sumit Semwal , Liam Mark , Pratik Patel , Brian Starkey , "Andrew F . Davis" , Andrew Morton , Yue Hu , Mike Rapoport , Chenbo Feng , Alistair Strachan , Hridya Valsaraju , dri-devel@lists.freedesktop.org, John Stultz Subject: [RFC][PATCH 1/2] mm: cma: Export cma symbols for cma heap as a module Date: Fri, 25 Oct 2019 23:48:33 +0000 Message-Id: <20191025234834.28214-2-john.stultz@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20191025234834.28214-1-john.stultz@linaro.org> References: <20191025234834.28214-1-john.stultz@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Sandeep Patil Export cma_get_name, cma_alloc, cma_release, cma_for_each_area and dma_contiguous_default_area so that we can use these from the dmabuf cma heap when it is built as module. Cc: Laura Abbott Cc: Benjamin Gaignard Cc: Sumit Semwal Cc: Liam Mark Cc: Pratik Patel Cc: Brian Starkey Cc: Andrew F. Davis Cc: Andrew Morton Cc: Yue Hu Cc: Mike Rapoport Cc: Chenbo Feng Cc: Alistair Strachan Cc: Sandeep Patil Cc: Hridya Valsaraju Cc: dri-devel@lists.freedesktop.org Signed-off-by: Sandeep Patil [jstultz: Rewrote commit message, added dma_contiguous_default_area to the set of exported symbols] Signed-off-by: John Stultz --- kernel/dma/contiguous.c | 1 + mm/cma.c | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/kernel/dma/contiguous.c b/kernel/dma/contiguous.c index 69cfb4345388..ff6cba63ea6f 100644 --- a/kernel/dma/contiguous.c +++ b/kernel/dma/contiguous.c @@ -31,6 +31,7 @@ #endif struct cma *dma_contiguous_default_area; +EXPORT_SYMBOL(dma_contiguous_default_area); /* * Default global CMA area size can be defined in kernel's .config. diff --git a/mm/cma.c b/mm/cma.c index 7fe0b8356775..db4642e58058 100644 --- a/mm/cma.c +++ b/mm/cma.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include @@ -54,6 +55,7 @@ const char *cma_get_name(const struct cma *cma) { return cma->name ? cma->name : "(undefined)"; } +EXPORT_SYMBOL_GPL(cma_get_name); static unsigned long cma_bitmap_aligned_mask(const struct cma *cma, unsigned int align_order) @@ -500,6 +502,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 +536,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) { @@ -547,3 +551,4 @@ int cma_for_each_area(int (*it)(struct cma *cma, void *data), void *data) return 0; } +EXPORT_SYMBOL_GPL(cma_for_each_area); -- 2.17.1