On 15/04/2025 17:08, Luca Fancellu wrote:
Hi Julien,

  +/*
+ * The following are needed for the case generators GENERATE_WRITE_PR_REG_CASE
+ * and GENERATE_READ_PR_REG_CASE with num==0
+ */
+#define PRBAR0_EL2 PRBAR_EL2
+#define PRLAR0_EL2 PRLAR_EL2

Rather than aliasing, shouldn't we just rename PR{B,L}AR_EL2 to PR{B,L}AR0_EL2? 
This would the code mixing between the two.
PR{B,L}AR0_ELx does not exists really, the PR{B,L}AR<n>_ELx exists for n=1..15, 
here I’m only using this “alias” for the generator,
but PR{B,L}AR_EL2 are the real register.

In this case, can PR{B,L}AR0_EL2 defined in mm.c so they are not used anywhere 
else?

So this was the case in my previous serie, but Ayan asked me to put them in
here because PRBAR_EL2 is arm64 specific, not sure now, shall we move it back
and protect it with CONFIG_ARM_64?

Yes. I don't thikn PRBAR0_EL2 should be exposed.

Cheers,

--
Julien Grall


Reply via email to