TO RESET: preempt_enable: check if no_preempt isn't negative
Change-Id: I1cef2077c50f3b3020870505dd065d10617f440e
This commit is contained in:
@ -730,6 +730,49 @@ static void show_context_stack(struct pt_regs *regs)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef ENABLE_FUGAKU_HACKS
|
||||
void __show_context_stack(struct thread *thread,
|
||||
unsigned long pc, uintptr_t sp, int kprintf_locked)
|
||||
{
|
||||
uintptr_t stack_top;
|
||||
unsigned long irqflags = 0;
|
||||
|
||||
stack_top = ALIGN_UP(sp, (uintptr_t)KERNEL_STACK_SIZE);
|
||||
|
||||
if (!kprintf_locked)
|
||||
irqflags = kprintf_lock();
|
||||
|
||||
__kprintf("TID: %d, call stack (most recent first):\n",
|
||||
thread->tid);
|
||||
__kprintf("PC: %016lx, SP: %016lx\n", pc, sp);
|
||||
for (;;) {
|
||||
extern char _head[], _end[];
|
||||
uintptr_t *fp, *lr;
|
||||
fp = (uintptr_t *)sp;
|
||||
lr = (uintptr_t *)(sp + 8);
|
||||
|
||||
if ((*fp <= sp)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((*fp > stack_top)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if ((*lr < (unsigned long)_head) ||
|
||||
(*lr > (unsigned long)_end)) {
|
||||
break;
|
||||
}
|
||||
|
||||
__kprintf("PC: %016lx, SP: %016lx, FP: %016lx\n", *lr - 4, sp, *fp);
|
||||
sp = *fp;
|
||||
}
|
||||
|
||||
if (!kprintf_locked)
|
||||
kprintf_unlock(irqflags);
|
||||
}
|
||||
#endif
|
||||
|
||||
void handle_IPI(unsigned int vector, struct pt_regs *regs)
|
||||
{
|
||||
struct ihk_mc_interrupt_handler *h;
|
||||
|
||||
Reference in New Issue
Block a user