Merge ../linux-2.6-watchdog-mm
[linux-drm-fsl-dcu.git] / arch / powerpc / platforms / pseries / ras.c
index 9df783088b618347471e2afd7e446bd387b6f4c9..b1d3d161249ec4724a4b14a685ad38c8d9ba6009 100644 (file)
@@ -65,21 +65,19 @@ static int ras_check_exception_token;
 #define EPOW_SENSOR_INDEX      0
 #define RAS_VECTOR_OFFSET      0x500
 
-static irqreturn_t ras_epow_interrupt(int irq, void *dev_id,
-                                       struct pt_regs * regs);
-static irqreturn_t ras_error_interrupt(int irq, void *dev_id,
-                                       struct pt_regs * regs);
+static irqreturn_t ras_epow_interrupt(int irq, void *dev_id);
+static irqreturn_t ras_error_interrupt(int irq, void *dev_id);
 
 /* #define DEBUG */
 
 
 static void request_ras_irqs(struct device_node *np,
-                       irqreturn_t (*handler)(int, void *, struct pt_regs *),
+                       irq_handler_t handler,
                        const char *name)
 {
        int i, index, count = 0;
        struct of_irq oirq;
-       u32 *opicprop;
+       const u32 *opicprop;
        unsigned int opicplen;
        unsigned int virqs[16];
 
@@ -87,14 +85,13 @@ static void request_ras_irqs(struct device_node *np,
         * map those interrupts using the default interrupt host and default
         * trigger
         */
-       opicprop = (u32 *)get_property(np, "open-pic-interrupt", &opicplen);
+       opicprop = get_property(np, "open-pic-interrupt", &opicplen);
        if (opicprop) {
                opicplen /= sizeof(u32);
                for (i = 0; i < opicplen; i++) {
                        if (count > 15)
                                break;
-                       virqs[count] = irq_create_mapping(NULL, *(opicprop++),
-                                                        IRQ_TYPE_NONE);
+                       virqs[count] = irq_create_mapping(NULL, *(opicprop++));
                        if (virqs[count] == NO_IRQ)
                                printk(KERN_ERR "Unable to allocate interrupt "
                                       "number for %s\n", np->full_name);
@@ -167,8 +164,7 @@ __initcall(init_ras_IRQ);
  * to examine the type of power failure and take appropriate action where
  * the time horizon permits something useful to be done.
  */
-static irqreturn_t
-ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
+static irqreturn_t ras_epow_interrupt(int irq, void *dev_id)
 {
        int status = 0xdeadbeef;
        int state = 0;
@@ -211,8 +207,7 @@ ras_epow_interrupt(int irq, void *dev_id, struct pt_regs * regs)
  * For nonrecoverable errors, an error is logged and we stop all processing
  * as quickly as possible in order to prevent propagation of the failure.
  */
-static irqreturn_t
-ras_error_interrupt(int irq, void *dev_id, struct pt_regs * regs)
+static irqreturn_t ras_error_interrupt(int irq, void *dev_id)
 {
        struct rtas_error_log *rtas_elog;
        int status = 0xdeadbeef;
@@ -338,7 +333,7 @@ static int recover_mce(struct pt_regs *regs, struct rtas_error_log * err)
                   err->disposition == RTAS_DISP_NOT_RECOVERED &&
                   err->target == RTAS_TARGET_MEMORY &&
                   err->type == RTAS_TYPE_ECC_UNCORR &&
-                  !(current->pid == 0 || current->pid == 1)) {
+                  !(current->pid == 0 || is_init(current))) {
                /* Kill off a user process with an ECC error */
                printk(KERN_ERR "MCE: uncorrectable ecc error for pid %d\n",
                       current->pid);