7 #ifdef WANT_EVENT_TRACE
8 #include <linux/module.h>
23 #define OZ_MAX_EVTS 2048
45 oz_trace(
"Event tracing initialized\n");
54 oz_trace(
"Event tracing terminated\n");
61 unsigned long irqstate;
65 if (ix != g_evtdev.evt_out) {
66 struct oz_event *
e = &g_evtdev.evts[g_evtdev.evt_in];
75 g_evtdev.missed_events++;
77 spin_unlock_irqrestore(&g_evtdev.lock, irqstate);
84 unsigned long irqstate;
89 spin_unlock_irqrestore(&dev->
lock, irqstate);
91 #ifdef CONFIG_DEBUG_FS
100 oz_events_clear(&g_evtdev);
110 int oz_events_release(
struct inode *inode,
struct file *filp)
112 oz_events_clear(&g_evtdev);
126 int nb_evts = count /
sizeof(
struct oz_event);
154 rc = nb_evts *
sizeof(
struct oz_event);
162 .open = oz_events_open,
163 .release = oz_events_release,
164 .read = oz_events_read,
174 if (parent ==
NULL) {
175 oz_trace(
"Failed to create debugfs directory ozmo\n");
178 g_evtdev.root_dir = parent;
180 &oz_events_fops) ==
NULL)
181 oz_trace(
"Failed to create file ozmo/events\n");
184 oz_trace(
"Failed to create file ozmo/event_mask\n");