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,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_SANE_1 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 9DAA9C71155 for ; Tue, 1 Dec 2020 23:40:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7B6A922269 for ; Tue, 1 Dec 2020 23:40:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B6A922269 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 5FE0C6B006E; Tue, 1 Dec 2020 18:40:48 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 5D5B38D0003; Tue, 1 Dec 2020 18:40:48 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4EC038D0001; Tue, 1 Dec 2020 18:40:48 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0103.hostedemail.com [216.40.44.103]) by kanga.kvack.org (Postfix) with ESMTP id 38D706B006E for ; Tue, 1 Dec 2020 18:40:48 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id EF3133636 for ; Tue, 1 Dec 2020 23:40:47 +0000 (UTC) X-FDA: 77546335734.23.title40_4e07f90273ae Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin23.hostedemail.com (Postfix) with ESMTP id CE98837606 for ; Tue, 1 Dec 2020 23:40:47 +0000 (UTC) X-HE-Tag: title40_4e07f90273ae X-Filterd-Recvd-Size: 5578 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Dec 2020 23:40:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=Content-Transfer-Encoding:Content-Type: In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:Sender :Reply-To:Content-ID:Content-Description; bh=xSr4Zkri5ll3/mRrUrf4ugiPrrf01YBrysiBxMPJsMQ=; b=QDK8NVkqeIRb8RNutAF0Zhx8X8 BMO5AbAZnFCriMwS2Cln5iykdKaVeSmaMh14BDUL4aA87HrSDj0hYpDBNZNvWZ41UI9mDc0XDFpUP NjR1LS7/kdwu9kGjKxkXoSUFm5MOhJ1hMD6W3Vu15rh2nPSq8dAYbiMTqDQrrNvTOJs80EHcFN0mD j5v62nmkO9/jQnhCtGHb/MuKLg4YddkGHQJ9pB5OjYOH5r9T9rV8DRcan4kNZGOBkM0LbF5Qfhoha YuBAzDDZV4mbwxQ8GUFmfABQXvESKa5Hy+yRKd5bIgwMNuFABoxT7RxR50H2iSZBVpnbRaEJ/bfkQ RXvXnQ4g==; Received: from [2601:1c0:6280:3f0::1494] by merlin.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1kkFGA-0004rz-Vy; Tue, 01 Dec 2020 23:40:39 +0000 Subject: Re: [linux-next:master 6272/9613] unittest.c:undefined reference to `of_dma_get_max_cpu_address' To: Rob Herring , Catalin Marinas Cc: kernel test robot , Nicolas Saenz Julienne , kbuild-all@lists.01.org, clang-built-linux , Linux Memory Management List References: <202012011747.PIcmivAO-lkp@intel.com> <20201201122915.GC31404@gaia> From: Randy Dunlap Message-ID: <98b2ba67-d43b-c285-8ad0-20e52c1d3227@infradead.org> Date: Tue, 1 Dec 2020 15:40:34 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit 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 12/1/20 12:13 PM, Rob Herring wrote: > On Tue, Dec 1, 2020 at 5:29 AM Catalin Marinas wrote: >> >> On Tue, Dec 01, 2020 at 05:32:51PM +0800, kernel test robot wrote: >>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master >>> head: c6b11acc5f85b6e11d128fad8e0b7b223aa7e33f >>> commit: 07d13a1d6120d453c3c1f020578693d072deded5 [6272/9613] of: unittest: Add test for of_dma_get_max_cpu_address() >>> config: s390-randconfig-r034-20201201 (attached as .config) >>> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ac40a2d8f16b8a8c68fc811d67f647740e965cb8) >>> 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 s390 cross compiling tool for clang build >>> # apt-get install binutils-s390x-linux-gnu >>> # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=07d13a1d6120d453c3c1f020578693d072deded5 >>> git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git >>> git fetch --no-tags linux-next master >>> git checkout 07d13a1d6120d453c3c1f020578693d072deded5 >>> # save the attached .config to linux build tree >>> COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390 >>> >>> If you fix the issue, kindly add following tag as appropriate >>> Reported-by: kernel test robot >>> >>> All errors (new ones prefixed by >>): >>> >>> s390x-linux-gnu-ld: kernel/dma/coherent.o: in function `dma_declare_coherent_memory': >>> coherent.c:(.text+0xf8): undefined reference to `memunmap' >>> s390x-linux-gnu-ld: kernel/dma/coherent.o: in function `dma_init_coherent_memory': >>> coherent.c:(.text+0x174): undefined reference to `memremap' >>> s390x-linux-gnu-ld: coherent.c:(.text+0x344): undefined reference to `memunmap' >>> s390x-linux-gnu-ld: drivers/of/unittest.o: in function `of_unittest': >>>>> unittest.c:(.init.text+0x120): undefined reference to `of_dma_get_max_cpu_address' >> >> Thanks for the report. I think it needs the diff below. If Rob/Nicolas >> are ok with it, I'll add it to the arm64 tree (with some commit text): >> >> diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c >> index 98cc0163301b..799125ef66fc 100644 >> --- a/drivers/of/unittest.c >> +++ b/drivers/of/unittest.c >> @@ -871,6 +871,7 @@ static void __init of_unittest_changeset(void) >> >> static void __init of_unittest_dma_get_max_cpu_address(void) >> { >> +#ifdef CONFIG_OF_ADDRESS > > if (!IS_ENABLED(CONFIG_OF_ADDRESS)) > return; > > This once again makes me want to kill off HAS_IOMEM. Or at least > always have a dummy ioremap() and friends for !HAS_IOMEM. That would eliminate dozens of build errors on S390 when # CONFIG_HAS_IOMEM is not set # CONFIG_OF_ADDRESS is not set >> struct device_node *np; >> phys_addr_t cpu_addr; >> >> @@ -884,6 +885,7 @@ static void __init of_unittest_dma_get_max_cpu_address(void) >> unittest(cpu_addr == 0x4fffffff, >> "of_dma_get_max_cpu_address: wrong CPU addr %pad (expecting %x)\n", >> &cpu_addr, 0x4fffffff); >> +#endif >> } >> >> static void __init of_unittest_dma_ranges_one(const char *path, >> >> -- >> Catalin > -- ~Randy