From: JeeHeng Sia <jeeheng.sia@starfivetech.com>
To: Conor Dooley <conor@kernel.org>
Cc: "Conor Dooley" <conor.dooley@microchip.com>,
"palmer@dabbelt.com" <palmer@dabbelt.com>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Atish Patra" <atishp@rivosinc.com>,
"Anup Patel" <apatel@ventanamicro.com>,
"Alexandre Ghiti" <alexghiti@rivosinc.com>,
"Björn Töpel" <bjorn@rivosinc.com>,
"Song Shuai" <suagrfillet@gmail.com>,
"Petr Tesarik" <petrtesarik@huaweicloud.com>,
"linux-riscv@lists.infradead.org"
<linux-riscv@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: RE: [RFT 1/2] RISC-V: handle missing "no-map" properties for OpenSBI's PMP protected regions
Date: Wed, 9 Aug 2023 10:24:57 +0000 [thread overview]
Message-ID: <3931cc7932e644bd88f9baf2beddd00d@EXMBX066.cuchost.com> (raw)
In-Reply-To: <20230808-humility-rut-e1e46cf75708@spud>
> -----Original Message-----
> From: Conor Dooley <conor@kernel.org>
> Sent: Tuesday, August 8, 2023 9:13 PM
> To: JeeHeng Sia <jeeheng.sia@starfivetech.com>
> Cc: Conor Dooley <conor.dooley@microchip.com>; palmer@dabbelt.com; Paul Walmsley <paul.walmsley@sifive.com>; Atish Patra
> <atishp@rivosinc.com>; Anup Patel <apatel@ventanamicro.com>; Alexandre Ghiti <alexghiti@rivosinc.com>; Björn Töpel
> <bjorn@rivosinc.com>; Song Shuai <suagrfillet@gmail.com>; Petr Tesarik <petrtesarik@huaweicloud.com>; linux-
> riscv@lists.infradead.org; linux-kernel@vger.kernel.org; stable@vger.kernel.org
> Subject: Re: [RFT 1/2] RISC-V: handle missing "no-map" properties for OpenSBI's PMP protected regions
>
> On Mon, Aug 07, 2023 at 12:44:07AM +0000, JeeHeng Sia wrote:
>
> > > +/* SBI implementation IDs */
> > > +#define SBI_IMP_OPENSBI 1
> > I would suggest to create an enum struct for the SBI Imp ID in
> > the sbi.h file. What do you think?
>
> I'm not really sure what the advantage of doing so is.
The macro SBI_IMP_OPENSBI seems weird (I would read it as "SBI Implementation OpenSBI"). However, if we implement an enum struct for SBI_IMP_ID (There are numerous IDs available), the macro can be abbreviated to OpenSBI. By doing this, the conditional checking of the implementation ID would be more readable, as shown below:
if (sbi_firmware_id != OPENSBI)
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2023-08-09 10:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-02 11:12 [RFT 0/2] RISC-V: handle missing "no-map" properties for OpenSBI's PMP protected regions Conor Dooley
2023-08-02 11:12 ` [RFT 1/2] " Conor Dooley
2023-08-06 9:03 ` Alexandre Ghiti
2023-08-07 0:44 ` JeeHeng Sia
2023-08-08 13:13 ` Conor Dooley
2023-08-09 10:24 ` JeeHeng Sia [this message]
2023-08-09 11:04 ` Conor Dooley
2023-08-08 7:54 ` Atish Kumar Patra
2023-08-08 13:39 ` Conor Dooley
2023-08-09 9:01 ` Atish Kumar Patra
2023-08-10 9:07 ` Conor Dooley
2023-12-06 12:52 ` Palmer Dabbelt
2023-12-06 14:23 ` Conor Dooley
2023-12-07 13:02 ` Lad, Prabhakar
2023-12-07 13:11 ` Conor Dooley
2023-12-19 17:18 ` Conor Dooley
2023-12-19 17:27 ` Prabhakar Mahadev Lad
2023-12-19 18:06 ` Palmer Dabbelt
2023-12-19 18:38 ` Prabhakar Mahadev Lad
2023-12-19 18:57 ` Conor Dooley
2023-12-19 19:46 ` Prabhakar Mahadev Lad
2023-08-02 11:12 ` [RFT 2/2] Revert "RISC-V: mark hibernation as nonportable" Conor Dooley
2024-01-23 17:50 ` [RFT 0/2] RISC-V: handle missing "no-map" properties for OpenSBI's PMP protected regions patchwork-bot+linux-riscv
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=3931cc7932e644bd88f9baf2beddd00d@EXMBX066.cuchost.com \
--to=jeeheng.sia@starfivetech.com \
--cc=alexghiti@rivosinc.com \
--cc=apatel@ventanamicro.com \
--cc=atishp@rivosinc.com \
--cc=bjorn@rivosinc.com \
--cc=conor.dooley@microchip.com \
--cc=conor@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=petrtesarik@huaweicloud.com \
--cc=stable@vger.kernel.org \
--cc=suagrfillet@gmail.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