Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp816958rwb; Thu, 18 Aug 2022 12:48:06 -0700 (PDT) X-Google-Smtp-Source: AA6agR79VxcNoRbfa2SuIwRQjfcqMRdpV+OtNZW26vfjUPZS/4tEyogsNluyR0Moan8IAarH1olP X-Received: by 2002:a17:902:8505:b0:171:3df7:dea1 with SMTP id bj5-20020a170902850500b001713df7dea1mr3883084plb.110.1660852086011; Thu, 18 Aug 2022 12:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660852086; cv=none; d=google.com; s=arc-20160816; b=iHWqQ1GhWCaVVGibO8wHbjNuwjA+QUERH94r3Bf7k+7C9D/XSjPM9Yl1F/+CyDhkrl lo8YfpEHcBOHhAIMmC1WyD1dHRJOb9aOUUQTGzLOcaJAEm43fo9hsLrLqfic01J2dUlS kWi/TYBouvWYs699YPC/1g2Y4rjeTPHBGxkMurEYgV3ba0UVvwm81DKQQyofAf3yUJWi 6cSc3v3S6YojkMfyafx80prHx9JX5RcBkGI8sVplfmz2kegq6JtEazmsoYvaQY33o2kg YRsBxDue+qWgonvuzghDe+Fn/MKjkADzOM1Vx0Yp8VT7DvvBgjmFkr947bapO9/nlnpn KvGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=eQTG/989/DAu6Exi05B4ixu+5J4EP6ThaWhb/xNoy+s=; b=fqMtmCp3J0VAH2gXF9LhdaFg6ccU7cTXwjBif6et27tQ4jN7xLl54Ca2qA7Qe6/8VN dYqpe6Obfad4+Jg6wygSnzTBMF71ZlOKJzhl9eW9LFuMBTIGr7jLfNQP68mSgKfYKR7Q p9rZDZ51sa+niUvlkZUUbvWlEwgz+ZdVsilMcI8ZeYJS0zmtqrVMNbIMhKddEIf9vC91 acc+BxwpY520h4eZIxeZJluhGHFFhy7FGVvrln3Ng0u9T7X33rE0myW4eVEsf2mWTp8J oALPIe35ocg7Uywhp4Sa6xF7ow0PYZV5JN/L0mox8TpjWPHbWsmS0Izl+kEgeohotgbK HkkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="Xf4Ah/68"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j9-20020a63b609000000b004127f565539si2081512pgf.466.2022.08.18.12.47.52; Thu, 18 Aug 2022 12:48:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b="Xf4Ah/68"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242725AbiHRTe4 (ORCPT + 99 others); Thu, 18 Aug 2022 15:34:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230500AbiHRTex (ORCPT ); Thu, 18 Aug 2022 15:34:53 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE229CE47B; Thu, 18 Aug 2022 12:34:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=eQTG/989/DAu6Exi05B4ixu+5J4EP6ThaWhb/xNoy+s=; b=Xf4Ah/68SvKJXBUh3t+EzcI/kl p0SaEWsgfgYL4IeuEygr6avs8qZMXojf5td0sD+sqXd0PjU+5Wp324p1dQEG59JiMaCV9jYqBhk5x tKdsy7i29Vixdm2oe2vuctWNtujThsTu4TcEuoKxdAsLtNPQWe9Am+KylYFNWVErk+6SQDxXi/tVh 3DIsSAN1x/v2RipIg5LRRH8Gm/03DpxvzJdT/t43hmlUaAkWMHAoJXkSubNqBPtTO+oma6YUAcVYV UwV4JGX7IyuLLckngrOo5vh/XVkh+vQM0X3RlMSfUJme6tsYaWWTWkhhUCHQMYni9V/kAPNvzJo/8 vHEtPcxQ==; Received: from [2601:1c0:6280:3f0::a6b3] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1oOlHz-008gDy-TP; Thu, 18 Aug 2022 19:34:48 +0000 Message-ID: Date: Thu, 18 Aug 2022 12:34:46 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: build failure of next-20220817 for amdgpu due to 7bc913085765 ("drm/amdkfd: Try to schedule bottom half on same core") Content-Language: en-US To: Sudip Mukherjee , Felix Kuehling , Alex Deucher Cc: Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , "Pan, Xinhui" , David Airlie , Daniel Vetter , linux-next , dri-devel , amd-gfx mailing list , linux-kernel References: <5638aaf1-b808-bdc6-d84a-820f24facea6@infradead.org> From: Randy Dunlap In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham 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 Hi-- On 8/18/22 12:15, Sudip Mukherjee wrote: > On Thu, Aug 18, 2022 at 4:10 PM Randy Dunlap wrote: >> >> >> >> On 8/18/22 03:43, Sudip Mukherjee wrote: >>> On Thu, Aug 18, 2022 at 3:09 AM Randy Dunlap wrote: >>>> >>>> >>>> >>>> On 8/17/22 19:01, Alex Deucher wrote: >>>>> On Wed, Aug 17, 2022 at 6:03 PM Sudip Mukherjee (Codethink) >>>>> wrote: >>>>>> >>>>>> Hi All, >>>>>> >>>>>> Not sure if it has been reported, build of next-20220817 fails with the >>>>>> error: >>>>>> >>>>>> ERROR: modpost: "cpu_smallcore_map" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! >>>>>> >>>>>> Trying to do a git bisect to find out the offending commit. >>>>>> >>>>> >>>>> Thanks. I don't see that symbol in the driver at all. Not sure where >>>>> it is coming from. >>>>> >>>> >>>> It's powerpc only. >>>> >>>> Sudip, is it non-CONFIG_SMP by any chance? >>> >>> Ohhh.. really sorry for the incomplete report. I should not try to >>> mail while travelling. >>> >>> The error is seen with powerpc allmodconfig and it has CONFIG_SMP=y. >> >> OK, I see that also, but it doesn't make any sense (to me). >> >> I did 'objdump' on the code file (amdgpu.o) and it's listed as >> undefined but there are no code references to it. > > cpu_smt_mask() is called by drivers/gpu/drm/amd/amdkfd/kfd_device.c. > and cpu_smt_mask() is an inline function in > arch/powerpc/include/asm/smp.h which is doing "return > per_cpu(cpu_smallcore_map, cpu);" > > So, the offending commit is 7bc913085765 ("drm/amdkfd: Try to schedule > bottom half on same core"). Thanks for digging that up. It just needs to have that symbol exported I think. This builds cleanly now. I can submit it or one of the AMD gfx developers can do so. --- arch/powerpc/kernel/smp.c | 1 + 1 file changed, 1 insertion(+) --- a/arch/powerpc/kernel/smp.c +++ b/arch/powerpc/kernel/smp.c @@ -86,6 +86,7 @@ DEFINE_PER_CPU(cpumask_var_t, cpu_core_m static DEFINE_PER_CPU(cpumask_var_t, cpu_coregroup_map); EXPORT_PER_CPU_SYMBOL(cpu_sibling_map); +EXPORT_PER_CPU_SYMBOL(cpu_smallcore_map); EXPORT_PER_CPU_SYMBOL(cpu_l2_cache_map); EXPORT_PER_CPU_SYMBOL(cpu_core_map); EXPORT_SYMBOL_GPL(has_big_cores); -- ~Randy