Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARCv2: intc: Use ARC_REG_STATUS32 for addressing STATUS32 reg

It is better to use it instead of magic numbers.

Signed-off-by: Yuriy Kolerov <yuriy.kolerov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>

authored by

Yuriy Kolerov and committed by
Vineet Gupta
e98a7bf0 cf16bf77

+4 -1
+3
arch/arc/include/asm/arcregs.h
··· 38 38 #define ARC_REG_CLUSTER_BCR 0xcf 39 39 #define ARC_REG_AUX_ICCM 0x208 /* ICCM Base Addr (ARCv2) */ 40 40 41 + /* Common for ARCompact and ARCv2 status register */ 42 + #define ARC_REG_STATUS32 0x0A 43 + 41 44 /* status32 Bits Positions */ 42 45 #define STATUS_AE_BIT 5 /* Exception active */ 43 46 #define STATUS_DE_BIT 6 /* PC is in delay slot */
+1 -1
arch/arc/kernel/intc-arcv2.c
··· 69 69 irq_bcr.firq ? " FIRQ (not used)":""); 70 70 71 71 /* setup status32, don't enable intr yet as kernel doesn't want */ 72 - tmp = read_aux_reg(0xa); 72 + tmp = read_aux_reg(ARC_REG_STATUS32); 73 73 tmp |= STATUS_AD_MASK | (ARCV2_IRQ_DEF_PRIO << 1); 74 74 tmp &= ~STATUS_IE_MASK; 75 75 asm volatile("kflag %0 \n"::"r"(tmp));