X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=arch%2Fpowerpc%2Fplatforms%2Fiseries%2Flpevents.c;h=e5b40e3e0082cfd07c1597edd26c6f5ebbac54f5;hb=7924e4f6519dd5b349ed146fe9fe35206730be67;hp=91df52a1899addd4aeaec8b39d1d5f9809cccc19;hpb=e0cc09e295f346b7921e921f385fe5213472316a;p=linux-2.6-omap-h63xx.git diff --git a/arch/powerpc/platforms/iseries/lpevents.c b/arch/powerpc/platforms/iseries/lpevents.c index 91df52a1899..e5b40e3e008 100644 --- a/arch/powerpc/platforms/iseries/lpevents.c +++ b/arch/powerpc/platforms/iseries/lpevents.c @@ -121,6 +121,7 @@ void process_hvlpevents(void) { struct HvLpEvent * event; + restart: /* If we have recursed, just return */ if (!spin_trylock(&hvlpevent_queue.hq_lock)) return; @@ -146,8 +147,20 @@ void process_hvlpevents(void) if (event->xType < HvLpEvent_Type_NumTypes && lpEventHandler[event->xType]) lpEventHandler[event->xType](event); - else - printk(KERN_INFO "Unexpected Lp Event type=%d\n", event->xType ); + else { + u8 type = event->xType; + + /* + * Don't printk in the spinlock as printk + * may require ack events form the HV to send + * any characters there. + */ + hvlpevent_clear_valid(event); + spin_unlock(&hvlpevent_queue.hq_lock); + printk(KERN_INFO + "Unexpected Lp Event type=%d\n", type); + goto restart; + } hvlpevent_clear_valid(event); } else if (hvlpevent_queue.hq_overflow_pending) @@ -182,7 +195,7 @@ static int set_spread_lpevents(char *str) } __setup("spread_lpevents=", set_spread_lpevents); -void setup_hvlpevent_queue(void) +void __init setup_hvlpevent_queue(void) { void *eventStack; @@ -226,7 +239,7 @@ int HvLpEvent_unregisterHandler(HvLpEvent_Type eventType) * other CPUs, and that the deleted handler isn't * still running on another CPU when we return. */ - synchronize_rcu(); + synchronize_sched(); return 0; } }