LinuxPPC-Dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Timothy Pearson <tpearson@raptorengineering.com>
To: christophe leroy <christophe.leroy@csgroup.eu>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>
Subject: Re: [PATCH v3] powerpc: Add gpr1 and fpu save/restore functions
Date: Sat, 17 Feb 2024 15:23:57 -0600 (CST)	[thread overview]
Message-ID: <1009493415.16246318.1708205037656.JavaMail.zimbra@raptorengineeringinc.com> (raw)
In-Reply-To: <d065cc14-cda8-4e90-83a4-6a6e9314fa80@csgroup.eu>



----- Original Message -----
> From: "christophe leroy" <christophe.leroy@csgroup.eu>
> To: "Timothy Pearson" <tpearson@raptorengineering.com>
> Cc: "linuxppc-dev" <linuxppc-dev@lists.ozlabs.org>
> Sent: Saturday, February 17, 2024 10:39:06 AM
> Subject: Re: [PATCH v3] powerpc: Add gpr1 and fpu save/restore functions

> Le 16/02/2024 à 18:24, Timothy Pearson a écrit :
>> When building the kernel in size optimized mode with the amdgpu module enabled,
>> gcc will begin referencing external gpr1 and fpu save/restore functions.  This
>> will then cause a linker failure as we do not link against libgcc which
>> normally contains those builtin functions.
> 
> Right, but modules are linked with --save-restore-funcs when using gcc
> so crtsavres.o is not used and only your change to scripts/mod/modpost.c
> seems to be required to be able to build amdgpu module with GCC.
> 
> Maybe that's different with clang, but maybe worth a test and then a
> second patch ?

It looks to be gated on ld, specifically if we're CONFIG_PPC64 && CONFIG_LD_IS_BFD.  I can update the patch to match that gate if desired.

> Nevertheless, see comments below, you can do even shorter and more
> readable using GAS macros.

That's true, but my goal was to get this working, not refactor the entire file. :)  Any chance we can merge and do a fine polish later, especially if there's a distinct possibility of the entire file going away in the near future?

      reply	other threads:[~2024-02-17 21:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-16 17:24 [PATCH v3] powerpc: Add gpr1 and fpu save/restore functions Timothy Pearson
2024-02-17 16:39 ` Christophe Leroy
2024-02-17 21:23   ` Timothy Pearson [this message]

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=1009493415.16246318.1708205037656.JavaMail.zimbra@raptorengineeringinc.com \
    --to=tpearson@raptorengineering.com \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linuxppc-dev@lists.ozlabs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox