Skip to content

Commit bdaa120

Browse files
harmou01zxombie
authored andcommitted
arm64: Fix MAIR_ATTR_MASK
Use the correct value when calculating the mask. (commit message by andrew@) Sponsored by: Arm Ltd
1 parent 2708369 commit bdaa120

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sys/arm64/include/armreg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1982,7 +1982,7 @@
19821982
#define MAIR_EL1_CRn 10
19831983
#define MAIR_EL1_CRm 2
19841984
#define MAIR_EL1_op2 0
1985-
#define MAIR_ATTR_MASK(idx) (UL(0xff) << ((n)* 8))
1985+
#define MAIR_ATTR_MASK(idx) (UL(0xff) << ((idx) * 8))
19861986
#define MAIR_ATTR(attr, idx) ((attr) << ((idx) * 8))
19871987
#define MAIR_DEVICE_nGnRnE UL(0x00)
19881988
#define MAIR_DEVICE_nGnRE UL(0x04)

0 commit comments

Comments
 (0)