Skip to content

Commit

Permalink
soc: nordic: common: vpr: Remove tp register
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
karstenkoenig authored and kartben committed Jan 16, 2025
1 parent 92271d1 commit 5af7bf8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
7 changes: 1 addition & 6 deletions soc/nordic/common/vpr/soc_context.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@

#define SOC_ESF_MEMBERS \
unsigned long minttresh; \
unsigned long sp_align; \
unsigned long padding0; \
unsigned long padding1; \
unsigned long padding2
unsigned long sp_align;

#define SOC_ESF_INIT \
0, \
0, \
0, \
0

Expand Down
4 changes: 1 addition & 3 deletions soc/nordic/common/vpr/soc_isr_stacking.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
struct arch_esf { \
unsigned long s0; \
unsigned long mstatus; \
unsigned long tp; \
struct soc_esf soc_context; \
\
unsigned long t2; \
Expand All @@ -43,7 +42,6 @@
struct arch_esf { \
unsigned long s0; \
unsigned long mstatus; \
unsigned long tp; \
struct soc_esf soc_context; \
\
unsigned long ra; \
Expand Down Expand Up @@ -79,7 +77,7 @@
* Size of the SW managed part of the ESF in case of interrupt
* sizeof(__padding) + ... + sizeof(soc_context)
*/
#define ESF_SW_IRQ_SIZEOF (0x20)
#define ESF_SW_IRQ_SIZEOF (0x10)

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

0 comments on commit 5af7bf8

Please sign in to comment.