From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C73CFC433E9 for ; Thu, 3 Sep 2020 12:31:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 743BD20639 for ; Thu, 3 Sep 2020 12:31:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=oracle.com header.i=@oracle.com header.b="JlFHWlfA" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 743BD20639 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=oracle.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id E9E646B0002; Thu, 3 Sep 2020 08:31:57 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E4F436B0003; Thu, 3 Sep 2020 08:31:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D3DF96B0037; Thu, 3 Sep 2020 08:31:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0230.hostedemail.com [216.40.44.230]) by kanga.kvack.org (Postfix) with ESMTP id BE2436B0002 for ; Thu, 3 Sep 2020 08:31:57 -0400 (EDT) Received: from smtpin15.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 715B5181AC544 for ; Thu, 3 Sep 2020 12:31:57 +0000 (UTC) X-FDA: 77221687074.15.eggs02_1f153b1270a9 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin15.hostedemail.com (Postfix) with ESMTP id 1F8AF1814B0C8 for ; Thu, 3 Sep 2020 12:31:57 +0000 (UTC) X-HE-Tag: eggs02_1f153b1270a9 X-Filterd-Recvd-Size: 7310 Received: from userp2130.oracle.com (userp2130.oracle.com [156.151.31.86]) by imf20.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Sep 2020 12:31:56 +0000 (UTC) Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 083CTBPw158727; Thu, 3 Sep 2020 12:31:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=subject : to : cc : references : from : message-id : date : mime-version : in-reply-to : content-type : content-transfer-encoding; s=corp-2020-01-29; bh=IXQNFELdkYR2eAPKHBVjeF0MWzPUgwo4S7sqI8fsmcs=; b=JlFHWlfAPS21ZWEefkmoN5CUcKsmvfyNYuFO/npTPjyLJVn7ZsYuccwhQug+J59XEs30 cgpcMHBE7risGwS+Z7MYOcBty8PBg4QM//XnZdk/IGntKDP/cpCSIBXyitGMKrr6boVJ RR7nHMNQqIdtZLu4B3cE22JV5yeDx1E/V4JtKZZN+zMoF6pfbceJIxBWzkTBRzeYr6Za dFTN5To5Qdd0gqZ2kQ70WEjFosMKA0hgaPJOZew0v/4v5gxfMyF/JM+Qpnm5be6mHa+f PrIomYf49v5kPjy9St6+EipRqikFan00cwDVyhKzuRjYxl/C16dYpf+908NjOHGru1RY 6A== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by userp2130.oracle.com with ESMTP id 337eer8faa-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 03 Sep 2020 12:31:53 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 083CUw0C163649; Thu, 3 Sep 2020 12:31:52 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserp3020.oracle.com with ESMTP id 3380x9twgw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 03 Sep 2020 12:31:52 +0000 Received: from abhmp0016.oracle.com (abhmp0016.oracle.com [141.146.116.22]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 083CVo80029259; Thu, 3 Sep 2020 12:31:51 GMT Received: from [10.175.217.242] (/10.175.217.242) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 03 Sep 2020 05:31:50 -0700 Subject: Re: [linux-next:master 2890/4758] ld.lld: error: undefined symbol: phys_to_target_node To: Andrew Morton , Vishal Verma Cc: kernel test robot , Dan Williams , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, Linux Memory Management List References: <202009031338.VZC7AOSw%lkp@intel.com> From: Joao Martins Message-ID: Date: Thu, 3 Sep 2020 13:31:47 +0100 MIME-Version: 1.0 In-Reply-To: <202009031338.VZC7AOSw%lkp@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9732 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 mlxscore=0 spamscore=0 phishscore=0 mlxlogscore=999 adultscore=0 suspectscore=0 bulkscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009030116 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9732 signatures=668679 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 malwarescore=0 adultscore=0 spamscore=0 mlxscore=0 phishscore=0 impostorscore=0 mlxlogscore=999 bulkscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2006250000 definitions=main-2009030116 X-Rspamd-Queue-Id: 1F8AF1814B0C8 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam02 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: On 9/3/20 6:49 AM, kernel test robot wrote: > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master > head: 4442749a203151a319a5bb8d0b983b84253a6931 > commit: bd295a352cfa24e5110a53f978edb48b7c21ff8f [2890/4758] ACPI: HMAT: attach a device for each soft-reserved range > config: x86_64-randconfig-a002-20200902 (attached as .config) > compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 224d8153b53b16cf535ea1a55afdfe1ec5b1374f) > reproduce (this is a W=1 build): > wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross > chmod +x ~/bin/make.cross > # install x86_64 cross compiling tool for clang build > # apt-get install binutils-x86-64-linux-gnu > git checkout bd295a352cfa24e5110a53f978edb48b7c21ff8f > # save the attached .config to linux build tree > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot > > All errors (new ones prefixed by >>): > >>> ld.lld: error: undefined symbol: phys_to_target_node > >>> referenced by device.c:84 (drivers/dax/hmem/device.c:84) > >>> dax/hmem/device.o:(hmem_register_one) in archive drivers/built-in.a > This would require the proposed fix below the scissors mark. I had reported this failure before, but it needed an adjustment so I'm re-sending it. --------------------------->8---------------------------- >From 622c1297b7d76a319b07a29192fe9bfe5c2b6b7c Mon Sep 17 00:00:00 2001 From: Joao Martins Date: Tue, 1 Sep 2020 08:06:35 -0400 Subject: [PATCH] device-dax: Require NUMA_KEEP_MEMINFO for phys_to_target_node() phys_to_target_node() and memory_add_physaddr_to_nid() are only defined with both CONFIG_NUMA=y and CONFIG_MEMORY_HOTPLUG=y. Oherwise we see: drivers/dax/hmem/device.o: in function `hmem_register_one': drivers/dax/hmem/device.c:85: undefined reference to `phys_to_target_node' lkp also reports such build failures: ld.lld: error: undefined symbol: phys_to_target_node X86 is a special case in which both can be defined without depending on MEMORY_HOTPLUG=y. The other case is powerpc (for memory_add_physaddr_to_nid) but like ARM64 dependencies, the arch-specific override requires CONFIG_NUMA and CONFIG_MEMORY_HOTPLUG. In all cases this ends up depending on CONFIG_NUMA_KEEP_MEMINFO to signal the presence of phys_to_target_node() which is what CONFIG_DEV_DAX_HMEM_DEVICES should depend on. Additionally, the X86 arch-override is not selected unless X86_PMEM_LEGACY=y. So on CONFIG_DEV_DAX_HMEM we select CONFIG_NUMA_KEEP_INFO ourselves if both NUMA and X86 are set. Reported-by: kernel test robot Signed-off-by: Joao Martins --- drivers/dax/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dax/Kconfig b/drivers/dax/Kconfig index a66dff78f298..567428e10b7b 100644 --- a/drivers/dax/Kconfig +++ b/drivers/dax/Kconfig @@ -35,6 +35,7 @@ config DEV_DAX_PMEM config DEV_DAX_HMEM tristate "HMEM DAX: direct access to 'specific purpose' memory" depends on EFI_SOFT_RESERVE + select NUMA_KEEP_MEMINFO if (NUMA && X86) default DEV_DAX help EFI 2.8 platforms, and others, may advertise 'specific purpose' @@ -49,6 +50,7 @@ config DEV_DAX_HMEM Say M if unsure. config DEV_DAX_HMEM_DEVICES + depends on NUMA_KEEP_MEMINFO # for phys_to_target_node() depends on DEV_DAX_HMEM && DAX=y def_bool y -- 2.17.1