Thread (1 message) 1 message, 1 author, 2012-11-05

Re: [PATCH 4/4 v4] iommu/fsl: Freescale PAMU driver and IOMMU API implementation.

From: Scott Wood <hidden>
Date: 2012-11-05 23:12:08
Also in: linux-iommu, lkml

On 11/05/2012 05:04:13 PM, Timur Tabi wrote:
Varun Sethi wrote:
quoted
+	/* PAACE Offset 0x00 */
+	u32 wbah;				/* only valid for =20
Primary PAACE */
quoted
+	u32 addr_bitfields;		/* See P/S PAACE_AF_* */
+
+	/* PAACE Offset 0x08 */
+	/* Interpretation of first 32 bits dependent on DD above */
+	union {
+		struct {
+			/* Destination ID, see PAACE_DID_* defines */
+			u8 did;
+			/* Partition ID */
+			u8 pid;
+			/* Snoop ID */
+			u8 snpid;
+			/* coherency_required : 1 reserved : 7 */
=20
Please use this format, which is easier to read:
=20
			/* 1 =3D=3D coherency required, 7 =3D=3D reserved */
=20
Every time I look at this comment, I think you are using bitfields.
It is meant as a pseudo-bitfield.  "7 =3D=3D reserved" doesn't make much =20
sense -- that would leave a lot of other values neither defined nor =20
explicitly reserved.

That said, the "See PAACE_DA_*" comment should be sufficient and avoids =20
making people have to care about what bitfield ordering the comment =20
writer was assuming.

-Scott=
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help