linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>
Cc: "linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v1 4/4] powerpc: Move C prototypes out of asm-prototypes.h
Date: Tue, 08 Mar 2022 22:12:02 +1100	[thread overview]
Message-ID: <87v8won1fh.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <5c839e08-661f-6430-0da8-0f3b1c87c2e8@csgroup.eu>

Christophe Leroy <christophe.leroy@csgroup.eu> writes:
> Le 04/03/2022 à 18:04, Christophe Leroy a écrit :
>> We originally added asm-prototypes.h in commit 42f5b4cacd78 ("powerpc:
>> Introduce asm-prototypes.h"). It's purpose was for prototypes of C
>> functions that are only called from asm, in order to fix sparse
>> warnings about missing prototypes.
>> 
>> A few months later Nick added a different use case in
>> commit 4efca4ed05cb ("kbuild: modversions for EXPORT_SYMBOL() for asm")
>> for C prototypes for exported asm functions. This is basically the
>> inverse of our original usage.
>> 
>> Since then we've added various prototypes to asm-prototypes.h for both
>> reasons, meaning we now need to unstitch it all.
>> 
>> Dispatch prototypes of C functions into relevant headers and keep
>> only the prototypes for functions defined in assembly.
>> 
>> For the time being, leave prom_init() there because moving it
>> into asm/prom.h or asm/setup.h conflicts with
>> drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.o
>> This will be fixed later by untaggling asm/pci.h and asm/prom.h
>> or by renaming the function in shadowrom.c
>> 
>> Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
>> ---
>>   arch/powerpc/include/asm/asm-prototypes.h     | 51 -------------------
>>   arch/powerpc/include/asm/ftrace.h             |  3 ++
>>   arch/powerpc/include/asm/hvcall.h             |  5 ++
>>   arch/powerpc/include/asm/interrupt.h          | 11 ++++
>>   arch/powerpc/include/asm/kexec.h              |  2 +
>>   arch/powerpc/include/asm/processor.h          |  8 +++
>>   arch/powerpc/include/asm/setup.h              |  7 +++
>>   arch/powerpc/include/asm/smp.h                |  3 ++
>>   arch/powerpc/include/asm/syscalls.h           |  4 ++
>>   arch/powerpc/kernel/early_32.c                |  1 -
>>   arch/powerpc/kernel/interrupt.c               |  1 -
>>   arch/powerpc/kernel/irq.c                     |  1 -
>>   arch/powerpc/kernel/mce.c                     |  1 -
>>   arch/powerpc/kernel/prom_init.c               |  1 -
>>   arch/powerpc/kernel/ptrace/ptrace.c           |  1 -
>>   arch/powerpc/kernel/setup_64.c                |  1 -
>>   arch/powerpc/kernel/smp.c                     |  1 -
>>   arch/powerpc/kernel/syscalls.c                |  1 -
>>   arch/powerpc/kernel/tau_6xx.c                 |  1 -
>>   arch/powerpc/kernel/time.c                    |  1 -
>>   arch/powerpc/kernel/trace/ftrace.c            |  1 -
>>   arch/powerpc/kexec/core_64.c                  |  1 -
>>   arch/powerpc/kvm/book3s_hv_builtin.c          |  1 -
>>   arch/powerpc/kvm/book3s_hv_rm_xive.c          |  1 -
>>   arch/powerpc/lib/vmx-helper.c                 |  1 -
>>   arch/powerpc/mm/book3s64/slb.c                |  1 -
>>   arch/powerpc/mm/fault.c                       |  1 -
>>   arch/powerpc/platforms/powernv/idle.c         |  1 -
>>   .../platforms/powernv/opal-tracepoints.c      |  1 -
>>   arch/powerpc/platforms/pseries/lpar.c         |  1 -
>>   30 files changed, 43 insertions(+), 72 deletions(-)
>> 
>> diff --git a/arch/powerpc/kernel/prom_init.c b/arch/powerpc/kernel/prom_init.c
>> index 0ac5faacc909..3b49065daf21 100644
>> --- a/arch/powerpc/kernel/prom_init.c
>> +++ b/arch/powerpc/kernel/prom_init.c
>> @@ -41,7 +41,6 @@
>>   #include <asm/btext.h>
>>   #include <asm/sections.h>
>>   #include <asm/machdep.h>
>> -#include <asm/asm-prototypes.h>
>
> Need to keep this include as prom_init() couldn't be moved to asm/prom.h 
> due to conflict with drivers/gpu/drm/nouveau/nvkm/subdev/bios/shadowrom.c
>
> Can you fix it ?

Yep, done.

cheers

  reply	other threads:[~2022-03-08 11:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-04 17:04 [PATCH v1 1/4] powerpc: Cleanup asm-prototypes.c Christophe Leroy
2022-03-04 17:04 ` [PATCH v1 2/4] powerpc/smp: Declare current_set static Christophe Leroy
2022-03-04 17:04 ` [PATCH v1 3/4] powerpc/kexec: Declare kexec_paca static Christophe Leroy
2022-03-04 17:04 ` [PATCH v1 4/4] powerpc: Move C prototypes out of asm-prototypes.h Christophe Leroy
2022-03-08  9:56   ` Christophe Leroy
2022-03-08 11:12     ` Michael Ellerman [this message]
2022-03-08  8:47 ` [PATCH v1 1/4] powerpc: Cleanup asm-prototypes.c Christophe Leroy
2022-03-08 11:11   ` Michael Ellerman
2022-03-12 10:29 ` Michael Ellerman

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=87v8won1fh.fsf@mpe.ellerman.id.au \
    --to=mpe@ellerman.id.au \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).