From patchwork Wed May 23 05:10:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 10420155 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C3D3A6016C for ; Wed, 23 May 2018 05:20:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B017128E95 for ; Wed, 23 May 2018 05:20:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A0564290A4; Wed, 23 May 2018 05:20:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 164C528E95 for ; Wed, 23 May 2018 05:20:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A676C6B0005; Wed, 23 May 2018 01:20:21 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id A16FD6B0006; Wed, 23 May 2018 01:20:21 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 92FC86B0007; Wed, 23 May 2018 01:20:21 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f70.google.com (mail-pl0-f70.google.com [209.85.160.70]) by kanga.kvack.org (Postfix) with ESMTP id 4F02C6B0005 for ; Wed, 23 May 2018 01:20:21 -0400 (EDT) Received: by mail-pl0-f70.google.com with SMTP id bd7-v6so13558568plb.20 for ; Tue, 22 May 2018 22:20:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:subject:from :to:cc:date:message-id:in-reply-to:references:user-agent :mime-version:content-transfer-encoding; bh=YXhkn9RDY+F0VFFfQTZ90EfSe7i+ZGtYkUHxbykKWsk=; b=Gpju38yinxOZ/NTNy7/qBW9iYjsCZnOQNg5asVF2Skinfw4JChWxTRcRU5rugQAM1S f9A+Gm88i1wy77LcRmoYvlwXsxzZP7HaG8ekH99Ql8tIlB5JYJQ7Yu5/ZiWvNG5U/yRO /3+BaJkfE0KlbSuIq8XbkkCdd2I1xQyBR8wq4vyMooVttec7KcEk9GPY4P9KA7Wvhb2N xQil7TXpt36Yg7GBKkRLaI3FV6xv7IUtq5a1aGBFXNMOkFMNXab5eEsRAPmKhUKf2gRv 8WQSWWNbIVwMf/zSErhkgd87o0Fm+1QS7o6QODbJuCMP6gmNXlQmU4X0/6gEk8IARbRQ 62Og== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.120 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: ALKqPweR+MXYgVnaJuagQMSR8DrMna7q7nY2PrNYJimdWa/gszZYC1E8 3o4RdFwnaCyEuM0+Q6Sba3I7+9UjLET2jRTufU09sN8p0XdHfe/hX3zUrBmTr17LDDc1Y4US1g8 f41pXxSk3HsOKIdwHKtYvBTRzu4BZRrgaI7YWUG1+bVqjSk1hFqpimrm0k1tp4vWiog== X-Received: by 2002:a62:828c:: with SMTP id w134-v6mr1407940pfd.138.1527052820996; Tue, 22 May 2018 22:20:20 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpKYFfUozcIgp+JK7t5XAxGhQAAXOIG3AScMkclWTiUsILaNMWASi34PfwzVf8lztH9g5OL X-Received: by 2002:a62:828c:: with SMTP id w134-v6mr1407903pfd.138.1527052820198; Tue, 22 May 2018 22:20:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527052820; cv=none; d=google.com; s=arc-20160816; b=FcNXzx314KSHv93+QC2QH0dL27pvvnf6QPPVcJ9ZH62wgpfPIwe4ZDLUQPELcOEvd0 AQ4JT43nzIORgt8RDRhLDf33U//anbzAIuXB0OKvnQuRSCUnsg3qPQCV+JiUgP2gE+Yr XJRVEtjQcT2C01xuD7b3TaynA6tBSPWR2J+mECkgdfc9D8Q9Y7Gnibpv9uYJpGt44o41 irWmtwyrvx6+pQ7RYJzgxd30lY5yoIsBqMuSFVBfRHSICZ5oh13c51YeTzqvIfkQwHPw 4mrGKlY9tsvMbiBjf5yivfP6KMPWA4VwX3OSc8M3E9biqGrdh6JD5h3DtoZEyllnjQFO XvRw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:references :in-reply-to:message-id:date:cc:to:from:subject :arc-authentication-results; bh=YXhkn9RDY+F0VFFfQTZ90EfSe7i+ZGtYkUHxbykKWsk=; b=Er1QDZQ6bP7r2nULAXx1LFbws1xvME3yon8hRBlPltcX1fW5tgsTYEKNLjKK67l+q1 us6F9IDdoYLcSkCUW/wP9O1myEQHhdw9pVoe0g5+4tTX4xT0oSKaWPHxDEI9TWhw7b9C 7s/57AuNa7vRnWjRCwyQ3YAATH3HNzC1TKMU2y8bHRcnX3nRgc3LjX+FXYxNJ11ZiGZ7 PzPq6QLeiZvdFD0e39EHCzmMDK1z1Rh0GVf1Bmly88RUWfHOxD/+xMrDioYNojThi2uv ZObGO13kl23U61RySYTF+T1ROoXq8Svp6CJtJuNyAA4kT3fGKj8qmYt8I/ox0jZKZup3 b2Rw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.120 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga04.intel.com (mga04.intel.com. [192.55.52.120]) by mx.google.com with ESMTPS id y34-v6si18372184plb.317.2018.05.22.22.20.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 May 2018 22:20:20 -0700 (PDT) Received-SPF: pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.120 as permitted sender) client-ip=192.55.52.120; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.120 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 May 2018 22:20:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,431,1520924400"; d="scan'208";a="56790074" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by fmsmga004.fm.intel.com with ESMTP; 22 May 2018 22:20:19 -0700 Subject: [PATCH v2 1/7] mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL From: Dan Williams To: akpm@linux-foundation.org Cc: Michal Hocko , =?utf-8?b?SsOpcsO0bWU=?= Glisse , Christoph Hellwig , linux-mm@kvack.org, linux-kernel@vger.kernel.org Date: Tue, 22 May 2018 22:10:22 -0700 Message-ID: <152705222281.21414.13452614856895978739.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <152705221686.21414.771870778478134768.stgit@dwillia2-desk3.amr.corp.intel.com> References: <152705221686.21414.771870778478134768.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP The devm_memremap_pages() facility is tightly integrated with the kernel's memory hotplug functionality. It injects an altmap argument deep into the architecture specific vmemmap implementation to allow allocating from specific reserved pages, and it has Linux specific assumptions about page structure reference counting relative to get_user_pages() and get_user_pages_fast(). It was an oversight that this was not marked EXPORT_SYMBOL_GPL from the outset. Cc: Michal Hocko Cc: "Jérôme Glisse" Reviewed-by: Christoph Hellwig Signed-off-by: Dan Williams --- kernel/memremap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/memremap.c b/kernel/memremap.c index 895e6b76b25e..c614645227a7 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -429,7 +429,7 @@ void *devm_memremap_pages(struct device *dev, struct dev_pagemap *pgmap) pgmap_radix_release(res, pgoff); return ERR_PTR(error); } -EXPORT_SYMBOL(devm_memremap_pages); +EXPORT_SYMBOL_GPL(devm_memremap_pages); unsigned long vmem_altmap_offset(struct vmem_altmap *altmap) {