All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Ellerman <mpe@ellerman.id.au>
To: Madhavan Srinivasan <maddy@linux.ibm.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v2 1/2] powerpc: Add Power11 architected and raw mode
Date: Wed, 07 Feb 2024 12:54:45 +1100	[thread overview]
Message-ID: <87jznh82e2.fsf@mail.lhotse> (raw)
In-Reply-To: <5306f4b2-5f94-4253-95b2-9da6d01be59d@linux.ibm.com>

Madhavan Srinivasan <maddy@linux.ibm.com> writes:
> On 2/5/24 2:13 PM, Aneesh Kumar K.V wrote:
>> Madhavan Srinivasan <maddy@linux.ibm.com> writes:
>>
>>> reg.h is updated with Power11 pvr. pvr_mask value of 0x0F000007
>>> means we are arch v3.1 compliant.
...
>>> diff --git a/arch/powerpc/kernel/cpu_setup_power.c b/arch/powerpc/kernel/cpu_setup_power.c
>>> index 98bd4e6c1770..8c24fc67d90f 100644
>>> --- a/arch/powerpc/kernel/cpu_setup_power.c
>>> +++ b/arch/powerpc/kernel/cpu_setup_power.c
>>> @@ -286,3 +286,13 @@ void __restore_cpu_power10(void)
>>>   	init_HFSCR();
>>>   	init_PMU_HV();
>>>   }
>>> +
>>> +void __setup_cpu_power11(unsigned long offset, struct cpu_spec *t)
>>> +{
>>> +	return __setup_cpu_power10(offset, t);
>>> +}
>>> +
>>> +void __restore_cpu_power11(void)
>>> +{
>>> +	return __restore_cpu_power10();
>>> +}
>>>
>> Do we need to duplicate these functions if they don't add anything
>> extra?
>
> What will be the preference in case of macros? Should we re-use
> power10 macros in the table instead of defining new macros.

I guess I would say yes to defining new macros, eg.

+#define CPU_FTRS_POWER11	CPU_FTRS_POWER10

That is good to have because someone will eventually grep for
CPU_FTRS_POWER11 and expect to find it.

On the other hand global functions that do nothing but call the power10
version are not the best, because they will (slightly) bloat the binary
for no real gain.

cheers

      reply	other threads:[~2024-02-07  1:55 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-05  7:58 [PATCH v2 1/2] powerpc: Add Power11 architected and raw mode Madhavan Srinivasan
2024-02-05  7:58 ` [PATCH v2 2/2] powerpc/perf: Power11 Performance Monitoring support Madhavan Srinivasan
2024-02-05  8:43 ` [PATCH v2 1/2] powerpc: Add Power11 architected and raw mode Aneesh Kumar K.V
2024-02-06  5:54   ` Madhavan Srinivasan
2024-02-07  1:54     ` Michael Ellerman [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=87jznh82e2.fsf@mail.lhotse \
    --to=mpe@ellerman.id.au \
    --cc=aneesh.kumar@kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=maddy@linux.ibm.com \
    /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.