From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Benjamin Gray <bgray@linux.ibm.com>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Cc: "ajd@linux.ibm.com" <ajd@linux.ibm.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"npiggin@gmail.com" <npiggin@gmail.com>,
"ardb@kernel.org" <ardb@kernel.org>,
"jbaron@akamai.com" <jbaron@akamai.com>,
"rostedt@goodmis.org" <rostedt@goodmis.org>,
"jpoimboe@kernel.org" <jpoimboe@kernel.org>
Subject: Re: [PATCH v2 5/6] powerpc/64: Add support for out-of-line static calls
Date: Tue, 27 Sep 2022 06:01:56 +0000 [thread overview]
Message-ID: <edfd1068-dbb8-4d11-faac-507fff0d1328@csgroup.eu> (raw)
In-Reply-To: <ecc0bf7f75607d5523165fb1105e7dc9065cfb37.camel@linux.ibm.com>
Le 27/09/2022 à 05:21, Benjamin Gray a écrit :
> On Mon, 2022-09-26 at 14:54 +0000, Christophe Leroy wrote:
>>> diff --git a/arch/powerpc/kernel/static_call.c
>>> b/arch/powerpc/kernel/static_call.c
>>> index 863a7aa24650..ecbb74e1b4d3 100644
>>> --- a/arch/powerpc/kernel/static_call.c
>>> +++ b/arch/powerpc/kernel/static_call.c
>>> @@ -4,30 +4,108 @@
>>>
>>> #include <asm/code-patching.h>
>>>
>>> +static void* ppc_function_toc(u32 *func)
>>> +{
>>> +#ifdef CONFIG_PPC64_ELF_ABI_V2
>>
>> Can you use IS_ENABLED(CONFIG_PPC64_ELF_ABI_V2) instead ?
>
> I tried when implementing it, but the `(u64) func` cast is an issue. I
> could side step it and use `unsigned long` if that's preferable?
> Otherwise I like being explicit about the size, it's a delicate
> function.
It is always better to have code that builds independant of config
options. I helps with build converage, you don't have to build thousands
of defconfigs in order to cover all options.
See
https://docs.kernel.org/process/coding-style.html#conditional-compilation
For me, using "unsigned long" is more explicit than u64 when it
represents the value of a pointer.
next prev parent reply other threads:[~2022-09-27 6:03 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-26 6:43 [PATCH v2 0/6] Out-of-line static calls for powerpc64 ELF V2 Benjamin Gray
2022-09-26 6:43 ` [PATCH v2 1/6] powerpc/code-patching: Implement generic text patching function Benjamin Gray
2022-09-26 8:56 ` kernel test robot
2022-09-26 13:28 ` kernel test robot
2022-09-26 14:33 ` Christophe Leroy
2022-09-27 2:57 ` Benjamin Gray
2022-09-27 5:54 ` Christophe Leroy
2022-09-27 6:40 ` Christophe Leroy
2022-09-28 1:30 ` Benjamin Gray
2022-09-28 10:52 ` Christophe Leroy
2022-09-27 7:30 ` Christophe Leroy
2022-09-26 6:43 ` [PATCH v2 2/6] powerpc/module: Handle caller-saved TOC in module linker Benjamin Gray
2022-09-26 6:43 ` [PATCH v2 3/6] powerpc/module: Optimise nearby branches in ELF V2 ABI stub Benjamin Gray
2022-09-26 14:49 ` Christophe Leroy
2022-09-27 3:12 ` Benjamin Gray
2022-09-26 6:43 ` [PATCH v2 4/6] static_call: Move static call selftest to static_call_selftest.c Benjamin Gray
2022-09-26 14:50 ` Christophe Leroy
2022-09-26 6:43 ` [PATCH v2 5/6] powerpc/64: Add support for out-of-line static calls Benjamin Gray
2022-09-26 13:16 ` Christophe Leroy
2022-09-27 5:18 ` Benjamin Gray
2022-09-27 6:07 ` Christophe Leroy
2022-09-26 14:54 ` Christophe Leroy
2022-09-27 3:21 ` Benjamin Gray
2022-09-27 6:01 ` Christophe Leroy [this message]
2022-09-26 6:43 ` [PATCH v2 6/6] powerpc/64: Add tests " Benjamin Gray
2022-09-26 14:55 ` Christophe Leroy
2022-09-27 3:31 ` Benjamin Gray
2022-09-27 6:05 ` Christophe Leroy
2022-09-26 14:19 ` [PATCH v2 0/6] Out-of-line static calls for powerpc64 ELF V2 Christophe Leroy
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=edfd1068-dbb8-4d11-faac-507fff0d1328@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=ajd@linux.ibm.com \
--cc=ardb@kernel.org \
--cc=bgray@linux.ibm.com \
--cc=jbaron@akamai.com \
--cc=jpoimboe@kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.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).