static void hvc_tile_notifier_del_irq(struct hvc_struct *hp, int irq) { HV_Coord coord = { 0, 0 }; /* Tell the hypervisor to stop sending us interrupts. */ hv_console_set_ipi(KERNEL_PL, -1, coord); notifier_del_irq(hp, irq); }
static void hvterm_hvsi_close(struct hvc_struct *hp, int data) { struct hvterm_priv *pv = hvterm_privs[hp->vtermno]; pr_devel("HVSI@%x: do close !\n", pv->termno); hvsilib_close(&pv->hvsi, hp); notifier_del_irq(hp, data); }
/* * IRQ based callbacks. */ static int hvc_tile_notifier_add_irq(struct hvc_struct *hp, int irq) { int rc; int cpu = raw_smp_processor_id(); /* Choose an arbitrary cpu */ HV_Coord coord = { .x = cpu_x(cpu), .y = cpu_y(cpu) }; rc = notifier_add_irq(hp, irq); if (rc) return rc; /* * Request that the hypervisor start sending us interrupts. * If the hypervisor returns an error, we still return 0, so that * we can fall back to polling. */ if (hv_console_set_ipi(KERNEL_PL, irq, coord) < 0) notifier_del_irq(hp, irq); return 0; }
void notifier_hangup_irq(struct hvc_struct *hp, int irq) { notifier_del_irq(hp, irq); }