From patchwork Tue Jun 19 06:04:44 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 10473309 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 E5FDF60383 for ; Tue, 19 Jun 2018 06:14:45 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E793928C14 for ; Tue, 19 Jun 2018 06:14:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC6DF28C2B; Tue, 19 Jun 2018 06:14:45 +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 7E64F28C14 for ; Tue, 19 Jun 2018 06:14:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D3DC46B0005; Tue, 19 Jun 2018 02:14:43 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id C9B696B0007; Tue, 19 Jun 2018 02:14:43 -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 AA18B6B0008; Tue, 19 Jun 2018 02:14:43 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl0-f72.google.com (mail-pl0-f72.google.com [209.85.160.72]) by kanga.kvack.org (Postfix) with ESMTP id 689AC6B0005 for ; Tue, 19 Jun 2018 02:14:43 -0400 (EDT) Received: by mail-pl0-f72.google.com with SMTP id q18-v6so11523063pll.3 for ; Mon, 18 Jun 2018 23:14:43 -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=XTVLEUAusSfV4xfJ+LK/BIpRzo5y+Z8NhkeMTGOcvW4=; b=UmprNa2/wjmj7dP4LcwYjdaMyDEA26i0cPAXG+4q6EizGjshofBiVJukG5hCoZ7lIC AeLozQR2CcwIQL+Mv9yTAcMdiP+yPhKJD0D5tuNyf3a0PslLn1DuAQ/kJOzEp5Iuqh2m ahFzC/42TLoauKDshTQAnVPVrpPtKdqm/RtmWG3mR2s2tXV9OqmDnEfj7xzsMf1tpIRz mY/S73ixS/SLDFtrYfgV4WT+YjFVme7PLmXSTxRMISvFeXbhg15TduEkiZkGgFLH2rI+ xF3W5qjiqIOnVcgbYUWrVHpK90D6zpC28oXp+PiDcI+RbdnJB+ZnlCo7ZWawMNlZL3NU yBeQ== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.151 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: APt69E3vn4OcddBlWqzPXGnfZjmW54UViEiRhOs9GU12HgcW8srM7K0y UA12RkHj7846vh6tPDY1flgatVK53hOcuMAhfADIjcL2qec9xxgviGgRvo4nC3d8v7cqGzPZ0nG xuzPkLEvnr9hddA7Y4HR56S8CMawalX3PFFMkCPMAkafws0ABJxmbB4qLiYLeCFGagg== X-Received: by 2002:a62:99db:: with SMTP id t88-v6mr16692434pfk.118.1529388883125; Mon, 18 Jun 2018 23:14:43 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJlyNlZVXUo94/A5kSy2ph2XFPISoJtTJasYrwUSykYzydyTFiOHAExQ8Ega9UGOdRt5a5X X-Received: by 2002:a62:99db:: with SMTP id t88-v6mr16692404pfk.118.1529388882226; Mon, 18 Jun 2018 23:14:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529388882; cv=none; d=google.com; s=arc-20160816; b=FDS6JqmTP4jD9lR01syF/LJKuSWDoeU6IbTbh5PniuYqIY3dBiz7nevlJBOvjRlI2N 23YO/dXQWkzBfariuonbeHgdIFini77uxGtPnAP071H9BSsI7L9RII6KdFZN8bMRvILh qkqGodzNXSqhSTSTAcZCPRgeUxdC7B7bAhLnLxnINWRJn6ZC6C/ezCPI9ZnndXVypfGl Bcc8plGWwTRFX4PxrLcj+EhrnArJ2VcXb+5c2GXEsApaS0paVKOqXthLUs5dyjtkiFMX 8Ez7bzw2RaWSLa2OxVZLUIJObv3tWGqP9fLyllM/YPjlcr9LhNWELIcyyMkvNVQXxMm9 997A== 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=XTVLEUAusSfV4xfJ+LK/BIpRzo5y+Z8NhkeMTGOcvW4=; b=DaLUiUT+7nF6l3UULRXtLv304VFB2vBmuxfsHXkZ3D9Nw0X8h0FWFPCnuW0XClGozo R8SRJ7Ilzvt12Ch3zUDd4kBN/Qp3CJr+brysdaZW4JLfRrhvB3RkUVUQkj15iR2J3rxm m1tbfW7XDwUq0cEO7288GKxNvp3dSfVUZQktx7OVw0lqwNdZQvzIF4Rr67eB4oGol4kL s2GIuiL7g+/sbFv1vrQVUhspbzCU/WesKK8oPxaZQqRCxXddEqhR24imqOnkTK++F3bf jYjwwr2WqtmTm43pHGYB9menEcZoLarauRFcmMfk5M/mI9CQsx+VI4i+Re21usGr0Mga m6uw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga17.intel.com (mga17.intel.com. [192.55.52.151]) by mx.google.com with ESMTPS id i1-v6si16125530pld.152.2018.06.18.23.14.42 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jun 2018 23:14:42 -0700 (PDT) Received-SPF: pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.151 as permitted sender) client-ip=192.55.52.151; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.151 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 fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2018 23:14:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,242,1526367600"; d="scan'208";a="233701083" 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; 18 Jun 2018 23:14:41 -0700 Subject: [PATCH v3 1/8] 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, 18 Jun 2018 23:04:44 -0700 Message-ID: <152938828436.17797.6503178614207917252.stgit@dwillia2-desk3.amr.corp.intel.com> In-Reply-To: <152938827880.17797.439879736804291936.stgit@dwillia2-desk3.amr.corp.intel.com> References: <152938827880.17797.439879736804291936.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 5857267a4af5..4478e4688bb7 100644 --- a/kernel/memremap.c +++ b/kernel/memremap.c @@ -257,7 +257,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) {