Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp492710pxb; Wed, 27 Oct 2021 06:55:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwz22NBtr+CD0eXcZIBMh7yoBsn7b5nHiiCZ+DpxOrBxFcx06MK8UaKbRFN0fmcdGawd4yv X-Received: by 2002:a63:ae0b:: with SMTP id q11mr7688002pgf.6.1635342932618; Wed, 27 Oct 2021 06:55:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635342932; cv=none; d=google.com; s=arc-20160816; b=WwX1J2nsAL44fZZvcDfcwYFZvSsiliDtmLfop4z133ddhFQDpF3i2yxotzy9PQNj+x msrWsfO0vTFpweUnkl+YvNLRvnK6I+g3pZomtW8uCzVTbTEr2SssEjtyqzjrDXaWhUeF VDuBer7SJ938T8JxkFN5lM7rMrVr5YsRxQzh3rou8nqlppkWmT1EIS6ZrJ4YofXrCHg9 abyO2/qrkn6SOdRAew7vr6c4xcBtftntzVWM/Q8uj9d/oXCv51NApzQVGVdzZDnkt9LJ DwKLYSgyJyaiZB/3X8yyz6niyWLXFXbg2DZagePCVpVA/aNpU95n1IDhaQX0SwZV/g84 nAig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:references:cc :to:subject:from:dkim-signature; bh=X6fcEAbwRUlxqO8/g60aGuQDzDDW3CnmwfK/tyqVlJo=; b=VNdJzcAi18D4NHwbh9NnDJ43puN7eJIJPWfoaoyUhQuFcbaCujZ4d27xQFg2Di0mV9 Q8xTPqVEYYKDSRoYY6e5KwcTkzXx9U/cL6R34d2AhZmj2xkTGgf26LD4RRS+zW7kvxXO Z49LKAMqkcP/q2D/c9YWCtUo/Xijm+wdA2UYfxlW7S1i7fSwEZ+wYrGv5ZZl9w2712/u kebywWlssh3bGqv+hT8RsltfGYXNFcSEDjROtgriw3YOLuUE7jofgQKqIGCBc1BXshwa 9Ot1EyGEI1L+SWNiLm8R+sL5b3hv37Y0Pcpvz57jjaJr60RIRsROJ+72ZiCovsk0SORn 4OIw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=R8WtgvqC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h19si23018pgv.209.2021.10.27.06.55.19; Wed, 27 Oct 2021 06:55:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=R8WtgvqC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236142AbhJ0BBT (ORCPT + 99 others); Tue, 26 Oct 2021 21:01:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57906 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232410AbhJ0BBS (ORCPT ); Tue, 26 Oct 2021 21:01:18 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E36A0C061570; Tue, 26 Oct 2021 17:58:53 -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:MIME-Version:Date:Message-ID:References:Cc:To: Subject:From:Sender:Reply-To:Content-ID:Content-Description; bh=X6fcEAbwRUlxqO8/g60aGuQDzDDW3CnmwfK/tyqVlJo=; b=R8WtgvqCdXPApZUBXpV+GrvNoV JfryZLRqDgy4d1kc5B3/SFU/31pYaHCKmpsnJOJ7fP+kMj9rWgBRJZvzz9hUc54vQWaek7jsSZyzh R+UlGy50DnabiCCFaW1TexhfSUS09yKHU2yIGZdzY6X23UK2cWsWA8RA84EBq8/M4/QyQfh1RGUu7 HVY+eLPb20oUyZsOM3AhYt6QjggEqidvkuvUGLi/vaxtsQgY8rA3Y4v0ZCTP/bvSocxaOK7bnLmqy zc+SHiHXpDKIjyroNmXsw9UuqlzRsXwcBtnS/ZkkZf/ZIZ50dFmpLjfkac5Uacq7xE4fwLLXN7blP gO6l/kuA==; Received: from [2601:1c0:6280:3f0::aa0b] by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1mfXH1-003Rlf-Rn; Wed, 27 Oct 2021 00:58:35 +0000 From: Randy Dunlap Subject: Re: gpu: drm_fb_cma_helper.c:46: undefined reference to `drm_gem_fb_get_obj' To: Thomas Zimmermann , Naresh Kamboju , dri-devel@lists.freedesktop.org, open list , Linux-Next Mailing List , Linux ARM Cc: Maarten Lankhorst , Maxime Ripard , David Airlie , Daniel Vetter , Andrey Konovalov , Stephen Rothwell , Arnd Bergmann , Alexandre Belloni , Linus Walleij , Arnd Bergmann References: <857ab1a9-0175-2b2c-e729-2620d0221e1e@suse.de> Message-ID: <6862b109-ea12-6ffa-c82b-b23ee26aa5b2@infradead.org> Date: Tue, 26 Oct 2021 17:58:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: <857ab1a9-0175-2b2c-e729-2620d0221e1e@suse.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/26/21 11:21 AM, Thomas Zimmermann wrote: > Hi > > Am 25.10.21 um 14:13 schrieb Naresh Kamboju: >> Regression found on arm gcc-11 built with multi_v5_defconfig >> Following build warnings / errors reported on linux next 20211025. >> >> metadata: >>      git_describe: next-20211025 >>      git_repo: https://gitlab.com/Linaro/lkft/mirrors/next/linux-next >>      git_short_log: 9ae1fbdeabd3 (\"Add linux-next specific files for 20211025\") >>      target_arch: arm >>      toolchain: gcc-11 >>      config: multi_v5_defconfig >> >> build error : >> -------------- >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in >> function `drm_fb_cma_get_gem_obj': >> drivers/gpu/drm/drm_fb_cma_helper.c:46: undefined reference to >> `drm_gem_fb_get_obj' >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: >> undefined reference to `drm_gem_fb_get_obj' >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:46: >> undefined reference to `drm_gem_fb_get_obj' >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.o: in >> function `drm_fb_cma_sync_non_coherent': >> drivers/gpu/drm/drm_fb_cma_helper.c:133: undefined reference to >> `drm_atomic_helper_damage_iter_init' >> arm-linux-gnueabihf-ld: drivers/gpu/drm/drm_fb_cma_helper.c:135: >> undefined reference to `drm_atomic_helper_damage_iter_next' >> make[1]: *** [Makefile:1252: vmlinux] Error 1 >> make[1]: Target '__all' not remade because of errors. >> make: *** [Makefile:226: __sub-make] Error 2 >> >> Reported-by: Linux Kernel Functional Testing >> >> >> build link: >> ----------- >> https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/build.log >> >> build config: >> ------------- >> https://builds.tuxbuild.com/1zzgFZBGjpQ5R0lawQFW9iJ39Hp/config > > Looking at this config, there is: > > CONFIG_DRM=y > # CONFIG_DRM_DP_AUX_CHARDEV is not set > # CONFIG_DRM_DEBUG_MM is not set > # CONFIG_DRM_DEBUG_SELFTEST is not set > CONFIG_DRM_KMS_HELPER=m > # CONFIG_DRM_LOAD_EDID_FIRMWARE is not set > # CONFIG_DRM_DP_CEC is not set > CONFIG_DRM_GEM_CMA_HELPER=y > CONFIG_DRM_KMS_CMA_HELPER=y > > GEM_CMA_HELPER depends on KMS_HELPER, but the latter is a module. That's probably the cause of the problem. Is it intentionally set this way? > The only drivers that select DRM_KMS_HELPER are both =m, so that's how DRM_KMS_HELPER is set also. Symbol: DRM_KMS_HELPER [=m] Type : tristate Defined at drivers/gpu/drm/Kconfig:82 Depends on: HAS_IOMEM [=y] && DRM [=y] Selected by [m]: - DRM_ATMEL_HLCDC [=m] && HAS_IOMEM [=y] && DRM [=y] && OF [=y] && COMMON_CLK [=y] && MFD_ATMEL_HLCDC [=y] && ARM [=y] - DRM_ASPEED_GFX [=m] && HAS_IOMEM [=y] && DRM [=y] && OF [=y] && (COMPILE_TEST [=n] || ARCH_ASPEED [=y]) && MMU [=y] I did the ARM cross-build and also see the linker error. I didn't understand why -- and still don't, but here is a little speculation: In the past (e.g. 10 years ago), we have to move some .o files in lib/ from lib-y to obj-y so that they would always be included in the final object file and not cause their user/caller object files to suffer from undefined references. These happened because unused functions(?) in lib-y files are stripped out of the final object files. The same thing could be happening here (still just guessing). Does that help any? I dunno. Adding Arnd to Cc: to see if he has any ideas... >> >> # To install tuxmake on your system globally >> # sudo pip3 install -U tuxmake >> tuxmake --runtime podman --target-arch arm --toolchain gcc-11 >> --kconfig multi_v5_defconfig >> >> -- >> Linaro LKFT >> https://lkft.linaro.org -- ~Randy