Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp67435lqg; Wed, 10 Apr 2024 15:56:15 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCV/pRIT+C7Ef4A59fSkU4Um6Oiead77j9N5Ur5pNM5siPzXqhHMrONtXFXaWDi8AkooxoL48JPbmLZ01AEfFVEIUPPatRrnprUU49tBLA== X-Google-Smtp-Source: AGHT+IFGqJhNb9O0sEa0MlKQNF9zSK3W3zXlsj72pTNOsap1A21LV3xe15uCNw4imXs6qmRFBl2u X-Received: by 2002:a05:6512:159:b0:515:8c97:ff47 with SMTP id m25-20020a056512015900b005158c97ff47mr2861599lfo.23.1712789775450; Wed, 10 Apr 2024 15:56:15 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712789775; cv=pass; d=google.com; s=arc-20160816; b=bMFwk1pFHz/GMBxW1FVAjj/SnrNznSiYAMWSNImhjUP+AK0WtxjOxTl0cvLXE3U9X+ BObk0m3DRu5ydKdl1tzjeH6DX6YIhEmReySOt2k1UmhYKizCdXOfsdI3eDr/KdZlbKxn tq2mkFcFeSEJ124SDpABrDUSWJRuWXV6yGUgvBNWqoVdpPrQElMrn49LQIExHzINTCN8 1sb16YxlIaFB/akXyCVoF7rnlZrHr7kgumHqbsMiaMHtdAQhG0FC4w0kWGkbPfL61uk+ o1Lc3KOh9PmrtIs7UWV2h1jkjeziILmxtd5Flhaz9OYw5WRaTbn3z2kgVn7d3xwe6fv3 6dGg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=jexQJX0oM9fCmEvziBSolme7TKZ0EEYhwHpwJAChgvs=; fh=uqpY7eqn/1JE5/hGga1dlakruNMetW4dfOYCckMKSQs=; b=EtFGUtlD7aKIrH7A97w5ayUR29ApazRbFDf/vccxpA9PKyM5LJxRMiMcHq2aciQV3o wx0PfQp69xnvTYqr07lG7z3upUCRK4jOMhPfE7jajKwNm1spIC3rYhB6eiBIeVDJcmA/ bNL3udQc/ClZ6TFHR9rUCn62jM8bzpuGcAe5ITPho+x+JE0m5pqHNNU4xhE6R7DjBV72 DKXCSpd6g10MaTCsaqpN/OJ9Poz4CZcUfMbnELVi+JvjeKEaVLebNGdYKPXewt7XW9rX vWCIAPgnsUHINuoP1Q4JQ9rJsnVwtnsZ6Zj3H8bCfiHYbG2dLfIBv6pziKZ57aKhCsVk zQTA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=InxdgZCZ; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-139497-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139497-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id i8-20020a17090671c800b00a51b84d4040si110406ejk.85.2024.04.10.15.56.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 15:56:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139497-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=InxdgZCZ; arc=pass (i=1 spf=pass spfdomain=sifive.com dkim=pass dkdomain=sifive.com dmarc=pass fromdomain=sifive.com); spf=pass (google.com: domain of linux-kernel+bounces-139497-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139497-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=sifive.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 2F1981F292EC for ; Wed, 10 Apr 2024 22:56:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EDDE31350FA; Wed, 10 Apr 2024 22:47:33 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b="InxdgZCZ" Received: from mail-oa1-f43.google.com (mail-oa1-f43.google.com [209.85.160.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D889C13281D for ; Wed, 10 Apr 2024 22:47:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.160.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712789252; cv=none; b=OzMctTqqt9CSeVWIiqbvCHuVNNlR/h9hGaSjm4/kYDPpYSw3dPQpXsd8AjDrmzrE6r2pXu22K/65iVLsxdy4mD/Vd1gmRy1Cab9u9cCa/yV9asxYU+ZesJ1pYEpzFjWNsXisDniT8gLEFE571T1OJGK9iAeZfxM6u/a4rXlAsto= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712789252; c=relaxed/simple; bh=uDU3PtkfpbBDGwJOViI0NFiMEmcXnUAvLCRTEusiKVk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Tb6uvKxKCxw7GfD8TjuRSQFmyWjHLoDtWcZ6OSjVeey/aZ6LGqtAqLvItnKYV7FT2XxX+wieP+SRARzxBoUv5zqyEzkBlj+rYEeS3AqXIatR7E51xhE6FWa2rbHTtsbtDR9dHxCaDLW/66bSosftzBsLt2geSYDZAPr/e5T6YxM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com; spf=pass smtp.mailfrom=sifive.com; dkim=pass (2048-bit key) header.d=sifive.com header.i=@sifive.com header.b=InxdgZCZ; arc=none smtp.client-ip=209.85.160.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=sifive.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sifive.com Received: by mail-oa1-f43.google.com with SMTP id 586e51a60fabf-22f746c56a2so1400542fac.0 for ; Wed, 10 Apr 2024 15:47:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; t=1712789250; x=1713394050; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=jexQJX0oM9fCmEvziBSolme7TKZ0EEYhwHpwJAChgvs=; b=InxdgZCZ3tXHTxDN2HsO5Qj8K94kQvCrSlHJ4gVr0UU4P7owLbbLzxcN5yVcHFP+NH 4Eo//eSwguEo82JBtG2Ns8sya0EkSysyHOUnfp4ou7S7LpxrV0E0/QTH2BFUeHrT3tLS 6FK5+9wDjmXzugmO/o6KpTcqdkdPrsWKjJMeAd6xg11sz1rsdjl7+8jtGpX1iOxhUgtl d46yk0vjJZDHOsDg5ATxjQOZ8lpMLYa6AaflNtnBZMW50Pa4Ilw6TrhHakgd4TMArPoe 2raTiyl9JBb+KJI0nqedu6OhGlEw5rRKcLgKbZxhizQzUJ/ANVW/8gBvTiTNVsVUK/0V zh0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712789250; x=1713394050; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jexQJX0oM9fCmEvziBSolme7TKZ0EEYhwHpwJAChgvs=; b=Bz0lM+9E/xdu9wXFr3FOmVQRT1S102JaRlCSi++2NU87CWxwWryc/68zWCE4dI9EJa yEp/uJ17xpVAZV9URPKLux1OemC5TyPR38vj6MrUtIDKxELGxWgC2/Mq4iKeoioLQyVY AEclFd94vUbzkP8UCYEo1vz0JyciT+/9jNlmCctGAe3sAzCqtC+JXwu6Uegvbb5SdbqS rdtcNx/jfwrrA6OxJop1gbvIhQWWu1gvGAKop/FBIjaFQzNoSaQ7Udu+jvNrYFBUR9xu VXcXoVT3RoIYG6CC03HyjjwWmk4C2Uva7Gz8h3ihc4L9n8p/uISA6E7CmpmtLA6ibj2B kf8g== X-Forwarded-Encrypted: i=1; AJvYcCU1TrAEMSyxItG/AIfTYM5XcTc3pcdzKvGtnxo4nNMB0whwVWnSyJpn0WrlOK3Hhc6vs438xZWre9D1e4WJSGtvNs6qWW7RcyLAfxTk X-Gm-Message-State: AOJu0YzIPnFSxZqCvYuQe4w+efiXWciM+/oKadJuTxvZpv6gdfWE20Xp Zcgbw7uWRirQrYUwvvF6tMgl+iP6agSGRHF3koOvZjfbCHi1TbZvfuPBh7RciAc= X-Received: by 2002:a05:6871:80a:b0:22d:f859:2225 with SMTP id q10-20020a056871080a00b0022df8592225mr3914938oap.6.1712789249782; Wed, 10 Apr 2024 15:47:29 -0700 (PDT) Received: from [100.64.0.1] ([170.85.8.167]) by smtp.gmail.com with ESMTPSA id lf3-20020a0568700c4300b0022eba51882fsm75970oab.53.2024.04.10.15.47.28 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 10 Apr 2024 15:47:29 -0700 (PDT) Message-ID: <75a37a4b-f516-40a3-b6b5-4aa1636f9b60@sifive.com> Date: Wed, 10 Apr 2024 17:47:27 -0500 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 13/15] drm/amd/display: Use ARCH_HAS_KERNEL_FPU_SUPPORT To: Thiago Jung Bauermann Cc: Andrew Morton , linux-arm-kernel@lists.infradead.org, x86@kernel.org, linux-kernel@vger.kernel.org, linux-arch@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-riscv@lists.infradead.org, Christoph Hellwig , loongarch@lists.linux.dev, amd-gfx@lists.freedesktop.org, Alex Deucher References: <20240329072441.591471-1-samuel.holland@sifive.com> <20240329072441.591471-14-samuel.holland@sifive.com> <87wmp4oo3y.fsf@linaro.org> Content-Language: en-US From: Samuel Holland In-Reply-To: <87wmp4oo3y.fsf@linaro.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Thiago, On 2024-04-10 5:21 PM, Thiago Jung Bauermann wrote: > Samuel Holland writes: > >> Now that all previously-supported architectures select >> ARCH_HAS_KERNEL_FPU_SUPPORT, this code can depend on that symbol instead >> of the existing list of architectures. It can also take advantage of the >> common kernel-mode FPU API and method of adjusting CFLAGS. >> >> Acked-by: Alex Deucher >> Reviewed-by: Christoph Hellwig >> Signed-off-by: Samuel Holland > > Unfortunately this patch causes build failures on arm with allyesconfig > and allmodconfig. Tested with next-20240410. > > Error with allyesconfig: > > $ make -j 8 \ > O=$HOME/.cache/builds/linux-cross-arm \ > ARCH=arm \ > CROSS_COMPILE=arm-linux-gnueabihf- > make[1]: Entering directory '/home/bauermann/.cache/builds/linux-cross-arm' > ⋮ > arm-linux-gnueabihf-ld: drivers/gpu/drm/amd/display/dc/dml/dcn20/dcn20_fpu.o: in function `dcn20_populate_dml_pipes_from_context': > dcn20_fpu.c:(.text+0x20f4): undefined reference to `__aeabi_l2d' > arm-linux-gnueabihf-ld: dcn20_fpu.c:(.text+0x210c): undefined reference to `__aeabi_l2d' > arm-linux-gnueabihf-ld: dcn20_fpu.c:(.text+0x2124): undefined reference to `__aeabi_l2d' > arm-linux-gnueabihf-ld: dcn20_fpu.c:(.text+0x213c): undefined reference to `__aeabi_l2d' > arm-linux-gnueabihf-ld: drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.o: in function `pipe_ctx_to_e2e_pipe_params': > dcn_calcs.c:(.text+0x390): undefined reference to `__aeabi_l2d' > arm-linux-gnueabihf-ld: drivers/gpu/drm/amd/display/dc/dml/calcs/dcn_calcs.o:dcn_calcs.c:(.text+0x3a4): more undefined references to `__aeabi_l2d' follow > arm-linux-gnueabihf-ld: drivers/gpu/drm/amd/display/dc/dml2/dml2_wrapper.o: in function `optimize_configuration': > dml2_wrapper.c:(.text+0xcbc): undefined reference to `__aeabi_d2ulz' > arm-linux-gnueabihf-ld: drivers/gpu/drm/amd/display/dc/dml2/dml2_translation_helper.o: in function `populate_dml_plane_cfg_from_plane_state': > dml2_translation_helper.c:(.text+0x9e4): undefined reference to `__aeabi_l2d' > arm-linux-gnueabihf-ld: dml2_translation_helper.c:(.text+0xa20): undefined reference to `__aeabi_l2d' > arm-linux-gnueabihf-ld: dml2_translation_helper.c:(.text+0xa58): undefined reference to `__aeabi_l2d' > arm-linux-gnueabihf-ld: dml2_translation_helper.c:(.text+0xa90): undefined reference to `__aeabi_l2d' > make[3]: *** [/home/bauermann/src/linux/scripts/Makefile.vmlinux:37: vmlinux] Error 1 > make[2]: *** [/home/bauermann/src/linux/Makefile:1165: vmlinux] Error 2 > make[1]: *** [/home/bauermann/src/linux/Makefile:240: __sub-make] Error 2 > make[1]: Leaving directory '/home/bauermann/.cache/builds/linux-cross-arm' > make: *** [Makefile:240: __sub-make] Error 2 > > The error with allmodconfig is slightly different: > > $ make -j 8 \ > O=$HOME/.cache/builds/linux-cross-arm \ > ARCH=arm \ > CROSS_COMPILE=arm-linux-gnueabihf- > make[1]: Entering directory '/home/bauermann/.cache/builds/linux-cross-arm' > ⋮ > ERROR: modpost: "__aeabi_d2ulz" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! > ERROR: modpost: "__aeabi_l2d" [drivers/gpu/drm/amd/amdgpu/amdgpu.ko] undefined! > make[3]: *** [/home/bauermann/src/linux/scripts/Makefile.modpost:145: Module.symvers] Error 1 > make[2]: *** [/home/bauermann/src/linux/Makefile:1876: modpost] Error 2 > make[1]: *** [/home/bauermann/src/linux/Makefile:240: __sub-make] Error 2 > make[1]: Leaving directory '/home/bauermann/.cache/builds/linux-cross-arm' > make: *** [Makefile:240: __sub-make] Error 2 In both cases, the issue is that the toolchain requires runtime support to convert between `unsigned long long` and `double`, even when hardware FP is enabled. There was some past discussion about GCC inlining some of these conversions[1], but that did not get implemented. The short-term fix would be to drop the `select ARCH_HAS_KERNEL_FPU_SUPPORT` for 32-bit arm until we can provide these runtime library functions. Regards, Samuel [1]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91970