chelsio: Support MSG_SPLICE_PAGES
[linux-2.6-microblaze.git] / kernel / notifier.c
index d353e4b..b3ce28f 100644 (file)
@@ -7,6 +7,9 @@
 #include <linux/vmalloc.h>
 #include <linux/reboot.h>
 
+#define CREATE_TRACE_POINTS
+#include <trace/events/notifier.h>
+
 /*
  *     Notifier list for kernel code which wants to be called
  *     at shutdown. This is used to stop any idling DMA operations
@@ -37,6 +40,7 @@ static int notifier_chain_register(struct notifier_block **nl,
        }
        n->next = *nl;
        rcu_assign_pointer(*nl, n);
+       trace_notifier_register((void *)n->notifier_call);
        return 0;
 }
 
@@ -46,6 +50,7 @@ static int notifier_chain_unregister(struct notifier_block **nl,
        while ((*nl) != NULL) {
                if ((*nl) == n) {
                        rcu_assign_pointer(*nl, n->next);
+                       trace_notifier_unregister((void *)n->notifier_call);
                        return 0;
                }
                nl = &((*nl)->next);
@@ -84,6 +89,7 @@ static int notifier_call_chain(struct notifier_block **nl,
                        continue;
                }
 #endif
+               trace_notifier_run((void *)nb->notifier_call);
                ret = nb->notifier_call(nb, val, v);
 
                if (nr_calls)