Lines Matching refs:port
36 void (*handler)(evtchn_port_t port, struct pt_regs *regs, void *data);
42 void default_handler(evtchn_port_t port, struct pt_regs *regs, void *data);
65 int do_event(evtchn_port_t port, struct pt_regs *regs) in do_event() argument
69 clear_evtchn(port); in do_event()
71 if (port >= NR_EVS) { in do_event()
72 printk("WARN: do_event(): Port number too large: %d\n", port); in do_event()
76 action = &ev_actions[port]; in do_event()
80 action->handler(port, regs, action->data); in do_event()
85 evtchn_port_t bind_evtchn(evtchn_port_t port, in bind_evtchn() argument
89 if (ev_actions[port].handler != default_handler) in bind_evtchn()
91 port); in bind_evtchn()
93 ev_actions[port].data = data; in bind_evtchn()
95 ev_actions[port].handler = handler; in bind_evtchn()
96 synch_set_bit(port, bound_ports); in bind_evtchn()
98 return port; in bind_evtchn()
104 void unbind_evtchn(evtchn_port_t port) in unbind_evtchn() argument
109 if (ev_actions[port].handler == default_handler) in unbind_evtchn()
110 debug("Default handler for port %d when unbinding\n", port); in unbind_evtchn()
111 mask_evtchn(port); in unbind_evtchn()
112 clear_evtchn(port); in unbind_evtchn()
114 ev_actions[port].handler = default_handler; in unbind_evtchn()
116 ev_actions[port].data = NULL; in unbind_evtchn()
117 synch_clear_bit(port, bound_ports); in unbind_evtchn()
119 close.port = port; in unbind_evtchn()
122 printf("WARN: close_port %d failed rc=%d. ignored\n", port, rc); in unbind_evtchn()
125 void default_handler(evtchn_port_t port, struct pt_regs *regs, void *ignore) in default_handler() argument
127 debug("[Port %d] - event received\n", port); in default_handler()
141 void *data, evtchn_port_t *port) in evtchn_alloc_unbound() argument
156 *port = bind_evtchn(op.port, handler, data); in evtchn_alloc_unbound()