Changeset View
Changeset View
Standalone View
Standalone View
sys/xen/arch-intr.h
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | |||||
void xen_intr_eoi_source(struct xenisrc *isrc); | void xen_intr_eoi_source(struct xenisrc *isrc); | ||||
void xen_intr_enable_intr(struct xenisrc *isrc); | void xen_intr_enable_intr(struct xenisrc *isrc); | ||||
void xen_intr_disable_intr(struct xenisrc *isrc); | void xen_intr_disable_intr(struct xenisrc *isrc); | ||||
int xen_intr_assign_cpu(struct xenisrc *isrc, u_int to_cpu); | int xen_intr_assign_cpu(struct xenisrc *isrc, u_int to_cpu); | ||||
/******************* Functions implemented by each architecture **************/ | /******************* Functions implemented by each architecture **************/ | ||||
void xen_arch_intr_init(void); | void xen_arch_intr_init(void); | ||||
struct xenisrc *xen_arch_intr_alloc(struct malloc_type *mtype, const char *name, | |||||
enum evtchn_type type, evtchn_port_t port); | |||||
void xen_arch_intr_release(struct malloc_type *mtype, struct xenisrc *isrc); | |||||
ehem_freebsd_m5p.com: I'm not 100% certain I got these right. The device name is useful for the intr_create_event()… | |||||
Not Done Inline ActionsSo this really does look like a good question of what these should look like. The minimum arguments are: struct xenisrc *xen_arch_intr_alloc(enum evtchn_type type, evtchn_port_t port); void xen_arch_intr_release(struct xenisrc *isrc); Testing confirmed passing the name is actually unnecessary. Meanwhile, if the architecture file takes ownership of M_XENINTR then that can be static to architecture and need not be passed around. Checking found the other use of M_XENINTR disappeared from with D30228. Thoughts? (somehow I'm guessing those are going to be "do it") ehem_freebsd_m5p.com: So this really does look like a good question of what these should look like. The minimum… | |||||
Done Inline Actionsehem_freebsd_m5p.com: Though by doing //less// in D30935 it is possible to remove the requirement for passing the… | |||||
bool xen_arch_intr_has_handlers(struct xenisrc *isrc); | bool xen_arch_intr_has_handlers(struct xenisrc *isrc); | ||||
bool xen_arch_intr_execute_handlers(struct xenisrc *isrc, | bool xen_arch_intr_execute_handlers(struct xenisrc *isrc, | ||||
struct trapframe *frame); | struct trapframe *frame); | ||||
int xen_arch_intr_add_handler(const char *name, driver_filter_t filter, | int xen_arch_intr_add_handler(const char *name, driver_filter_t filter, | ||||
driver_intr_t handler, void *arg, enum intr_type flags, | driver_intr_t handler, void *arg, enum intr_type flags, | ||||
struct xenisrc *isrc, void **cookiep); | struct xenisrc *isrc, void **cookiep); | ||||
int xen_arch_intr_describe(struct xenisrc *isrc, void *cookie, | int xen_arch_intr_describe(struct xenisrc *isrc, void *cookie, | ||||
const char *descr); | const char *descr); | ||||
int xen_arch_intr_remove_handler(struct xenisrc *isrc, void *cookie); | int xen_arch_intr_remove_handler(struct xenisrc *isrc, void *cookie); | ||||
int xen_arch_intr_event_bind(struct xenisrc *isrc, u_int cpu); | int xen_arch_intr_event_bind(struct xenisrc *isrc, u_int cpu); | ||||
#endif /* _XEN_ARCH_INTR_H_ */ | #endif /* _XEN_ARCH_INTR_H_ */ |
I'm not 100% certain I got these right. The device name is useful for the intr_create_event() call on arm64, though I don't believe that is absolutely required.
The bigger question is whether to have M_XENINTR remain in xen_intr.c, versus moving with xen_arch_intr_alloc() to the architecture-specific file. In earlier versions the call to malloc() had remained in xen_intr.c, but that became untenable when it was clear xen_intr_find_unused_isrc() should move to architecture (since identifying reusable interrupts relies on highly architecture-specific structures).
I think I had also initially been seeing hints part of the memory handling might remain in xen_intr.c, but that may have disappeared with PVHv1.