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=-17.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,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 F2DC1C64E7B for ; Tue, 1 Dec 2020 20:13:55 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 58C7F2168B for ; Tue, 1 Dec 2020 20:13:55 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="hePXAIcL" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 58C7F2168B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A1C016B0036; Tue, 1 Dec 2020 15:13:54 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 9A4DC6B005D; Tue, 1 Dec 2020 15:13:54 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 86D628D0001; Tue, 1 Dec 2020 15:13:54 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0138.hostedemail.com [216.40.44.138]) by kanga.kvack.org (Postfix) with ESMTP id 6A47C6B0036 for ; Tue, 1 Dec 2020 15:13:54 -0500 (EST) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 31BF02C18 for ; Tue, 1 Dec 2020 20:13:54 +0000 (UTC) X-FDA: 77545814388.09.toes51_0011f20273ad Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin09.hostedemail.com (Postfix) with ESMTP id 173E2180AD801 for ; Tue, 1 Dec 2020 20:13:54 +0000 (UTC) X-HE-Tag: toes51_0011f20273ad X-Filterd-Recvd-Size: 5509 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf30.hostedemail.com (Postfix) with ESMTP for ; Tue, 1 Dec 2020 20:13:53 +0000 (UTC) Received: from mail-ed1-f46.google.com (mail-ed1-f46.google.com [209.85.208.46]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 202F121D42 for ; Tue, 1 Dec 2020 20:13:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606853632; bh=63Gmv7p+fdSRaaaAx/fdH69Jf3CpfxVUdHP6/hOkc2A=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=hePXAIcLXhNT2sCSxoTIDosFb02LbBAe5R6RE+cfOel+E9kG2fuQ8JQROmbbw+OVz Y2XLJyasIrcqOA32HI2i6VhY83+c+k7MKWK61NlDrs+bDOwlwKxxR1c16/5zfBPsh9 3ku+wZZkXW6vN9kU+cOJZCnPat2QYkDM3NdJx79M= Received: by mail-ed1-f46.google.com with SMTP id ck29so5258577edb.8 for ; Tue, 01 Dec 2020 12:13:52 -0800 (PST) X-Gm-Message-State: AOAM532gkgQjBHy8/krL350lDVEejJEaxYBL1XIub8UR49Wf4N5yNQzV oxRoanhV+g+ttNWRC2VQv1vnVYRz0xsefC+Zxw== X-Google-Smtp-Source: ABdhPJxGa32AqT5jxgzG3Rgwp9fcF4mrMC+HQyIMNv3VSoxMjLtdPXWeNtMRhkvFq3Jr8zZzVOK10g0P4LD2CXxKQ0c= X-Received: by 2002:a05:6402:553:: with SMTP id i19mr4964942edx.194.1606853630068; Tue, 01 Dec 2020 12:13:50 -0800 (PST) MIME-Version: 1.0 References: <202012011747.PIcmivAO-lkp@intel.com> <20201201122915.GC31404@gaia> In-Reply-To: <20201201122915.GC31404@gaia> From: Rob Herring Date: Tue, 1 Dec 2020 13:13:38 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [linux-next:master 6272/9613] unittest.c:undefined reference to `of_dma_get_max_cpu_address' To: Catalin Marinas Cc: kernel test robot , Nicolas Saenz Julienne , kbuild-all@lists.01.org, clang-built-linux , Linux Memory Management List Content-Type: text/plain; charset="UTF-8" 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 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. > 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