From patchwork Tue Jun 19 06:05:15 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 10473331 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 443B9603B5 for ; Tue, 19 Jun 2018 06:15:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 45ACE28C14 for ; Tue, 19 Jun 2018 06:15:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A29B28C2B; Tue, 19 Jun 2018 06:15:17 +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 AB3C828C14 for ; Tue, 19 Jun 2018 06:15:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 60E616B000E; Tue, 19 Jun 2018 02:15:15 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 594026B0010; Tue, 19 Jun 2018 02:15:15 -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 45BB56B0269; Tue, 19 Jun 2018 02:15:15 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg0-f69.google.com (mail-pg0-f69.google.com [74.125.83.69]) by kanga.kvack.org (Postfix) with ESMTP id F35976B000E for ; Tue, 19 Jun 2018 02:15:14 -0400 (EDT) Received: by mail-pg0-f69.google.com with SMTP id o7-v6so6054411pgc.23 for ; Mon, 18 Jun 2018 23:15:14 -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=Vr79BEbRZ8VuNRYroHU26or5Zx0vtvr7ficBS76cFA0=; b=DEef1aetJmO+8EcK7Qq+oa2SwJtrg8AVihvnaeC79VYK+peVmJA+nl5XNiJZ7yMvG2 cohmu1i5q92/ei9OWQB1RR1U8TvgzTz9dkAVDLYhtxzeUDHLRiCdZV14qh5HG+TC6bJq kh5CRUmuxJU9iM73xGgurzT6KyeQX5MSfH7gmLsbE4hC3R0Ek5YCZYjWh7Bwo/37rQrc vobMR0ZHQ2mmPhdFWQ6mPDpBXuF8QSdTphiRgjSvTXN/jr2KNa8BJwHeZGEcrpHouEkb 0GB3/pLpiwR5tLk1oK5bnwP76Zw5LWLumanudzBMvQNYFE4gwKwQjOkNi4c4FeCi8Efl VeBg== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.136 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: APt69E1VGuRMMky+AGQcZOYkWuRtHQXe/Od0ghazd1DCIIDhUoaDhc05 Jfo/c+Koqd0rjp4bwHGSx/frEdKKtuxsVvGG7tgrJ9xMN104l2F1oYy9t6sZZ7/1K1DJCWq3fKg q4xDTqRWqudiGQH6A/bXIJGqtdM3fbyIB03gFYNFhyiipylW4QoH0dYenKeRR9jSX+Q== X-Received: by 2002:a65:590c:: with SMTP id f12-v6mr13947406pgu.128.1529388914674; Mon, 18 Jun 2018 23:15:14 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIrVeAHNmz3pI3yUt+CpNo7QwYmRrXxD9jHEx+vGq/f5Qi/ynj49WH6g0ug9rKPT6O6xXtk X-Received: by 2002:a65:590c:: with SMTP id f12-v6mr13947364pgu.128.1529388913762; Mon, 18 Jun 2018 23:15:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529388913; cv=none; d=google.com; s=arc-20160816; b=gouFr2lHrVhcT0JPrN373L1fY4r7vHQdONaPKFOt56fX2fiFF9DBVnc2Akw4Ct5AdV 8DU2bVGnw9aJkPxh2gyWalgrEgtHFQ0lor8eyuwOiE0uIc8GcQFPav2edo4us+6lfPgv 0M+uUSbxeX9JAzXEBnsM4VoDf1jtWJcuOpLo44+TlaIC/Vtp8xdD5BXJo2AiAXn5eRHc Axs9xGqSpp+Xa0WcmX10udYbptZDP1Jvm1YoE9gsSirNBQ36JFIjLVAZ3ffg6vHN+Qnd k2yYDCcQNEzvP3Q/PxYV6hkQ37h+uAMKqMkkur2Bn7HecgmewNAVtJxyIdM4Qba/Jb0T O0KQ== 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=Vr79BEbRZ8VuNRYroHU26or5Zx0vtvr7ficBS76cFA0=; b=ts6Pe9pksKx6RtVitYR5Dzt3JWnubPYJzyRj7Y70CPdRrt/B1SEHtttFoUkrT3EODz mgN82jjOs3ZT1FNV1/IpD4OWhNXcBXQq5dVDbjYU6XeiED0YAXnV2RMH/emvsuD5S3W0 pHKsHxh1Rb+h7zKbIeHDG28EHenAuiodWK45P2f+aWDpbBEBhAGmxT3kxNvqPy3B5FBU OSljD4/M8k66mMw4u79Z25UNU8Jjkhao4qRiOwayZwaFHIaGb7OF2nZ2q3jRPUdOPbuH w3/A9EG8W7xvyTVTZX3lIggWYnq/CcktzYPsVaEAkePxCvfLw1b6z95u4vlqERdf1vvB ivyQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.136 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga12.intel.com (mga12.intel.com. [192.55.52.136]) by mx.google.com with ESMTPS id x69-v6si16104196pfa.108.2018.06.18.23.15.13 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Jun 2018 23:15:13 -0700 (PDT) Received-SPF: pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.136 as permitted sender) client-ip=192.55.52.136; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.136 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 orsmga006.jf.intel.com ([10.7.209.51]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Jun 2018 23:15:13 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,242,1526367600"; d="scan'208";a="51007447" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by orsmga006.jf.intel.com with ESMTP; 18 Jun 2018 23:15:12 -0700 Subject: [PATCH v3 7/8] mm, hmm: Mark hmm_devmem_{add, add_resource} EXPORT_SYMBOL_GPL From: Dan Williams To: akpm@linux-foundation.org Cc: =?utf-8?b?SsOpcsO0bWU=?= Glisse , Logan Gunthorpe , Christoph Hellwig , linux-mm@kvack.org, linux-kernel@vger.kernel.org Date: Mon, 18 Jun 2018 23:05:15 -0700 Message-ID: <152938831573.17797.15264540938029137916.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 routines hmm_devmem_add(), and hmm_devmem_add_resource() are now wrappers around the functionality provided by devm_memremap_pages() to inject a dev_pagemap instance and hook page-idle events. The devm_memremap_pages() interface is base infrastructure for HMM which has more and deeper ties into the kernel memory management implementation than base ZONE_DEVICE. Originally, the HMM page structure creation routines copied the devm_memremap_pages() code and reused ZONE_DEVICE. A cleanup to unify the implementations was discussed during the initial review: http://lkml.iu.edu/hypermail/linux/kernel/1701.2/00812.html Given that devm_memremap_pages() is marked EXPORT_SYMBOL_GPL by its authors and the hmm_devmem_{add,add_resource} routines are simple wrappers around that base, mark these routines as EXPORT_SYMBOL_GPL as well. Cc: "Jérôme Glisse" Cc: Logan Gunthorpe Reviewed-by: Christoph Hellwig Signed-off-by: Dan Williams --- mm/hmm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/hmm.c b/mm/hmm.c index b019d67a610e..481a7a5f6f46 100644 --- a/mm/hmm.c +++ b/mm/hmm.c @@ -1054,7 +1054,7 @@ struct hmm_devmem *hmm_devmem_add(const struct hmm_devmem_ops *ops, return result; return devmem; } -EXPORT_SYMBOL(hmm_devmem_add); +EXPORT_SYMBOL_GPL(hmm_devmem_add); struct hmm_devmem *hmm_devmem_add_resource(const struct hmm_devmem_ops *ops, struct device *device, @@ -1108,7 +1108,7 @@ struct hmm_devmem *hmm_devmem_add_resource(const struct hmm_devmem_ops *ops, return result; return devmem; } -EXPORT_SYMBOL(hmm_devmem_add_resource); +EXPORT_SYMBOL_GPL(hmm_devmem_add_resource); /* * A device driver that wants to handle multiple devices memory through a