From: Michael Ellerman <mpe@ellerman.id.au>
To: Alistair Popple <alistair@popple.id.au>, linuxppc-dev@lists.ozlabs.org
Cc: Alistair Popple <alistair@popple.id.au>,
Joel Stanley <joel@jms.id.au>, Jordan Niethe <jniethe5@gmail.com>
Subject: Re: [PATCH v2] PPC: Set reserved PCR bits
Date: Mon, 16 Sep 2019 19:49:26 +1000 [thread overview]
Message-ID: <877e68tvtl.fsf@mpe.ellerman.id.au> (raw)
In-Reply-To: <20190910060102.21597-1-alistair@popple.id.au>
Alistair Popple <alistair@popple.id.au> writes:
> Currently the reserved bits of the Processor Compatibility Register
> (PCR) are cleared as per the Programming Note in Section 1.3.3 of
> version 3.0B of the Power ISA. This causes all new architecture
> features to be made available when running on newer processors with
> new architecture features added to the PCR as bits must be set to
> disable a given feature.
>
> For example to disable new features added as part of Version 2.07 of
> the ISA the corresponding bit in the PCR needs to be set.
>
> As new processor features generally require explicit kernel support
> they should be disabled until such support is implemented. Therefore
> kernels should set all unknown/reserved bits in the PCR such that any
> new architecture features which the kernel does not currently know
> about get disabled.
>
> An update is planned to the ISA to clarify that the PCR is an
> exception to the Programming Note on reserved bits in Section 1.3.3.
>
> Signed-off-by: Alistair Popple <alistair@popple.id.au>
> Signed-off-by: Jordan Niethe <jniethe5@gmail.com>
> Tested-by: Joel Stanley <joel@jms.id.au>
> ---
> v2: Added some clarifications to the commit message
> ---
> arch/powerpc/include/asm/reg.h | 3 +++
> arch/powerpc/kernel/cpu_setup_power.S | 6 ++++++
> arch/powerpc/kernel/dt_cpu_ftrs.c | 3 ++-
> arch/powerpc/kvm/book3s_hv.c | 11 +++++++----
> arch/powerpc/kvm/book3s_hv_nested.c | 6 +++---
> arch/powerpc/kvm/book3s_hv_rmhandlers.S | 10 ++++++----
> 6 files changed, 27 insertions(+), 12 deletions(-)
>
> diff --git a/arch/powerpc/include/asm/reg.h b/arch/powerpc/include/asm/reg.h
> index 10caa145f98b..258435c75c43 100644
> --- a/arch/powerpc/include/asm/reg.h
> +++ b/arch/powerpc/include/asm/reg.h
> @@ -475,6 +475,7 @@
> #define PCR_VEC_DIS (1ul << (63-0)) /* Vec. disable (bit NA since POWER8) */
> #define PCR_VSX_DIS (1ul << (63-1)) /* VSX disable (bit NA since POWER8) */
> #define PCR_TM_DIS (1ul << (63-2)) /* Trans. memory disable (POWER8) */
> +#define PCR_HIGH_BITS (PCR_VEC_DIS | PCR_VSX_DIS | PCR_TM_DIS)
This doesn't build with old binutils that don't support 'ul', eg:
arch/powerpc/kvm/book3s_hv_rmhandlers.S:647: Error: junk at end of line, first unrecognized character is `u'
arch/powerpc/kvm/book3s_hv_rmhandlers.S:647: Error: missing ')'
arch/powerpc/kvm/book3s_hv_rmhandlers.S:647: Error: junk at end of line: `ul<<(63-0))|(1ul<<(63-1))|(1ul<<(63-2)))|(0x8|0x4|0x2)))>>32)@h'
arch/powerpc/kernel/cpu_setup_power.S:131: Error: syntax error; found `u', expected `,'
arch/powerpc/kernel/cpu_setup_power.S:131: Error: junk at end of line: `ul<<(63-0))|(1ul<<(63-1))|(1ul<<(63-2)))|(0x8|0x4|0x2)))@l'
etc. http://kisskb.ellerman.id.au/kisskb/buildresult/13957233/
There's a gcc-4.6 with an old binutils on the ka's.
cheers
next prev parent reply other threads:[~2019-09-16 9:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-10 6:01 [PATCH v2] PPC: Set reserved PCR bits Alistair Popple
2019-09-16 9:49 ` Michael Ellerman [this message]
2019-09-17 0:48 ` Alistair Popple
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=877e68tvtl.fsf@mpe.ellerman.id.au \
--to=mpe@ellerman.id.au \
--cc=alistair@popple.id.au \
--cc=jniethe5@gmail.com \
--cc=joel@jms.id.au \
--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;
as well as URLs for NNTP newsgroup(s).