From: Michael Ellerman <michael@ellerman.id.au>
To: "Dan Horák" <dan@danny.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org,
Alex Deucher <alexdeucher@gmail.com>,
linuxppc-dev@lists.ozlabs.org, Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH] amdgpu: re-enable DCN for ppc64le
Date: Mon, 25 Jul 2022 22:25:19 +1000 [thread overview]
Message-ID: <87pmhtbcr4.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20220722145453.eb37bd3a99c4b738ed2e26b9@danny.cz>
Dan Horák <dan@danny.cz> writes:
> On Fri, 22 Jul 2022 22:32:06 +1000
> Michael Ellerman <michael@ellerman.id.au> wrote:
>> Dan Horák <dan@danny.cz> 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
WARNING: multiple messages have this Message-ID (diff)
From: Michael Ellerman <michael@ellerman.id.au>
To: "Dan Horák" <dan@danny.cz>
Cc: amd-gfx@lists.freedesktop.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Guenter Roeck <linux@roeck-us.net>,
linux-kernel@vger.kernel.org,
Alex Deucher <alexdeucher@gmail.com>,
linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] amdgpu: re-enable DCN for ppc64le
Date: Mon, 25 Jul 2022 22:25:19 +1000 [thread overview]
Message-ID: <87pmhtbcr4.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20220722145453.eb37bd3a99c4b738ed2e26b9@danny.cz>
Dan Horák <dan@danny.cz> writes:
> On Fri, 22 Jul 2022 22:32:06 +1000
> Michael Ellerman <michael@ellerman.id.au> wrote:
>> Dan Horák <dan@danny.cz> 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
next prev parent reply other threads:[~2022-07-25 13:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-22 8:21 [PATCH] amdgpu: re-enable DCN for ppc64le Dan Horák
2022-07-22 12:32 ` Michael Ellerman
2022-07-22 12:32 ` Michael Ellerman
2022-07-22 12:54 ` Dan Horák
2022-07-22 12:54 ` Dan Horák
2022-07-25 12:25 ` Michael Ellerman [this message]
2022-07-25 12:25 ` Michael Ellerman
2022-07-22 13:23 ` Dan Horák
2022-07-22 13:23 ` Dan Horák
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pmhtbcr4.fsf@mpe.ellerman.id.au \
--to=michael@ellerman.id.au \
--cc=alexdeucher@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dan@danny.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.