On Fri, Jan 27, 2023 at 05:28:57PM +0530, Anup Patel wrote:
On Wed, Jan 18, 2023 at 2:12 AM Conor Dooley [off-list ref] wrote:
quoted
quoted
quoted
quoted
+/* AIA CSR bits */
+#define TOPI_IID_SHIFT 16
+#define TOPI_IID_MASK 0xfff
While I think of it, it'd be worth noting that these are generic across
all of topi, mtopi etc. Initially I thought that this mask was wrong as
the topi section says:
bits 25:16 Interrupt identity (source number)
bits 7:0 Interrupt priority
These defines are for the AIA CSRs and not AIA APLIC IDC registers.
As per the latest frozen spec, the mtopi/stopi/vstopi has following bits:
bits: 27:16 IID
bits: 7:0 IPRIO
I know, that those ones use those bits, hence leaving an R-b for the
patch - but your define says TOPI, which it is *not* accurate for.
That is confusing and should be noted.
quoted
What I was advocating for was picking one style and sticking to it.
These copy-paste from docs things are tedious and error prone to review,
and I don't think having multiple styles is helpful.
On the other hand, I think we should let developers choose a style
which is better suited for a particular register field instead enforcing
it here. The best we can do is follow a naming convention for defines.
Well shall have to agree to disagree I suppose!
quoted
Tedious as it was, I did check all the numbers though, so in that
respect:
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
BTW, this patch is shared with KVM AIA CSR series so most likely
I will take this patch through that series.
Since the path which it gets applied is between you and Palmer to
decide, feel free to add the R-b whichever way the patch ends up going!
Thanks,
Conor.