--- zzzz-none-000/linux-4.9.279/kernel/sched/core.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-atom-6591-750/linux-4.9.279/kernel/sched/core.c 2023-02-08 11:43:43.000000000 +0000 @@ -90,6 +90,9 @@ #define CREATE_TRACE_POINTS #include +#if defined(CONFIG_AVM_SIMPLE_PROFILING) +#include +#endif/*--- #if defined(CONFIG_AVM_SIMPLE_PROFILING) ---*/ DEFINE_MUTEX(sched_domains_mutex); DEFINE_PER_CPU_SHARED_ALIGNED(struct rq, runqueues); @@ -2766,6 +2769,9 @@ * transition, resulting in a double drop. */ prev_state = prev->state; +#if defined(CONFIG_AVM_SIMPLE_PROFILING) + avm_simple_profiling_sched(); +#endif vtime_task_switch(prev); perf_event_task_sched_in(prev, current); finish_lock_switch(rq, prev); @@ -3213,6 +3219,12 @@ if (oops_in_progress) return; + if (IS_ENABLED(CONFIG_AVM_PRINTK)) { + console_verbose(); + if (IS_ENABLED(CONFIG_PRINTK)) + printk_avm_console_bend(0); /* force serial-output */ + } + printk(KERN_ERR "BUG: scheduling while atomic: %s/%d/0x%08x\n", prev->comm, prev->pid, preempt_count()); @@ -3231,6 +3243,14 @@ dump_stack(); add_taint(TAINT_WARN, LOCKDEP_STILL_OK); + + if (IS_ENABLED(CONFIG_AVM_ENHANCED)) { + if (IS_ENABLED(CONFIG_SMP)) + BUG(); + else + panic("BUG: scheduling while atomic: %s/%d/0x%08x\n", + prev->comm, prev->pid, preempt_count()); + } } /* @@ -5218,6 +5238,7 @@ print_worker_info(KERN_INFO, p); show_stack(p, NULL); + show_blocking_mutex_holder(p); put_task_stack(p); } @@ -7766,8 +7787,7 @@ rcu_sleep_check(); /* WARN_ON_ONCE() by default, no rate limit reqd. */ if ((preempt_count_equals(preempt_offset) && !irqs_disabled() && - !is_idle_task(current)) || - system_state != SYSTEM_RUNNING || oops_in_progress) + !is_idle_task(current)) || system_state != SYSTEM_RUNNING) return; if (time_before(jiffies, prev_jiffy + HZ) && prev_jiffy) return;