Loading arch/powerpc/platforms/iseries/irq.c +2 −11 Original line number Diff line number Diff line Loading @@ -147,20 +147,11 @@ static void int_received(struct pci_event *event, struct pt_regs *regs) static void pci_event_handler(struct HvLpEvent *event, struct pt_regs *regs) { if (event && (event->xType == HvLpEvent_Type_PciIo)) { switch (event->xFlags.xFunction) { case HvLpEvent_Function_Int: if (hvlpevent_is_int(event)) int_received((struct pci_event *)event, regs); break; case HvLpEvent_Function_Ack: else printk(KERN_ERR "pci_event_handler: unexpected ack received\n"); break; default: printk(KERN_ERR "pci_event_handler: unexpected event function %d\n", (int)event->xFlags.xFunction); break; } } else if (event) printk(KERN_ERR "pci_event_handler: Unrecognized PCI event type 0x%x\n", Loading arch/powerpc/platforms/iseries/lpevents.c +6 −6 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ static struct HvLpEvent * get_next_hvlpevent(void) struct HvLpEvent * event; event = (struct HvLpEvent *)hvlpevent_queue.xSlicCurEventPtr; if (event->xFlags.xValid) { if (hvlpevent_is_valid(event)) { /* rmb() needed only for weakly consistent machines (regatta) */ rmb(); /* Set pointer to next potential event */ Loading Loading @@ -84,7 +84,7 @@ int hvlpevent_is_pending(void) next_event = (struct HvLpEvent *)hvlpevent_queue.xSlicCurEventPtr; return next_event->xFlags.xValid | return hvlpevent_is_valid(next_event) || hvlpevent_queue.xPlicOverflowIntPending; } Loading @@ -101,18 +101,18 @@ static void hvlpevent_clear_valid(struct HvLpEvent * event) switch (extra) { case 3: tmp = (struct HvLpEvent*)((char*)event + 3 * LpEventAlign); tmp->xFlags.xValid = 0; hvlpevent_invalidate(tmp); case 2: tmp = (struct HvLpEvent*)((char*)event + 2 * LpEventAlign); tmp->xFlags.xValid = 0; hvlpevent_invalidate(tmp); case 1: tmp = (struct HvLpEvent*)((char*)event + 1 * LpEventAlign); tmp->xFlags.xValid = 0; hvlpevent_invalidate(tmp); } mb(); event->xFlags.xValid = 0; hvlpevent_invalidate(event); } void process_hvlpevents(struct pt_regs *regs) Loading arch/powerpc/platforms/iseries/mf.c +3 −13 Original line number Diff line number Diff line Loading @@ -251,10 +251,7 @@ static struct pending_event *new_pending_event(void) } memset(ev, 0, sizeof(struct pending_event)); hev = &ev->event.hp_lp_event; hev->xFlags.xValid = 1; hev->xFlags.xAckType = HvLpEvent_AckType_ImmediateAck; hev->xFlags.xAckInd = HvLpEvent_AckInd_DoAck; hev->xFlags.xFunction = HvLpEvent_Function_Int; hev->flags = HV_LP_EVENT_VALID | HV_LP_EVENT_DO_ACK | HV_LP_EVENT_INT; hev->xType = HvLpEvent_Type_MachineFac; hev->xSourceLp = HvLpConfig_getLpIndex(); hev->xTargetLp = primary_lp; Loading Loading @@ -518,17 +515,10 @@ static void handle_ack(struct io_mf_lp_event *event) static void hv_handler(struct HvLpEvent *event, struct pt_regs *regs) { if ((event != NULL) && (event->xType == HvLpEvent_Type_MachineFac)) { switch(event->xFlags.xFunction) { case HvLpEvent_Function_Ack: if (hvlpevent_is_ack(event)) handle_ack((struct io_mf_lp_event *)event); break; case HvLpEvent_Function_Int: else handle_int((struct io_mf_lp_event *)event); break; default: printk(KERN_ERR "mf.c: non ack/int event received\n"); break; } } else printk(KERN_ERR "mf.c: alien event received\n"); } Loading arch/powerpc/platforms/iseries/viopath.c +5 −7 Original line number Diff line number Diff line Loading @@ -270,7 +270,7 @@ static void handleMonitorEvent(struct HvLpEvent *event) * First see if this is just a normal monitor message from the * other partition */ if (event->xFlags.xFunction == HvLpEvent_Function_Int) { if (hvlpevent_is_int(event)) { remoteLp = event->xSourceLp; if (!viopathStatus[remoteLp].isActive) sendMonMsg(remoteLp); Loading Loading @@ -331,13 +331,12 @@ static void handleConfig(struct HvLpEvent *event) { if (!event) return; if (event->xFlags.xFunction == HvLpEvent_Function_Int) { if (hvlpevent_is_int(event)) { printk(VIOPATH_KERN_WARN "unexpected config request from partition %d", event->xSourceLp); if ((event->xFlags.xFunction == HvLpEvent_Function_Int) && (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck)) { if (hvlpevent_need_ack(event)) { event->xRc = HvLpEvent_Rc_InvalidSubtype; HvCallEvent_ackLpEvent(event); } Loading Loading @@ -377,7 +376,7 @@ static void vio_handleEvent(struct HvLpEvent *event, struct pt_regs *regs) int subtype = (event->xSubtype & VIOMAJOR_SUBTYPE_MASK) >> VIOMAJOR_SUBTYPE_SHIFT; if (event->xFlags.xFunction == HvLpEvent_Function_Int) { if (hvlpevent_is_int(event)) { remoteLp = event->xSourceLp; /* * The isActive is checked because if the hosting partition Loading Loading @@ -436,8 +435,7 @@ static void vio_handleEvent(struct HvLpEvent *event, struct pt_regs *regs) "unexpected virtual io event subtype %d from partition %d\n", event->xSubtype, remoteLp); /* No handler. Ack if necessary */ if ((event->xFlags.xFunction == HvLpEvent_Function_Int) && (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck)) { if (hvlpevent_is_int(event) && hvlpevent_need_ack(event)) { event->xRc = HvLpEvent_Rc_InvalidSubtype; HvCallEvent_ackLpEvent(event); } Loading drivers/block/viodasd.c +15 −17 Original line number Diff line number Diff line Loading @@ -293,6 +293,7 @@ static int send_request(struct request *req) u16 viocmd; HvLpEvent_Rc hvrc; struct vioblocklpevent *bevent; struct HvLpEvent *hev; struct scatterlist sg[VIOMAXBLOCKDMA]; int sgindex; int statindex; Loading Loading @@ -347,22 +348,19 @@ static int send_request(struct request *req) * token so we can match the response up later */ memset(bevent, 0, sizeof(struct vioblocklpevent)); bevent->event.xFlags.xValid = 1; bevent->event.xFlags.xFunction = HvLpEvent_Function_Int; bevent->event.xFlags.xAckInd = HvLpEvent_AckInd_DoAck; bevent->event.xFlags.xAckType = HvLpEvent_AckType_ImmediateAck; bevent->event.xType = HvLpEvent_Type_VirtualIo; bevent->event.xSubtype = viocmd; bevent->event.xSourceLp = HvLpConfig_getLpIndex(); bevent->event.xTargetLp = viopath_hostLp; bevent->event.xSizeMinus1 = hev = &bevent->event; hev->flags = HV_LP_EVENT_VALID | HV_LP_EVENT_DO_ACK | HV_LP_EVENT_INT; hev->xType = HvLpEvent_Type_VirtualIo; hev->xSubtype = viocmd; hev->xSourceLp = HvLpConfig_getLpIndex(); hev->xTargetLp = viopath_hostLp; hev->xSizeMinus1 = offsetof(struct vioblocklpevent, u.rw_data.dma_info) + (sizeof(bevent->u.rw_data.dma_info[0]) * nsg) - 1; bevent->event.xSourceInstanceId = viopath_sourceinst(viopath_hostLp); bevent->event.xTargetInstanceId = viopath_targetinst(viopath_hostLp); bevent->event.xCorrelationToken = (u64)req; hev->xSourceInstanceId = viopath_sourceinst(viopath_hostLp); hev->xTargetInstanceId = viopath_targetinst(viopath_hostLp); hev->xCorrelationToken = (u64)req; bevent->version = VIOVERSION; bevent->disk = DEVICE_NO(d); bevent->u.rw_data.offset = start; Loading Loading @@ -649,10 +647,10 @@ static void handle_block_event(struct HvLpEvent *event) /* Notification that a partition went away! */ return; /* First, we should NEVER get an int here...only acks */ if (event->xFlags.xFunction == HvLpEvent_Function_Int) { if (hvlpevent_is_int(event)) { printk(VIOD_KERN_WARNING "Yikes! got an int in viodasd event handler!\n"); if (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck) { if (hvlpevent_need_ack(event)) { event->xRc = HvLpEvent_Rc_InvalidSubtype; HvCallEvent_ackLpEvent(event); } Loading Loading @@ -695,7 +693,7 @@ static void handle_block_event(struct HvLpEvent *event) default: printk(VIOD_KERN_WARNING "invalid subtype!"); if (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck) { if (hvlpevent_need_ack(event)) { event->xRc = HvLpEvent_Rc_InvalidSubtype; HvCallEvent_ackLpEvent(event); } Loading Loading
arch/powerpc/platforms/iseries/irq.c +2 −11 Original line number Diff line number Diff line Loading @@ -147,20 +147,11 @@ static void int_received(struct pci_event *event, struct pt_regs *regs) static void pci_event_handler(struct HvLpEvent *event, struct pt_regs *regs) { if (event && (event->xType == HvLpEvent_Type_PciIo)) { switch (event->xFlags.xFunction) { case HvLpEvent_Function_Int: if (hvlpevent_is_int(event)) int_received((struct pci_event *)event, regs); break; case HvLpEvent_Function_Ack: else printk(KERN_ERR "pci_event_handler: unexpected ack received\n"); break; default: printk(KERN_ERR "pci_event_handler: unexpected event function %d\n", (int)event->xFlags.xFunction); break; } } else if (event) printk(KERN_ERR "pci_event_handler: Unrecognized PCI event type 0x%x\n", Loading
arch/powerpc/platforms/iseries/lpevents.c +6 −6 Original line number Diff line number Diff line Loading @@ -53,7 +53,7 @@ static struct HvLpEvent * get_next_hvlpevent(void) struct HvLpEvent * event; event = (struct HvLpEvent *)hvlpevent_queue.xSlicCurEventPtr; if (event->xFlags.xValid) { if (hvlpevent_is_valid(event)) { /* rmb() needed only for weakly consistent machines (regatta) */ rmb(); /* Set pointer to next potential event */ Loading Loading @@ -84,7 +84,7 @@ int hvlpevent_is_pending(void) next_event = (struct HvLpEvent *)hvlpevent_queue.xSlicCurEventPtr; return next_event->xFlags.xValid | return hvlpevent_is_valid(next_event) || hvlpevent_queue.xPlicOverflowIntPending; } Loading @@ -101,18 +101,18 @@ static void hvlpevent_clear_valid(struct HvLpEvent * event) switch (extra) { case 3: tmp = (struct HvLpEvent*)((char*)event + 3 * LpEventAlign); tmp->xFlags.xValid = 0; hvlpevent_invalidate(tmp); case 2: tmp = (struct HvLpEvent*)((char*)event + 2 * LpEventAlign); tmp->xFlags.xValid = 0; hvlpevent_invalidate(tmp); case 1: tmp = (struct HvLpEvent*)((char*)event + 1 * LpEventAlign); tmp->xFlags.xValid = 0; hvlpevent_invalidate(tmp); } mb(); event->xFlags.xValid = 0; hvlpevent_invalidate(event); } void process_hvlpevents(struct pt_regs *regs) Loading
arch/powerpc/platforms/iseries/mf.c +3 −13 Original line number Diff line number Diff line Loading @@ -251,10 +251,7 @@ static struct pending_event *new_pending_event(void) } memset(ev, 0, sizeof(struct pending_event)); hev = &ev->event.hp_lp_event; hev->xFlags.xValid = 1; hev->xFlags.xAckType = HvLpEvent_AckType_ImmediateAck; hev->xFlags.xAckInd = HvLpEvent_AckInd_DoAck; hev->xFlags.xFunction = HvLpEvent_Function_Int; hev->flags = HV_LP_EVENT_VALID | HV_LP_EVENT_DO_ACK | HV_LP_EVENT_INT; hev->xType = HvLpEvent_Type_MachineFac; hev->xSourceLp = HvLpConfig_getLpIndex(); hev->xTargetLp = primary_lp; Loading Loading @@ -518,17 +515,10 @@ static void handle_ack(struct io_mf_lp_event *event) static void hv_handler(struct HvLpEvent *event, struct pt_regs *regs) { if ((event != NULL) && (event->xType == HvLpEvent_Type_MachineFac)) { switch(event->xFlags.xFunction) { case HvLpEvent_Function_Ack: if (hvlpevent_is_ack(event)) handle_ack((struct io_mf_lp_event *)event); break; case HvLpEvent_Function_Int: else handle_int((struct io_mf_lp_event *)event); break; default: printk(KERN_ERR "mf.c: non ack/int event received\n"); break; } } else printk(KERN_ERR "mf.c: alien event received\n"); } Loading
arch/powerpc/platforms/iseries/viopath.c +5 −7 Original line number Diff line number Diff line Loading @@ -270,7 +270,7 @@ static void handleMonitorEvent(struct HvLpEvent *event) * First see if this is just a normal monitor message from the * other partition */ if (event->xFlags.xFunction == HvLpEvent_Function_Int) { if (hvlpevent_is_int(event)) { remoteLp = event->xSourceLp; if (!viopathStatus[remoteLp].isActive) sendMonMsg(remoteLp); Loading Loading @@ -331,13 +331,12 @@ static void handleConfig(struct HvLpEvent *event) { if (!event) return; if (event->xFlags.xFunction == HvLpEvent_Function_Int) { if (hvlpevent_is_int(event)) { printk(VIOPATH_KERN_WARN "unexpected config request from partition %d", event->xSourceLp); if ((event->xFlags.xFunction == HvLpEvent_Function_Int) && (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck)) { if (hvlpevent_need_ack(event)) { event->xRc = HvLpEvent_Rc_InvalidSubtype; HvCallEvent_ackLpEvent(event); } Loading Loading @@ -377,7 +376,7 @@ static void vio_handleEvent(struct HvLpEvent *event, struct pt_regs *regs) int subtype = (event->xSubtype & VIOMAJOR_SUBTYPE_MASK) >> VIOMAJOR_SUBTYPE_SHIFT; if (event->xFlags.xFunction == HvLpEvent_Function_Int) { if (hvlpevent_is_int(event)) { remoteLp = event->xSourceLp; /* * The isActive is checked because if the hosting partition Loading Loading @@ -436,8 +435,7 @@ static void vio_handleEvent(struct HvLpEvent *event, struct pt_regs *regs) "unexpected virtual io event subtype %d from partition %d\n", event->xSubtype, remoteLp); /* No handler. Ack if necessary */ if ((event->xFlags.xFunction == HvLpEvent_Function_Int) && (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck)) { if (hvlpevent_is_int(event) && hvlpevent_need_ack(event)) { event->xRc = HvLpEvent_Rc_InvalidSubtype; HvCallEvent_ackLpEvent(event); } Loading
drivers/block/viodasd.c +15 −17 Original line number Diff line number Diff line Loading @@ -293,6 +293,7 @@ static int send_request(struct request *req) u16 viocmd; HvLpEvent_Rc hvrc; struct vioblocklpevent *bevent; struct HvLpEvent *hev; struct scatterlist sg[VIOMAXBLOCKDMA]; int sgindex; int statindex; Loading Loading @@ -347,22 +348,19 @@ static int send_request(struct request *req) * token so we can match the response up later */ memset(bevent, 0, sizeof(struct vioblocklpevent)); bevent->event.xFlags.xValid = 1; bevent->event.xFlags.xFunction = HvLpEvent_Function_Int; bevent->event.xFlags.xAckInd = HvLpEvent_AckInd_DoAck; bevent->event.xFlags.xAckType = HvLpEvent_AckType_ImmediateAck; bevent->event.xType = HvLpEvent_Type_VirtualIo; bevent->event.xSubtype = viocmd; bevent->event.xSourceLp = HvLpConfig_getLpIndex(); bevent->event.xTargetLp = viopath_hostLp; bevent->event.xSizeMinus1 = hev = &bevent->event; hev->flags = HV_LP_EVENT_VALID | HV_LP_EVENT_DO_ACK | HV_LP_EVENT_INT; hev->xType = HvLpEvent_Type_VirtualIo; hev->xSubtype = viocmd; hev->xSourceLp = HvLpConfig_getLpIndex(); hev->xTargetLp = viopath_hostLp; hev->xSizeMinus1 = offsetof(struct vioblocklpevent, u.rw_data.dma_info) + (sizeof(bevent->u.rw_data.dma_info[0]) * nsg) - 1; bevent->event.xSourceInstanceId = viopath_sourceinst(viopath_hostLp); bevent->event.xTargetInstanceId = viopath_targetinst(viopath_hostLp); bevent->event.xCorrelationToken = (u64)req; hev->xSourceInstanceId = viopath_sourceinst(viopath_hostLp); hev->xTargetInstanceId = viopath_targetinst(viopath_hostLp); hev->xCorrelationToken = (u64)req; bevent->version = VIOVERSION; bevent->disk = DEVICE_NO(d); bevent->u.rw_data.offset = start; Loading Loading @@ -649,10 +647,10 @@ static void handle_block_event(struct HvLpEvent *event) /* Notification that a partition went away! */ return; /* First, we should NEVER get an int here...only acks */ if (event->xFlags.xFunction == HvLpEvent_Function_Int) { if (hvlpevent_is_int(event)) { printk(VIOD_KERN_WARNING "Yikes! got an int in viodasd event handler!\n"); if (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck) { if (hvlpevent_need_ack(event)) { event->xRc = HvLpEvent_Rc_InvalidSubtype; HvCallEvent_ackLpEvent(event); } Loading Loading @@ -695,7 +693,7 @@ static void handle_block_event(struct HvLpEvent *event) default: printk(VIOD_KERN_WARNING "invalid subtype!"); if (event->xFlags.xAckInd == HvLpEvent_AckInd_DoAck) { if (hvlpevent_need_ack(event)) { event->xRc = HvLpEvent_Rc_InvalidSubtype; HvCallEvent_ackLpEvent(event); } Loading