powerpc/mce: Avoid using irq_work_queue() in realmode
[linux-2.6-microblaze.git] / arch / powerpc / platforms / pseries / ras.c
index 2a158e8..f12516c 100644 (file)
@@ -23,11 +23,6 @@ static DEFINE_SPINLOCK(ras_log_buf_lock);
 
 static int ras_check_exception_token;
 
-static void mce_process_errlog_event(struct irq_work *work);
-static struct irq_work mce_errlog_process_work = {
-       .func = mce_process_errlog_event,
-};
-
 #define EPOW_SENSOR_TOKEN      9
 #define EPOW_SENSOR_INDEX      0
 
@@ -745,7 +740,6 @@ static int mce_handle_error(struct pt_regs *regs, struct rtas_error_log *errp)
        struct pseries_errorlog *pseries_log;
        struct pseries_mc_errorlog *mce_log = NULL;
        int disposition = rtas_error_disposition(errp);
-       unsigned long msr;
        u8 error_type;
 
        if (!rtas_error_extended(errp))
@@ -759,40 +753,16 @@ static int mce_handle_error(struct pt_regs *regs, struct rtas_error_log *errp)
        error_type = mce_log->error_type;
 
        disposition = mce_handle_err_realmode(disposition, error_type);
-
-       /*
-        * Enable translation as we will be accessing per-cpu variables
-        * in save_mce_event() which may fall outside RMO region, also
-        * leave it enabled because subsequently we will be queuing work
-        * to workqueues where again per-cpu variables accessed, besides
-        * fwnmi_release_errinfo() crashes when called in realmode on
-        * pseries.
-        * Note: All the realmode handling like flushing SLB entries for
-        *       SLB multihit is done by now.
-        */
 out:
-       msr = mfmsr();
-       mtmsr(msr | MSR_IR | MSR_DR);
-
        disposition = mce_handle_err_virtmode(regs, errp, mce_log,
                                              disposition);
-
-       /*
-        * Queue irq work to log this rtas event later.
-        * irq_work_queue uses per-cpu variables, so do this in virt
-        * mode as well.
-        */
-       irq_work_queue(&mce_errlog_process_work);
-
-       mtmsr(msr);
-
        return disposition;
 }
 
 /*
  * Process MCE rtas errlog event.
  */
-static void mce_process_errlog_event(struct irq_work *work)
+void pSeries_machine_check_log_err(void)
 {
        struct rtas_error_log *err;