arch/arm64/src/common: Remove void * arithmetic

Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
This commit is contained in:
Jukka Laitinen 2024-03-21 23:21:04 +02:00 committed by Xiang Xiao
parent ac2021b906
commit a54f7ffaa8
3 changed files with 8 additions and 6 deletions

View File

@ -60,13 +60,13 @@
int arch_save_fpucontext(void *saveregs)
{
irqstate_t flags;
uint64_t *p_save;
uintptr_t p_save;
/* Take a snapshot of the thread context right now */
flags = enter_critical_section();
p_save = saveregs + XCPTCONTEXT_GP_SIZE;
p_save = (uintptr_t)saveregs + XCPTCONTEXT_GP_SIZE;
arm64_fpu_save((struct fpu_reg *)p_save);
ARM64_DSB();

View File

@ -430,8 +430,10 @@ void arm64_fpu_disable(void)
bool up_fpucmp(const void *saveregs1, const void *saveregs2)
{
const uint64_t *regs1 = saveregs1 + XCPTCONTEXT_GP_SIZE;
const uint64_t *regs2 = saveregs2 + XCPTCONTEXT_GP_SIZE;
const uint64_t *regs1 = (uint64_t *)((uintptr_t)saveregs1 +
XCPTCONTEXT_GP_SIZE);
const uint64_t *regs2 = (uint64_t *)((uintptr_t)saveregs2 +
XCPTCONTEXT_GP_SIZE);
/* Only compare callee-saved registers, caller-saved registers do not
* need to be preserved.

View File

@ -56,7 +56,7 @@
void arm64_new_task(struct tcb_s * tcb)
{
char *stack_ptr = tcb->stack_base_ptr + tcb->adj_stack_size;
uint64_t stack_ptr = (uintptr_t)tcb->stack_base_ptr + tcb->adj_stack_size;
struct regs_context *pinitctx;
#ifdef CONFIG_ARCH_FPU
@ -67,7 +67,7 @@ void arm64_new_task(struct tcb_s * tcb)
/* set fpu context */
arm64_init_fpu(tcb);
stack_ptr = (char *)pfpuctx;
stack_ptr = (uintptr_t)pfpuctx;
#endif
pinitctx = STACK_PTR_TO_FRAME(struct regs_context, stack_ptr);