Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp1646696pxp; Thu, 17 Mar 2022 13:31:33 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzI+/wWsc3kLtv827/Qdn8pT1sM+i5H95uBCb98GjIvnZV3p/lWGwUAH41dPufI0DrGMyl7 X-Received: by 2002:a17:902:8e82:b0:151:777b:6d7 with SMTP id bg2-20020a1709028e8200b00151777b06d7mr6974369plb.172.1647549092970; Thu, 17 Mar 2022 13:31:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647549092; cv=none; d=google.com; s=arc-20160816; b=RD8Tf5vkSUvKPX8Jto5hyunAjDM6ikIlPPNXDyCyoLEjhzER5+dQNRjL9W1kgTwyr8 SoV4VgyfXpL+fnt0NUTf091iZp6n3eRbvICc9ohO+C5Q9paT2B8jy6KfpmS+qXmORsfv kTP7Q5vG4VTsDpQ6zM8IVshnVLSjnUhoifcs+7Pam33TOhZ7DdQZqCLD6Vr+pOz6U68v QXzflPpo+FRQhpy/P01Z50aNR7+aSHUidPggH4UFQguVzh6Bz7P0KhHngBih7LOv9Pfg 4/+JiqzpVbtmEt/fRybYFL67pGUUceEdt1kA5CgQlSuH0v4nm6DZfvpcvnMD+pZDEx9G RYhw== 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:date:dkim-signature; bh=mMOjieI0qzIYfRMDlfr5HCocAdYTGwybirX7HeVkJU4=; b=wHIS5Ej0lUCnVXMsPNb7FAHb+OvF1vGxLCN3Dl6D9H+1jSYD9UsTTu+OnixmDbwEgW mm0h4h/oOe1t8O2vjiG6QiqPl6klMMtn/bSLYdAm7rKImdPayvEVDJfEIYMeH7KyEbTY jMDnxZxSkNRKdNhZXj4Pnu2DwAmSgpiQ7ieLTDCIAN0jZS5OlgdFU9WWsAaexq724IFd DPki7WvUG+08v/Ah3m4VpIWvtdT+yb5ZEn/Vrf4mILeJrf9A1JmJ6mgtS3VqwF7CPBMN sEIbBShTTop2DwTgMlNzCDKt0N2w7YIhMZoUvywrx/oCv12pWUTbGscgmQYEbuKEkapI poAA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JI1FfV3d; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 129-20020a630587000000b003816043f021si3093411pgf.534.2022.03.17.13.31.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 13:31:32 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=JI1FfV3d; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id BB8EC2D259D; Thu, 17 Mar 2022 13:06:13 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236123AbiCQP4P (ORCPT + 99 others); Thu, 17 Mar 2022 11:56:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229549AbiCQP4N (ORCPT ); Thu, 17 Mar 2022 11:56:13 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B14312013DC; Thu, 17 Mar 2022 08:54:56 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id w8so4779574pll.10; Thu, 17 Mar 2022 08:54:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=mMOjieI0qzIYfRMDlfr5HCocAdYTGwybirX7HeVkJU4=; b=JI1FfV3dtK4SWgK8jB1/DulUo5IGShqwyM+DnQc7ctLk1RRIqBYwEJkXjlWXfw+GaH 1NPxSFy4whY9/lMlGDGORM6mL/wIENFVmcb1cadAFVhpnxZs/iXEkWAzhABiCi5TrGqs hK6QUwVpZpKycjOwbXtlziVa/7XqQrVnEwANFp178Gzzc9TBNrMQVJdSWK5/FYVLKqEn AuwkTKQh6tHJKRVXCsqUD2YL94pERiYQZ6QzfwALFFl9kiLzRiGqqIZfwKcvbJrpEcZN uE3bKv8V8RGs/MPrKECYJt9Z7jQTzdltZl//5aweUbOWPKCiSRCZEkGoOb4ev98F9Mau sxLA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=mMOjieI0qzIYfRMDlfr5HCocAdYTGwybirX7HeVkJU4=; b=NNgGOELtzEJ2sW3qGH4x6nEEC6t6o02E1AIcoYSj0OuIDsZYS73LPzEt4kYSVIYUCb vD4/BNIO4yZ+u/RvSjx8dwSZQxF04yQ39u9VFsd3XxP0zXIODK/uL/U9svMhLVIaYw4S LLiUu4ZkUQjO5PDWVDzexbebRci9d2cpearkw37IVBm9ITfqjNn887J50enn1sA5sxmF dpz1jVuNRw4cv+3IBxYgnnrIdto/nXgXvTmrtsT8YmwttuEeXjuT+wQ9xl7rwdryLBOg LCrlecu3lTZePSkuqk+AnVsXJm+R6qbfNkCsSg6OcjqczvXp0G+h7/1Kytnqu4DaNXLw hpfg== X-Gm-Message-State: AOAM533TKODcWeMSZkQfAhocx+OTgUbBteIdyMpTnLEJSzEsONPra+Om Dq/WHU5wGhVKOFStZpqkk+s= X-Received: by 2002:a17:902:7610:b0:151:6152:549c with SMTP id k16-20020a170902761000b001516152549cmr5466701pll.91.1647532496165; Thu, 17 Mar 2022 08:54:56 -0700 (PDT) Received: from ip-172-31-19-208.ap-northeast-1.compute.internal (ec2-18-181-137-102.ap-northeast-1.compute.amazonaws.com. [18.181.137.102]) by smtp.gmail.com with ESMTPSA id b2-20020a056a000a8200b004f1111c66afsm7904707pfl.148.2022.03.17.08.54.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Mar 2022 08:54:55 -0700 (PDT) Date: Thu, 17 Mar 2022 15:54:51 +0000 From: Hyeonggon Yoo <42.hyeyoo@gmail.com> To: Zhouyi Zhou Cc: rcu , "Paul E. McKenney" , Josh Triplett , Steven Rostedt , Mathieu Desnoyers , Joel Fernandes , linux-kernel Subject: Re: RCU: undefined reference to irq_work_queue Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,HK_RANDOM_FROM,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 Thu, Mar 17, 2022 at 11:22:28PM +0800, Zhouyi Zhou wrote: > Hi, > > On Thu, Mar 17, 2022 at 8:48 PM Hyeonggon Yoo <42.hyeyoo@gmail.com> wrote: > > > > Hello RCU folks, > > > > I like to use minimal configuration for kernel development. > > when building with tinyconfig + CONFIG_PREEMPT=y on arm64: > I invoke cross compiler to reproduce the bug on my X86 machine > $make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- > CC=aarch64-linux-gnu-gcc-10 tinyconfig > let CONFIG_PREEMPT=y in .config > $make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- > CC=aarch64-linux-gnu-gcc-10 -j 16 > LD vmlinux > aarch64-linux-gnu-ld: kernel/rcu/update.o: in function `call_rcu_tasks': > update.c:(.text+0xb30): undefined reference to `irq_work_queue' > update.c:(.text+0xb30): relocation truncated to fit: R_AARCH64_CALL26 > against undefined symbol `irq_work_queue' Right. that was exactly what I faced :) > > > > ld: kernel/rcu/update.o: in function `call_rcu_tasks': > > update.c:(.text+0xb2c): undefined reference to `irq_work_queue' > > update.c:(.text+0xb2c): relocation truncated to fit: R_AARCH64_CALL26 against undefined symbol `irq_work_queue' > > make: *** [Makefile:1155: vmlinux] Error 1 > > > > It seems RCU calls irq_work_queue() without checking if CONFIG_IRQ_WORK is enabled. > > > > -- > > Thank you, You are awesome! > > Hyeonggon :-) > Meanwhile, there is no error for doing the same to build X86 kernel. > I think the reason is: > arch/x86/Kconfig select PERF_EVENT > and PERF_EVENT select IRQ_WORK Right. selecting anything that selects IRQ_WORK solves the problem. Simply enabling printk also solves this. > Hope my little research could provide some clues to solve the problem ;-) Thank you for kind reply! BTW, can we just fix this? (e.g. by conditionally compiling the problematic code or always selecting IRQ_WORK) > You are welcome > Cheers > Zhouyi -- Thank you, You are awesome! Hyeonggon :-)