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=-23.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_IN_DEF_DKIM_WL 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 7EAB2C433E0 for ; Tue, 16 Mar 2021 16:23:29 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 17A9065103 for ; Tue, 16 Mar 2021 16:23:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 17A9065103 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id A6F3D6B0070; Tue, 16 Mar 2021 12:23:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A1EB86B0071; Tue, 16 Mar 2021 12:23:28 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 871556B0072; Tue, 16 Mar 2021 12:23:28 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 6731F6B0070 for ; Tue, 16 Mar 2021 12:23:28 -0400 (EDT) Received: from smtpin09.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 227C28249980 for ; Tue, 16 Mar 2021 16:23:28 +0000 (UTC) X-FDA: 77926257696.09.D0D0EF3 Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) by imf01.hostedemail.com (Postfix) with ESMTP id D0BC52015DC2 for ; Tue, 16 Mar 2021 16:23:23 +0000 (UTC) Received: by mail-lf1-f42.google.com with SMTP id v9so63387706lfa.1 for ; Tue, 16 Mar 2021 09:23:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=B9/mKkjqDmqgztA1c+9tojdTY3QmdTa/Mj2dq9ukTTI=; b=oIzhrCUP8uEFhorRa9bXRKUnCNw5P7uxU7YeQNiVmYyG2BvkcJbS6zl23A4SBAOGdG yn3kvlNpGxAiYocjG97D4zXnIklE4MZsuiZllIzDbCA1tjZ+435tFUwJA16biGKJ3si3 TNCU41auU5xeQYbn6hj5BY+cgEV2C+lvXrfax/NrK8PhOQmUy4mZVJiQMKjJBhh7rnTh PthhaqHipyHleu8UEU/GpMwWL3aowzpRMrFEA7AkH3PDVBQ5aLQRxwZb6o6QMS/H8aT6 ZgH/ZVDbwV+mDTi/pY1MIcnL8uzfSPUcpYO+u1H+QQh9xkufOoK0z329pDR5dV/zPgem gB+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=B9/mKkjqDmqgztA1c+9tojdTY3QmdTa/Mj2dq9ukTTI=; b=QLhaXGc1lbVfcQ2mQ09RzFwy6TRoY+7a8XC/5vF9ookh5QmnYkMQ/ZI+0S6jk8RrNl U+hU37YUMuXLheLme2xF6J/Tx5Cdfy1ZJDb+OeM5E4DAHb22nQo8lGNrSCq0puyr9wGN xe2zaHpiyTS7e0e7JQhQ8V5N/P7pbSHPjI9IkbWoG3JguzsxtGtGJH466o4zL4Bikddy IHTZ6Z6K6wZZiQxy54NPC55fwlKf0SZ3uss9DeMwdnwGr3ZfkHWBozjl72vsJQW3u2OB JnwCQUW2y0BatNEPwa+stwigLTqu/9mmlISlW6uzjErb/UR6A8rpgpJJGRJab+EennC8 D8Ew== X-Gm-Message-State: AOAM5323Id+mlpj4u1h9bhkF7GUTWEhZ552uPjqcn5Doh/aesRtH15st FBYQ8I6f2QkZMKLCu5GuvPJAyXJXhSU7g2KQI6TOXQ== X-Google-Smtp-Source: ABdhPJxuWanoucLXm4wggJ26jJCzAvFNlj63TFQMKAVOOBhYcNtUY/h9SGFVfpiMVZ3evu02HsYbPIzPxq8/sPXKw7s= X-Received: by 2002:a19:8c19:: with SMTP id o25mr11895567lfd.547.1615911802020; Tue, 16 Mar 2021 09:23:22 -0700 (PDT) MIME-Version: 1.0 References: <202103160133.UzhgY0wt-lkp@intel.com> In-Reply-To: From: Nick Desaulniers Date: Tue, 16 Mar 2021 09:23:09 -0700 Message-ID: Subject: Re: WARNING: modpost: vmlinux.o(.text+0x74fea4): Section mismatch in reference from the function memblock_find_in_range_node() to the function .init.text:memblock_bottom_up() To: Mike Rapoport Cc: kernel test robot , Arnd Bergmann , kbuild-all@lists.01.org, clang-built-linux , LKML , David Hildenbrand , Andrew Morton , Linux Memory Management List Content-Type: text/plain; charset="UTF-8" X-Stat-Signature: nyory7e6brcmxc7s6snzuifob1ry3hhe X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: D0BC52015DC2 Received-SPF: none (google.com>: No applicable sender policy available) receiver=imf01; identity=mailfrom; envelope-from=""; helo=mail-lf1-f42.google.com; client-ip=209.85.167.42 X-HE-DKIM-Result: pass/pass X-HE-Tag: 1615911803-435782 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, Mar 16, 2021 at 12:04 AM Mike Rapoport wrote: > > On Tue, Mar 16, 2021 at 01:23:08AM +0800, kernel test robot wrote: > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > > head: 1e28eed17697bcf343c6743f0028cc3b5dd88bf0 > > commit: 34dc2efb39a231280fd6696a59bbe712bf3c5c4a memblock: fix section mismatch warning > > date: 2 days ago > > config: arm64-randconfig-r013-20210315 (attached as .config) > > compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project a28facba1ccdc957f386b7753f4958307f1bfde8) > > 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 arm64 cross compiling tool for clang build > > # apt-get install binutils-aarch64-linux-gnu > > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=34dc2efb39a231280fd6696a59bbe712bf3c5c4a > > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > > git fetch --no-tags linus master > > git checkout 34dc2efb39a231280fd6696a59bbe712bf3c5c4a > > # save the attached .config to linux build tree > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot > > > > All warnings (new ones prefixed by >>, old ones prefixed by <<): > > > > >> WARNING: modpost: vmlinux.o(.text+0x74fea4): Section mismatch in reference from the function memblock_find_in_range_node() to the function .init.text:memblock_bottom_up() > > The function memblock_find_in_range_node() references > > the function __init memblock_bottom_up(). > > This is often because memblock_find_in_range_node lacks a __init > > annotation or the annotation of memblock_bottom_up is wrong. > > I don't have clang-13 setup handy so I could not check, but I think this > should be the fix: Thanks for taking another look: https://lore.kernel.org/lkml/20210225205908.GM1447004@kernel.org/ Do we want to switch the above to the below? > > diff --git a/include/linux/memblock.h b/include/linux/memblock.h > index d13e3cd938b4..5984fff3f175 100644 > --- a/include/linux/memblock.h > +++ b/include/linux/memblock.h > @@ -460,7 +460,7 @@ static inline void memblock_free_late(phys_addr_t base, phys_addr_t size) > /* > * Set the allocation direction to bottom-up or top-down. > */ > -static inline __init void memblock_set_bottom_up(bool enable) > +static inline __init_memblock void memblock_set_bottom_up(bool enable) > { > memblock.bottom_up = enable; > } > @@ -470,7 +470,7 @@ static inline __init void memblock_set_bottom_up(bool enable) > * if this is true, that said, memblock will allocate memory > * in bottom-up direction. > */ > -static inline __init bool memblock_bottom_up(void) > +static inline __init_memblock bool memblock_bottom_up(void) > { > return memblock.bottom_up; > } > > > -- > Sincerely yours, > Mike. > > -- > You received this message because you are subscribed to the Google Groups "Clang Built Linux" group. > To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@googlegroups.com. > To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/YFBYWjtWJrnGyiVp%40linux.ibm.com. -- Thanks, ~Nick Desaulniers