Skip to content

Commit 6c5260d

Browse files
KAGA-KOKOingomolnar
authored andcommitted
sched/rt, xtensa: Use CONFIG_PREEMPTION
CONFIG_PREEMPTION is selected by CONFIG_PREEMPT and by CONFIG_PREEMPT_RT. Both PREEMPT and PREEMPT_RT require the same functionality which today depends on CONFIG_PREEMPT. Switch the entry code over to use CONFIG_PREEMPTION. Add PREEMPT_RT output to die(). [bigeasy: +traps.c] Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Max Filippov <jcmvbkbc@gmail.com> Cc: Chris Zankel <chris@zankel.net> Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: linux-xtensa@linux-xtensa.org Link: https://lore.kernel.org/r/20191015191821.11479-21-bigeasy@linutronix.de Signed-off-by: Ingo Molnar <mingo@kernel.org>
1 parent 85a683d commit 6c5260d

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

‎arch/xtensa/kernel/entry.S‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ common_exception_return:
520520
call4 schedule # void schedule (void)
521521
j 1b
522522

523-
#ifdef CONFIG_PREEMPT
523+
#ifdef CONFIG_PREEMPTION
524524
6:
525525
_bbci.l a4, TIF_NEED_RESCHED, 4f
526526

‎arch/xtensa/kernel/traps.c‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,12 +519,15 @@ DEFINE_SPINLOCK(die_lock);
519519
void die(const char * str, struct pt_regs * regs, long err)
520520
{
521521
static int die_counter;
522+
const char *pr = "";
523+
524+
if (IS_ENABLED(CONFIG_PREEMPTION))
525+
pr = IS_ENABLED(CONFIG_PREEMPT_RT) ? " PREEMPT_RT" : " PREEMPT";
522526

523527
console_verbose();
524528
spin_lock_irq(&die_lock);
525529

526-
pr_info("%s: sig: %ld [#%d]%s\n", str, err, ++die_counter,
527-
IS_ENABLED(CONFIG_PREEMPT) ? " PREEMPT" : "");
530+
pr_info("%s: sig: %ld [#%d]%s\n", str, err, ++die_counter, pr);
528531
show_regs(regs);
529532
if (!user_mode(regs))
530533
show_stack(NULL, (unsigned long*)regs->areg[1]);

0 commit comments

Comments
 (0)