From: Andrew Jones <ajones@ventanamicro.com>
To: Conor Dooley <conor@kernel.org>
Cc: linux-riscv@lists.infradead.org,
'Jisheng Zhang ' <jszhang@kernel.org>,
'Heiko Stuebner ' <heiko@sntech.de>,
'Paul Walmsley ' <paul.walmsley@sifive.com>,
'Palmer Dabbelt ' <palmer@dabbelt.com>,
'Conor Dooley ' <conor.dooley@microchip.com>,
'Albert Ou ' <aou@eecs.berkeley.edu>
Subject: Re: [PATCH 3/5] riscv: alternatives: Rename errata_id to patch_id
Date: Fri, 24 Feb 2023 09:06:02 +0100 [thread overview]
Message-ID: <20230224080602.eddclmcn2sbn6ca7@orel> (raw)
In-Reply-To: <Y/f1uRERxTU5kAgh@spud>
On Thu, Feb 23, 2023 at 11:24:41PM +0000, Conor Dooley wrote:
> On Tue, Feb 21, 2023 at 07:56:01PM +0100, Andrew Jones wrote:
> > Alternatives are used for both errata and cpufeatures. Use a more
> > generic name, 'patch_id', as in "ID of code patching site", to
> > avoid confusion when alternatives are used for cpufeatures.
> >
> > Signed-off-by: Andrew Jones <ajones@ventanamicro.com>
> > ---
> > arch/riscv/Kconfig | 6 +-
> > arch/riscv/errata/sifive/errata.c | 6 +-
> > arch/riscv/errata/thead/errata.c | 4 +-
> > arch/riscv/include/asm/alternative-macros.h | 72 ++++++++++-----------
> > arch/riscv/include/asm/alternative.h | 2 +-
> > arch/riscv/kernel/cpufeature.c | 6 +-
> > 6 files changed, 48 insertions(+), 48 deletions(-)
> >
> > diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
> > index 736f42f572aa..0c494c36e911 100644
> > --- a/arch/riscv/Kconfig
> > +++ b/arch/riscv/Kconfig
> > @@ -377,9 +377,9 @@ config RISCV_ALTERNATIVE
> > depends on !XIP_KERNEL
> > help
> > This Kconfig allows the kernel to automatically patch the
> > - errata required by the execution platform at run time. The
> > - code patching is performed once in the boot stages. It means
> > - that the overhead from this mechanism is just taken once.
> > + erratum or cpufeature required by the execution platform at run
> > + time. The code patching is performed once in the boot stages. It
> > + means that the overhead from this mechanism is just taken once.
>
> A line in this comment doesn't really make much sense to an unfamiliar
> reader. "Once in the boot stages"? That's just not true, is it?
> Code patching for alternatives happens more than once and not just
> during boot? Not this patch's doing though!
Right, code patching also happens at module load time. Reworking this
paragraph would be another nice cleanup. I can respin this series with
another patch doing that, along with picking up other suggestions you
have.
>
> > diff --git a/arch/riscv/include/asm/alternative.h b/arch/riscv/include/asm/alternative.h
> > index 3beef400a971..8f39d4e8598d 100644
> > --- a/arch/riscv/include/asm/alternative.h
> > +++ b/arch/riscv/include/asm/alternative.h
> > @@ -38,7 +38,7 @@ struct alt_entry {
> > s32 alt_offset; /* offset relative to replacement instruction or data */
> > u16 vendor_id; /* cpu vendor id */
> > u16 alt_len; /* The replacement size */
> > - u32 errata_id; /* The errata id */
> > + u32 patch_id; /* The patch ID (erratum ID or cpufeature ID) */
>
> The inconsistent use of ID versus id in these comments bothers my OCD!
I'll sneak a change in of vendor_id's comment to 'CPU vendor ID' for v2.
>
> Either way, "patch" is a more accurate description of the usage than
> errata, so I am on board.
> Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Thanks,
drew
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2023-02-24 8:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-21 18:55 [PATCH 0/5] riscv: alternative/cpufeature related cleanups Andrew Jones
2023-02-21 18:55 ` [PATCH 1/5] riscv: Rename Kconfig.erratas to Kconfig.errata Andrew Jones
2023-02-23 23:11 ` Conor Dooley
2023-02-24 12:37 ` Heiko Stübner
2023-02-21 18:56 ` [PATCH 2/5] riscv: alternatives: Remove unnecessary define and unused struct Andrew Jones
2023-02-23 23:14 ` Conor Dooley
2023-02-24 12:44 ` Heiko Stübner
2023-02-21 18:56 ` [PATCH 3/5] riscv: alternatives: Rename errata_id to patch_id Andrew Jones
2023-02-23 23:24 ` Conor Dooley
2023-02-24 8:06 ` Andrew Jones [this message]
2023-02-24 12:46 ` Heiko Stübner
2023-02-21 18:56 ` [PATCH 4/5] riscv: lib: Include hwcap.h directly Andrew Jones
2023-02-23 23:25 ` Conor Dooley
2023-02-24 12:46 ` Heiko Stübner
2023-02-21 18:56 ` [PATCH 5/5] riscv: cpufeature: Drop unused includes Andrew Jones
2023-02-23 23:29 ` Conor Dooley
2023-02-24 8:06 ` Andrew Jones
2023-02-24 12:48 ` Heiko Stübner
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=20230224080602.eddclmcn2sbn6ca7@orel \
--to=ajones@ventanamicro.com \
--cc=aou@eecs.berkeley.edu \
--cc=conor.dooley@microchip.com \
--cc=conor@kernel.org \
--cc=heiko@sntech.de \
--cc=jszhang@kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox