Received: by 2002:a05:6512:2355:0:0:0:0 with SMTP id p21csp200817lfu; Wed, 30 Mar 2022 20:41:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBcB/9itJ1jX+HUm5PxWhx3q+DrWbI0YlkRBf/coVabO4fuTd6Z8mDQkilLGyIiMB/yNcC X-Received: by 2002:a63:3309:0:b0:398:1bfd:21fd with SMTP id z9-20020a633309000000b003981bfd21fdmr8797471pgz.598.1648698107964; Wed, 30 Mar 2022 20:41:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1648698107; cv=none; d=google.com; s=arc-20160816; b=wxyejxLkGV7TvZ4PkvbRcY1fh0PenbnR/rmZ6rYysjX+T4kbA7zZ/A8IdnbYGqi0Gh kWpQJ2NZsZe3rjrZjrERslZtJwTvzWxs0JovhJ70wuUxmykH/uV4M9ILM+XZ5T2YK3ob FEzoJ1HDuHl7ee47mOEFbziRoNMYgPMkqQ9vkXVMMRKoCWltt6n7EtGdZPi71tct4UhT I3ZGNURaZvUvNyx+zkxy08RhZ8IskTWRyQUxlgHanmcWi1dC6E2xLE/cdYZFv6zArlC7 M12du2ebkB3c+URLT0mIwpfXOY6p168exZKQmw7yvqIQ7yhnqioH6q0+CN+d6WDdqCzu UeHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:dkim-signature:date; bh=u50nsqdeeBmYB/R6zpuCDe6/0f9hKHC+dYk7Osp22B8=; b=aJ9WWWJSEOhTmQLepFfvE8arw2++w/YkuNtc8eK4CPPV16f6Q5b7QEjGLJ7ZYxo7Op iXjp2Lyzvt5GxpkuB8STxozx5W0qkRy8Dvt+eYRRYIEFiPxkBYLsifBn+SBsokeNfkhx 7rG9zx4jU/x+M2/THeOxYGjqn5wV571VT35zvzhVQvXcpRGocbyXzpFQxSRCIIQkA6VY AHQm/SQ+RPIyqEE8OsQmkl8L6xSSR30A2fMRsQ1aFnbNxG05j46mG6jSzEqTqvGrbTum ZtajMxECovztUTZTZG6fhunl1KKV210+KqZ651/3Ca3IKv6DoSz5J1o0tgkHesbZER3p qgiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=esB9gPcX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id mz5-20020a17090b378500b001c79aa946bdsi1731708pjb.122.2022.03.30.20.41.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 20:41:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=esB9gPcX; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id ABEE2138583; Wed, 30 Mar 2022 20:00:36 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351347AbiC3Vtn (ORCPT + 99 others); Wed, 30 Mar 2022 17:49:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348397AbiC3Vtl (ORCPT ); Wed, 30 Mar 2022 17:49:41 -0400 Received: from out2.migadu.com (out2.migadu.com [IPv6:2001:41d0:2:aacc::]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0469742EE3 for ; Wed, 30 Mar 2022 14:47:52 -0700 (PDT) Date: Wed, 30 Mar 2022 14:47:43 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1648676870; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=u50nsqdeeBmYB/R6zpuCDe6/0f9hKHC+dYk7Osp22B8=; b=esB9gPcXanFP8h8Jau49wEJcr2aePFSQXvdWM3ScOwueNHpuO9xw3L4Lc0I11tTH8YtN26 ikSsXB/CMvCjN8SwU72l1N8T9+ZB/y6UJSDV7LApG7gM5OxG93T/DUHdB+ZDlQ9aeWg55F OW5fP/S3Wy/hhLyvjDSAQuV6Rn7f5qg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Mike Rapoport , kernel test robot Cc: Roman Gushchin , llvm@lists.linux.dev, kbuild-all@lists.01.org, GNU/Weeb Mailing List , linux-kernel@vger.kernel.org, Suren Baghdasaryan , Mike Rapoport , Andrew Morton , Linux Memory Management List , Minchan Kim Subject: Re: [ammarfaizi2-block:google/android/kernel/common/android12-trusty-5.10 4036/5872] WARNING: modpost: vmlinux.o(.text+0x4111c4): Section mismatch in reference from the function memblock_bottom_up() to the variable .meminit.data:memblock Message-ID: References: <202203301412.MZ7wQvQz-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202203301412.MZ7wQvQz-lkp@intel.com> X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: linux.dev X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 On Wed, Mar 30, 2022 at 02:53:14PM +0800, kbuild test robot wrote: > Hi Roman, > > FYI, the error/warning still remains. > > tree: https://github.com/ammarfaizi2/linux-block google/android/kernel/common/android12-trusty-5.10 > head: 07055bfd3d810d41a38354693dfaa55a6f8c0025 > commit: 0e0bfc41fdf4d79d39ebe929844cdee44f97366d [4036/5872] UPSTREAM: mm: cma: allocate cma areas bottom-up > config: x86_64-randconfig-a005 (https://download.01.org/0day-ci/archive/20220330/202203301412.MZ7wQvQz-lkp@intel.com/config) > compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 0f6d9501cf49ce02937099350d08f20c4af86f3d) > 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 > # https://github.com/ammarfaizi2/linux-block/commit/0e0bfc41fdf4d79d39ebe929844cdee44f97366d > git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block > git fetch --no-tags ammarfaizi2-block google/android/kernel/common/android12-trusty-5.10 > git checkout 0e0bfc41fdf4d79d39ebe929844cdee44f97366d > # save the config file to linux build tree > mkdir build_dir > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash > > 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+0x4111c4): Section mismatch in reference from the function memblock_bottom_up() to the variable .meminit.data:memblock > The function memblock_bottom_up() references > the variable __meminitdata memblock. > This is often because memblock_bottom_up lacks a __meminitdata > annotation or the annotation of memblock is wrong. I guess this patch should fix it, however I fail to reproduce the original issue. Maybe it's up to the specific compiler version. -- From b55a8dd19f4156d7e24ec39b18ede06965ce1c4f Mon Sep 17 00:00:00 2001 From: Roman Gushchin Date: Wed, 30 Mar 2022 14:42:12 -0700 Subject: [PATCH] memblock: fix memblock_bottom_up() and memblock_set_bottom_up() annotations memblock_bottom_up() and memblock_set_bottom_up() lack __meminitdata annotations causing compiler warnings like: WARNING: modpost: vmlinux.o(.text+0x4111c4): Section mismatch in reference from the function memblock_bottom_up() to the variable .meminit.data:memblock Fix it by adding the missing annotation and removing the wrong __meminit annotation. Reported-by: kernel test robot Signed-off-by: Roman Gushchin --- include/linux/memblock.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/memblock.h b/include/linux/memblock.h index 50ad19662a32..536bc2fc31e6 100644 --- a/include/linux/memblock.h +++ b/include/linux/memblock.h @@ -460,7 +460,7 @@ static inline void *memblock_alloc_node(phys_addr_t size, /* * Set the allocation direction to bottom-up or top-down. */ -static inline __init_memblock void memblock_set_bottom_up(bool enable) +static inline __initdata_memblock void memblock_set_bottom_up(bool enable) { memblock.bottom_up = enable; } @@ -470,7 +470,7 @@ static inline __init_memblock void memblock_set_bottom_up(bool enable) * if this is true, that said, memblock will allocate memory * in bottom-up direction. */ -static inline __init_memblock bool memblock_bottom_up(void) +static inline __initdata_memblock bool memblock_bottom_up(void) { return memblock.bottom_up; } -- 2.30.2