Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2719448rwo; Sun, 23 Jul 2023 23:22:13 -0700 (PDT) X-Google-Smtp-Source: APBJJlE4YML81b7rxvZY+didDoElb4MB0JBdd7NVHCwA+2uYe2mIYh5V8yLVu7KgbglE0Zlwi4sl X-Received: by 2002:a17:906:3109:b0:993:fb68:ed67 with SMTP id 9-20020a170906310900b00993fb68ed67mr8181510ejx.24.1690179733687; Sun, 23 Jul 2023 23:22:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690179733; cv=none; d=google.com; s=arc-20160816; b=MFk7Spc9XSFlqDk4Ue4TMEiIrPI1SW6cksWN+e/dSXOpVUm8QSvFkcGX786qw5WcOY FewvGlVI4gfrQDeCdY4rQQombUO6xtk0ygHyFAKJkHQVOQx1+8IJHIKc/pHpj1BEJyfo Rz1pl6pWPindIUucXxiPEC6y51jjdxUKfTAcqcPOKCwxuFLcI1onpr3+aWl4PnE8m+QW INgSCe79ZdfTPZnzPMKronni7GXCLMX+t/Hp4cUL7Xiy9/sqyxjoGWzDkUbwdrzyjHW4 UtNOzGxh8n0nVCc+pOimildZNXL0J+ez2mLg4qYs3/yFcJpWZ9O5XB0uf3u16x/PFhBT dQBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:message-id:in-reply-to :date:references:subject:cc:to:from:dkim-signature; bh=ryhz3mbx2XFWeoGwOGZ32Tcpi8SY5JJxpHU3GUI3ZDI=; fh=tI4klRNKT3WLUMe+BKdE6CBa5wNINRncuPmITMLIadw=; b=L+H+Wp1ws7M/YF6+sWHM+rGA3R/kPxkHyBd4xrwd5oLuNWUzxKgHxj/7Mc68gH+EXi 2hrGoq3jlP+nv6lqAf4D/TZkzYYqGCBAeN4kdKU8+g4M/ALL4GNX9ZqzQ3qimjWd+Iok bDiJGIdnu1DoxQUOzumb+s0CvbU+QUaq4Vknsxzv5aMWytVcfQut8918iZcbGHsMXwcc BEyI8u6UDUEmbeRpH857oNPbjFBHkkGxSM2CMCgHKsbtWBUgFtkMA1xYj74P7PCA7QP9 nLu5EggtQ3kW/yzUhxprWxuREQ0JKI6nqh67h/B+/2D3XsP5+Cpd7k8KRNpehm8jvjFR Pb4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=f+FjhiMN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n12-20020a170906840c00b0098cf69d9447si5802512ejx.820.2023.07.23.23.21.49; Sun, 23 Jul 2023 23:22:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=f+FjhiMN; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230148AbjGXGC0 (ORCPT + 99 others); Mon, 24 Jul 2023 02:02:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46156 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbjGXGCZ (ORCPT ); Mon, 24 Jul 2023 02:02:25 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 417A0E4E; Sun, 23 Jul 2023 23:02:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1690178543; x=1721714543; h=from:to:cc:subject:references:date:in-reply-to: message-id:mime-version; bh=hJeqyaPA2/UiA3SdbIjwXePXzRG8vLnfEgD/5hSNAoM=; b=f+FjhiMNs3YFPyJvqp1QQh/20dkSQE2zVguid+8DOte5+SYbjC4MwbBr NmXeLhxh3MArGeJhghLXUe9g74XiUlgr37uFzFNajSGbCLC282+MxRVSn Un52bq3E99VpIOxLwwzJxolBP9a/XGSIe0NMOa9UQDFo3feuBANoPcFCV yMApRZNknxckCIvnE2ieKfecGlUNb+TGF3csk6NY37yv4J0bVhEOGmJR2 EBlXHdMGXqst+z0L5RpUgynih0TKYONCcabRbrcGcmX/O0cqmTagTEqaY zx5I5EQJLHZzxjDsQol7wNP/XVjVUEkh7adnj6tadnj93E2I5AlCGyA/3 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10780"; a="366243571" X-IronPort-AV: E=Sophos;i="6.01,228,1684825200"; d="scan'208";a="366243571" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2023 23:02:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10780"; a="849500142" X-IronPort-AV: E=Sophos;i="6.01,228,1684825200"; d="scan'208";a="849500142" Received: from yhuang6-desk2.sh.intel.com (HELO yhuang6-desk2.ccr.corp.intel.com) ([10.238.208.55]) by orsmga004-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 23 Jul 2023 23:02:11 -0700 From: "Huang, Ying" To: Vishal Verma Cc: Andrew Morton , David Hildenbrand , Oscar Salvador , Dan Williams , Dave Jiang , , , , , Dave Hansen , "Aneesh Kumar K.V" , Jonathan Cameron , Jeff Moyer Subject: Re: [PATCH v2 1/3] mm/memory_hotplug: Export symbol mhp_supports_memmap_on_memory() References: <20230720-vv-kmem_memmap-v2-0-88bdaab34993@intel.com> <20230720-vv-kmem_memmap-v2-1-88bdaab34993@intel.com> Date: Mon, 24 Jul 2023 14:00:34 +0800 In-Reply-To: <20230720-vv-kmem_memmap-v2-1-88bdaab34993@intel.com> (Vishal Verma's message of "Thu, 20 Jul 2023 01:14:22 -0600") Message-ID: <87sf9d26il.fsf@yhuang6-desk2.ccr.corp.intel.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=ascii X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Vishal Verma writes: > In preparation for dax drivers, which can be built as modules, > to use this interface, export it with EXPORT_SYMBOL_GPL(). Add a #else > case for the symbol for builds without CONFIG_MEMORY_HOTPLUG. > > Cc: Andrew Morton > Cc: David Hildenbrand > Cc: Oscar Salvador > Cc: Dan Williams > Cc: Dave Jiang > Cc: Dave Hansen > Cc: Huang Ying > Reviewed-by: David Hildenbrand > Signed-off-by: Vishal Verma > --- > include/linux/memory_hotplug.h | 5 +++++ > mm/memory_hotplug.c | 1 + > 2 files changed, 6 insertions(+) > > diff --git a/include/linux/memory_hotplug.h b/include/linux/memory_hotplug.h > index 013c69753c91..fc5da07ad011 100644 > --- a/include/linux/memory_hotplug.h > +++ b/include/linux/memory_hotplug.h > @@ -355,6 +355,11 @@ extern int arch_create_linear_mapping(int nid, u64 start, u64 size, > struct mhp_params *params); > void arch_remove_linear_mapping(u64 start, u64 size); > extern bool mhp_supports_memmap_on_memory(unsigned long size); > +#else > +static inline bool mhp_supports_memmap_on_memory(unsigned long size) > +{ > + return false; > +} > #endif /* CONFIG_MEMORY_HOTPLUG */ It appears that there is no user of mhp_supports_memmap_on_memory() that may be compiled with !CONFIG_MEMORY_HOTPLUG? -- Best Regards, Huang, Ying > #endif /* __LINUX_MEMORY_HOTPLUG_H */ > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c > index 3f231cf1b410..e9bcacbcbae2 100644 > --- a/mm/memory_hotplug.c > +++ b/mm/memory_hotplug.c > @@ -1284,6 +1284,7 @@ bool mhp_supports_memmap_on_memory(unsigned long size) > IS_ALIGNED(vmemmap_size, PMD_SIZE) && > IS_ALIGNED(remaining_size, (pageblock_nr_pages << PAGE_SHIFT)); > } > +EXPORT_SYMBOL_GPL(mhp_supports_memmap_on_memory); > > /* > * NOTE: The caller must call lock_device_hotplug() to serialize hotplug