WIP: handle_softirq CONFIG_AMLOGIC_DEBUG_LOCKUP
authorŁukasz Stelmach <l.stelmach@samsung.com>
Tue, 22 Feb 2022 20:14:44 +0000 (21:14 +0100)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Wed, 23 Feb 2022 09:36:07 +0000 (10:36 +0100)
Change-Id: I607a66140ae6a15574169bdd923644293dacc902
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
kernel/softirq.c

index 04884a176446410ea34efd78bbc9676e6964c1c1..a1db23fd1af788faa77badb9ec9a5047ce19df7e 100644 (file)
@@ -194,13 +194,24 @@ static void handle_softirq(unsigned int vec_nr)
 {
        struct softirq_action *h = softirq_vec + vec_nr;
        int prev_count;
+#ifdef CONFIG_AMLOGIC_DEBUG_LOCKUP
+       int cpu;
+       unsigned long long tin;
+#endif
 
        prev_count = preempt_count();
 
        kstat_incr_softirqs_this_cpu(vec_nr);
 
        trace_softirq_entry(vec_nr);
+#ifdef CONFIG_AMLOGIC_DEBUG_LOCKUP
+       cpu = smp_processor_id();
+       sirq_in_hook(cpu, &tin, (void *)h->action);
+#endif
        h->action(h);
+#ifdef CONFIG_AMLOGIC_DEBUG_LOCKUP
+       sirq_out_hook(cpu, tin, (void *)h->action);
+#endif
        trace_softirq_exit(vec_nr);
        if (unlikely(prev_count != preempt_count())) {
                pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n",
@@ -424,10 +435,6 @@ asmlinkage __visible void __softirq_entry __do_softirq(void)
        int max_restart = MAX_SOFTIRQ_RESTART;
        bool in_hardirq;
        __u32 pending;
-#ifdef CONFIG_AMLOGIC_DEBUG_LOCKUP
-       int cpu;
-       unsigned long long tin;
-#endif
 
        /*
         * Mask out PF_MEMALLOC s current task context is borrowed for the