Skip to content

Commit

Permalink
xtensa: add parameters to xtensa_pause_handler
Browse files Browse the repository at this point in the history
reason:
nxsched_smp_call_handler need these parameters

Signed-off-by: hujun5 <[email protected]>
  • Loading branch information
hujun260 committed Sep 30, 2024
1 parent 1bbcbc3 commit 06068bc
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion arch/xtensa/src/common/xtensa.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ uint32_t *xtensa_user(int exccause, uint32_t *regs);

#ifdef CONFIG_SMP
int xtensa_intercpu_interrupt(int tocpu, int intcode);
void xtensa_pause_handler(void);
void xtensa_pause_handler(int irq, void *context, void *arg);
#endif

/* Signals */
Expand Down
4 changes: 3 additions & 1 deletion arch/xtensa/src/common/xtensa_cpupause.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,13 @@ int up_cpu_paused_restore(void)
*
****************************************************************************/

void xtensa_pause_handler(void)
void xtensa_pause_handler(int irq, void *context, void *arg)
{
struct tcb_s *tcb;
int cpu = this_cpu();

nxsched_smp_call_handler(irq, context, arg);

/* Check for false alarms. Such false could occur as a consequence of
* some deadlock breaking logic that might have already serviced the
* interrupt by calling up_cpu_paused.
Expand Down
11 changes: 5 additions & 6 deletions arch/xtensa/src/esp32/esp32_intercpu_interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@
*
****************************************************************************/

static int IRAM_ATTR esp32_fromcpu_interrupt(int fromcpu)
static int IRAM_ATTR esp32_fromcpu_interrupt(int irq, void *context,
void *arg, int fromcpu)
{
uintptr_t regaddr;

Expand All @@ -64,7 +65,7 @@ static int IRAM_ATTR esp32_fromcpu_interrupt(int fromcpu)

/* Call pause handler */

xtensa_pause_handler();
xtensa_pause_handler(irq, context, arg);

return OK;
}
Expand All @@ -83,14 +84,12 @@ static int IRAM_ATTR esp32_fromcpu_interrupt(int fromcpu)

int IRAM_ATTR esp32_fromcpu0_interrupt(int irq, void *context, void *arg)
{
nxsched_smp_call_handler(irq, context, arg);
return esp32_fromcpu_interrupt(0);
return esp32_fromcpu_interrupt(irq, context, arg, 0);
}

int IRAM_ATTR esp32_fromcpu1_interrupt(int irq, void *context, void *arg)
{
nxsched_smp_call_handler(irq, context, arg);
return esp32_fromcpu_interrupt(1);
return esp32_fromcpu_interrupt(irq, context, arg, 1);
}

/****************************************************************************
Expand Down
11 changes: 5 additions & 6 deletions arch/xtensa/src/esp32s3/esp32s3_intercpu_interrupt.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
*
****************************************************************************/

static int IRAM_ATTR esp32s3_fromcpu_interrupt(int fromcpu)
static int IRAM_ATTR esp32s3_fromcpu_interrupt(int irq, void *context,
void *arg, int fromcpu)
{
uintptr_t regaddr;

Expand All @@ -65,7 +66,7 @@ static int IRAM_ATTR esp32s3_fromcpu_interrupt(int fromcpu)

/* Call pause handler */

xtensa_pause_handler();
xtensa_pause_handler(irq, context, arg);

return OK;
}
Expand All @@ -84,14 +85,12 @@ static int IRAM_ATTR esp32s3_fromcpu_interrupt(int fromcpu)

int IRAM_ATTR esp32s3_fromcpu0_interrupt(int irq, void *context, void *arg)
{
nxsched_smp_call_handler(irq, context, arg);
return esp32s3_fromcpu_interrupt(0);
return esp32s3_fromcpu_interrupt(irq, context, arg, 0);
}

int IRAM_ATTR esp32s3_fromcpu1_interrupt(int irq, void *context, void *arg)
{
nxsched_smp_call_handler(irq, context, arg);
return esp32s3_fromcpu_interrupt(1);
return esp32s3_fromcpu_interrupt(irq, context, arg, 1);
}

/****************************************************************************
Expand Down

0 comments on commit 06068bc

Please sign in to comment.