Skip to content

Commit 5af7bf8

Browse files
karstenkoenigkartben
authored andcommitted
soc: nordic: common: vpr: Remove tp register
The tp register has been remove from the common RISC-V stack frame so remove it from the VPR specific variant declared via SOC_ISR_STACKING_ESF_DECLARE. This saves 4 bytes and allows removing a lot of padding to get the 16B aligned size. Signed-off-by: Karsten Koenig <[email protected]>
1 parent 92271d1 commit 5af7bf8

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

soc/nordic/common/vpr/soc_context.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,9 @@
88

99
#define SOC_ESF_MEMBERS \
1010
unsigned long minttresh; \
11-
unsigned long sp_align; \
12-
unsigned long padding0; \
13-
unsigned long padding1; \
14-
unsigned long padding2
11+
unsigned long sp_align;
1512

1613
#define SOC_ESF_INIT \
17-
0, \
18-
0, \
1914
0, \
2015
0
2116

soc/nordic/common/vpr/soc_isr_stacking.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
struct arch_esf { \
2121
unsigned long s0; \
2222
unsigned long mstatus; \
23-
unsigned long tp; \
2423
struct soc_esf soc_context; \
2524
\
2625
unsigned long t2; \
@@ -43,7 +42,6 @@
4342
struct arch_esf { \
4443
unsigned long s0; \
4544
unsigned long mstatus; \
46-
unsigned long tp; \
4745
struct soc_esf soc_context; \
4846
\
4947
unsigned long ra; \
@@ -79,7 +77,7 @@
7977
* Size of the SW managed part of the ESF in case of interrupt
8078
* sizeof(__padding) + ... + sizeof(soc_context)
8179
*/
82-
#define ESF_SW_IRQ_SIZEOF (0x20)
80+
#define ESF_SW_IRQ_SIZEOF (0x10)
8381

8482
/*
8583
* VPR needs aligned(8) SP when doing HW stacking, if this condition is not fulfilled it will move

0 commit comments

Comments
 (0)