Received: by 2002:ac0:da4c:0:0:0:0:0 with SMTP id a12csp2687797imi; Mon, 25 Jul 2022 05:43:39 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tvoeXvT2pzCzjIoeNH5Aj0khAcDbbbQdlteoq/gjYWkfPNQ60d+CGkIR5m6cftVENmntmz X-Received: by 2002:a05:6402:26c8:b0:43c:1ce4:e9a4 with SMTP id x8-20020a05640226c800b0043c1ce4e9a4mr2460436edd.26.1658752857009; Mon, 25 Jul 2022 05:40:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658752857; cv=none; d=google.com; s=arc-20160816; b=ykyE931izc6vcgUqFx1+NFXHOWL3bu4EuPReuWFQkpxbIfu2GM1GsFt5IPrmKpbvpV D7FMVL4/+pLrRo/310y74hOSIBstH9Dz1/pRDGIIz+06O1DNvu+joz/ukV4Q3y99bj+y P/SiRpWg9N5k6bz5giBVEBX6ZYVSKIahjNEnvB+Sl+Hw4ZBwhwa7LgR6CDZ516dD+uls thvYpo+izw4tj7OlB7iQOR7bOTbBZRvF7gucbkdEkn6ZHpfHtO2fAbTLxtwrkPG7fn4v ApY1QOXOvJZD1AZ+8IoDaRRCcpr98FCPL4bORsHGSRfDD1dXQ+gldkPvk9UjLQNwkt3L FZCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:references:in-reply-to:subject:cc:to:from; bh=lTKXIOFlkWAgQ4UNuOua20Wqbp7gf58ND7z02ByDA20=; b=RHW/hl0Ej+JgStp+z+YJXND1GrJaVdYOvYf5ZxLyxzVXYF9C93wkdV0yfkiUj0lnu1 PeS7MX0gkBJckpozrijEbs2RxXZRCNnwqnPFcSrLxOxEuMiJIQw86DS2fuWFTbSjk1e/ xhTRzZ07SdQsnaLNi5TRIaabgoGDTWCl5LafqpZbXv14IwEhdR3nMeLMUtrrafxl8q6X IpmB1wqGR5fUQc5JJ33va5I1JwoJCEEBFTw988Ae4X9WynZINyuVTY1ZNr06FdDxiEqZ X6gK55Bao8ksUdydOCK0V9WglfnU0x1RpTl4zzfDQA/zxchxPru8cloQDyklVF9fvHru AOFA== ARC-Authentication-Results: i=1; mx.google.com; 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 a65-20020a509ec7000000b0043a256a05c5si13246553edf.548.2022.07.25.05.40.31; Mon, 25 Jul 2022 05:40:57 -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; 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 S234761AbiGYMZ0 convert rfc822-to-8bit (ORCPT + 99 others); Mon, 25 Jul 2022 08:25:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231722AbiGYMZY (ORCPT ); Mon, 25 Jul 2022 08:25:24 -0400 Received: from gandalf.ozlabs.org (mail.ozlabs.org [IPv6:2404:9400:2221:ea00::3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4402E089 for ; Mon, 25 Jul 2022 05:25:23 -0700 (PDT) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 4LrzlP5kY6z4x1V; Mon, 25 Jul 2022 22:25:20 +1000 (AEST) From: Michael Ellerman To: Dan =?utf-8?Q?Hor=C3=A1k?= Cc: amd-gfx@lists.freedesktop.org, Linus Torvalds , Guenter Roeck , linux-kernel@vger.kernel.org, Alex Deucher , linuxppc-dev@lists.ozlabs.org Subject: Re: [PATCH] amdgpu: re-enable DCN for ppc64le In-Reply-To: <20220722145453.eb37bd3a99c4b738ed2e26b9@danny.cz> References: <20220722082122.571974-1-dan@danny.cz> <87o7xhcoqh.fsf@mpe.ellerman.id.au> <20220722145453.eb37bd3a99c4b738ed2e26b9@danny.cz> Date: Mon, 25 Jul 2022 22:25:19 +1000 Message-ID: <87pmhtbcr4.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8BIT X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_HELO_PASS,SPF_PASS 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 Dan Horák writes: > On Fri, 22 Jul 2022 22:32:06 +1000 > Michael Ellerman wrote: >> Dan Horák writes: >> > Commit d11219ad53dc disabled the DCN driver for all platforms that >> > define PPC64 due long build issues during "make allmodconfig" using >> > cross-compilation. Cross-compilation defaults to the ppc64_defconfig >> > and thus big-endian toolchain configuration. The ppc64le platform uses a >> > different ABI and doesn't suffer from the build issues. >> >> Unfortunately it's a bit messier than that. >> >> The build error occurs when the compiler is built to use a 64-bit long >> double type. >> >> The ppc64le ABI document says that long double should be 128-bits, but >> there are ppc64le compilers out there that are configured to use 64-bit >> long double, notably the kernel.org crosstool compilers. >> >> So just testing for CPU_LITTLE_ENDIAN means we'll still get build errors >> on those compilers. >> >> But I think we can detect the long double size and key off that. Can you >> test the patch below works for you? >> >> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig >> index 7aa12e88c580..e9f8cd50af99 100644 >> --- a/arch/powerpc/Kconfig >> +++ b/arch/powerpc/Kconfig >> @@ -281,6 +281,9 @@ config PPC >> # Please keep this list sorted alphabetically. >> # >> >> +config PCC_LONG_DOUBLE_128 >> + def_bool $(success,test "$(shell,echo __LONG_DOUBLE_128__ | $(CC) -E -P -)" = 1) > > ^^^ there is a typo s/PCC/PPC/ :-) Oops, renamed it after testing :} > with that fixed, it then defines AMD_DC_DCN on Fedora 36 with > gcc-12.1.1-1.fc36.ppc64le and we should be OK. Thanks. I'll send a proper patch. cheers