Skip to contentSkip to conversation

Revert "irqchip: nvic: Fix offset for Interrupt Priority Offsets"

PATCH In review Yoshifumi SHU 2 participants 2 messages Nov 27

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Revert "irqchip: nvic: Fix offset for Interrupt Priority Offsets"

This reverts commit c5e0cbe2858d278a27d5b3fe31890aea5be064c4.

nvic_base is mapped to 0xe000e100 (NVIC_ISER0). Thus, the Interrupt Priority Registers (NVIC_IPRx, at 0xe000e400) are offset by 0x300 from nvic_base, not 0x400. The reverted commit overlooked that nvic_base is already offset by 0x100 from 0xe000e000 and incorrectly changed NVIC_IPR.

Fixes c5e0cbe2858d ("irqchip: nvic: Fix offset for Interrupt Priority Offsets")

---
Vladimir asked for this revert (see Link:).

Tested on MPS3-AN547 (Cortex-M55) and EK-RA8P1 (Cortex-M85) hardware against v7.4-rc4. On EK-RA8P1, confirmed that the driver now writes to the correct addresses for NVIC_IPR registers.

---
 drivers/irqchip/irq-nvic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-nvic.c +1 -1
index 2191a2b79578..9438891e66f2 100644
@@ -26,7 +26,7 @@
 
 #define NVIC_ISER		0x000
 #define NVIC_ICER		0x080
-#define NVIC_IPR		0x400
+#define NVIC_IPR		0x300
 
 #define NVIC_MAX_BANKS		16
 /*

base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f

Signature · 1 line
2.53.0
Acked-by on v1 1/1
#1 lore raw
Quoted 36 lines · Yoshifumi SHU

This reverts commit c5e0cbe2858d278a27d5b3fe31890aea5be064c4.

nvic_base is mapped to 0xe000e100 (NVIC_ISER0). Thus, the Interrupt Priority Registers (NVIC_IPRx, at 0xe000e400) are offset by 0x300 from nvic_base, not 0x400. The reverted commit overlooked that nvic_base is already offset by 0x100 from 0xe000e000 and incorrectly changed NVIC_IPR.

Fixes c5e0cbe2858d ("irqchip: nvic: Fix offset for Interrupt Priority Offsets")

---
Vladimir asked for this revert (see Link:).

Tested on MPS3-AN547 (Cortex-M55) and EK-RA8P1 (Cortex-M85) hardware against v7.4-rc4. On EK-RA8P1, confirmed that the driver now writes to the correct addresses for NVIC_IPR registers.

---
 drivers/irqchip/irq-nvic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/irqchip/irq-nvic.c +1 -1
index 2191a2b79578..9438891e66f2 100644
@@ -26,7 +26,7 @@
 
 #define NVIC_ISER		0x000
 #define NVIC_ICER		0x080
-#define NVIC_IPR		0x400
+#define NVIC_IPR		0x300
 
 #define NVIC_MAX_BANKS		16
 /*
Quoted 3 lines

base-commit: b6a9fa34ce4187cb69d3c588a4bbffc31ce5db8f -- 2.53.0

FWIW,

Sorry for such silly mistake!

Cheers
Vladimir