From patchwork Mon May 21 22:35:19 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 10417009 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 1940A600CC for ; Mon, 21 May 2018 22:45:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0703428AB7 for ; Mon, 21 May 2018 22:45:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF68028AD3; Mon, 21 May 2018 22:45:19 +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 5D9DA28AB7 for ; Mon, 21 May 2018 22:45:19 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 715516B0005; Mon, 21 May 2018 18:45:18 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 69CB16B0006; Mon, 21 May 2018 18:45:18 -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 53FBF6B0007; Mon, 21 May 2018 18:45:18 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f200.google.com (mail-pf0-f200.google.com [209.85.192.200]) by kanga.kvack.org (Postfix) with ESMTP id 116E36B0005 for ; Mon, 21 May 2018 18:45:18 -0400 (EDT) Received: by mail-pf0-f200.google.com with SMTP id z5-v6so9951647pfz.6 for ; Mon, 21 May 2018 15:45:18 -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=rTwPqvfbZ5YAGaMSnDESrPpjRk+rsrl7Iqvz2fiCRaIzcopxXVHH/AxPQOC06E8aGu lxTRZ9cI1h3Jzmr9UyzX39igivaGRVdC0Vuq4AdHllqohEaNLaxvZY0Kd6pcgcEDUu1k pLOCacqyPDzv4/621cs1JuSycr5+VuFgeMDxNxp7gsIn2/niLPO8VEBee8mahnBTKZqr 8RwtAHhlDCYMFVGwWfPpSKPSCLWhVA19soiZDHUONP9Pf2P7ypP5nrPlXqSXKs56DQQ6 LNxNEvNbtTLIJvcOfxkiYeBQ2KUj9VYXHXua6t46o6pNpEQxDlndl+5lAJuuVuZ9Pmxc 61hg== 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: ALKqPwdNsdunimA8NoOrHWjSKfwhObkIDXxjqqB2/JPXWFVi+TnceBUr AShtdPH+Wyks2HiK0CCzoMXUh+krxrqDkEL7z8JNmpGDdofyS6F+0If10uT8KxKxHiCwz768i+K gOolShtzKEXczkcR0iqt4b9b51d9bZm7XgPaMcCJ5PaUhuXDFCI/WfhMOFSiT6659jQ== X-Received: by 2002:a62:3889:: with SMTP id f131-v6mr21698825pfa.173.1526942717732; Mon, 21 May 2018 15:45:17 -0700 (PDT) X-Google-Smtp-Source: AB8JxZohkLnmwdUFT25aCnLXJpLUw8i601jyvYnmv7TWwePFt5PIQ4C7PJS+wJ4yG6c6QSxnKqxo X-Received: by 2002:a62:3889:: with SMTP id f131-v6mr21698790pfa.173.1526942717043; Mon, 21 May 2018 15:45:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526942717; cv=none; d=google.com; s=arc-20160816; b=O1RDMDlc9WjrwDx0F7fFSjhy3ms99TujhD19ffCZQlZewqzwEhGp4wrdEBFws5XuP6 D2jDHh5hHHqGwyRlybNwnErbCFRX3f3QiumghNP58Yeo+w3z8b93SFMmTpq+YmBaIGcE rsczieGYInupKb/vgGnS92Xy6i2fGP/zLotswQkIrwNT/pC3M8ZKH0/6BpsTUXMMwlt2 af+QKsq5AQ4pLYQyZrrNsvR68h0QiVW22jYTLqQ1cvRxJ1TEDt6asCX5oJ0UlQ4805NP JTYgEv24XBeFhxi3ZEhFYoR2UPN4wyOuTpRG1yIATEnFdVhda4ZNZoqcnzSfZqKqypVg QFvQ== 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=BfMp+qgWfbwNhLGX/4cqZKggpxvDXsdF2ldAuKHUPW0ZDBNsONxcuetR3aF1B2v5aI FI7qGouLusu1msELDww30R4czVyfnOTMIBJrMWWW9+Fm0V8KKQhx87H8UsJRSvTKHPa1 AOFwVW+rxv/wntEqqm3KHajXl2POffBU2AODQAJh40egStpC+qJcxh9v2+9+Ou6UHNOP Nb9nxk4exIO/2lIOS3SlSsZ2xHgRgF7+yNoWwXPlKQq8po/7D1Zs2QJxiLPa9J4FweqM JC7KUOMBLbnsU94FoW02PCrATTCi1ssrBwX2rDtbKgg2wHjny+EAgfpQOcFxW+89+DI3 7w2g== 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 q4-v6si14733878plb.312.2018.05.21.15.45.16 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 May 2018 15:45:17 -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 orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 21 May 2018 15:45:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.49,427,1520924400"; d="scan'208";a="226135701" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga005.jf.intel.com with ESMTP; 21 May 2018 15:45:16 -0700 Subject: [PATCH 1/5] 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: Mon, 21 May 2018 15:35:19 -0700 Message-ID: <152694211948.5484.5084180448502160279.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <152694211402.5484.2277538346144115181.stgit@dwillia2-desk3.amr.corp.intel.com> References: <152694211402.5484.2277538346144115181.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) {