arc: improved saving of lp_<count,start,end> using GPRs

Since firq utilizes a 2nd register bank, and since all of those
many GPRs can be used, the strategy here is to save extra registers,
such as lp_count, lp_start, lp_end into callee saved registers.
These registers are safe to use because the C-ABI followed by the
compiler will cause these to be spilled to the stack if a C function
wants to use them. By selecting upper GPRs, r23-r25, it is very unlikely
the compiler will spill them. This improvement, therefore, can avoid a
d-cache miss since we are avoding memory altogether when saving these.
The struct firq_regs is no longer needed.

Change-Id: I7c0d061908a90376da7a0101b62e804647a20443
Signed-off-by: Chuck Jordan <cjordan@synopsys.com>
This commit is contained in:
Chuck Jordan 2016-05-27 12:25:00 -07:00 committed by Anas Nashif
commit 5f14d8fb01
3 changed files with 28 additions and 55 deletions

View file

@ -130,14 +130,6 @@ struct callee_saved {
};
typedef struct callee_saved tCalleeSaved;
/* registers saved by software when taking a FIRQ */
struct firq_regs {
uint32_t lp_count;
uint32_t lp_start;
uint32_t lp_end;
};
typedef struct firq_regs tFirqRegs;
#endif /* _ASMLANGUAGE */
/* Bitmask definitions for the struct tcs->flags bit field */
@ -226,7 +218,6 @@ struct s_NANO {
* there is no need to track it in _nanokernel.
*/
struct firq_regs firq_regs;
#if defined(CONFIG_NANO_TIMEOUTS) || defined(CONFIG_NANO_TIMERS)
sys_dlist_t timeout_q;
int32_t task_timeout;