Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
[linux-drm-fsl-dcu.git] / arch / powerpc / platforms / iseries / mf.c
index 1a2c2a50f9221c912e3c5a465f97a495d03fac9c..90d3d49f713e827b6312d43a8656f4981d3b397c 100644 (file)
@@ -38,6 +38,7 @@
 #include <asm/uaccess.h>
 #include <asm/paca.h>
 #include <asm/abs_addr.h>
+#include <asm/firmware.h>
 #include <asm/iseries/vio.h>
 #include <asm/iseries/mf.h>
 #include <asm/iseries/hv_lp_config.h>
@@ -357,7 +358,7 @@ static int dma_and_signal_ce_msg(char *ce_msg,
  */
 static int shutdown(void)
 {
-       int rc = kill_proc(1, SIGINT, 1);
+       int rc = kill_cad_pid(SIGINT, 1);
 
        if (rc) {
                printk(KERN_ALERT "mf.c: SIGINT to init failed (%d), "
@@ -513,7 +514,7 @@ static void handle_ack(struct io_mf_lp_event *event)
  * parse it enough to know if it is an interrupt or an
  * acknowledge.
  */
-static void hv_handler(struct HvLpEvent *event, struct pt_regs *regs)
+static void hv_handler(struct HvLpEvent *event)
 {
        if ((event != NULL) && (event->xType == HvLpEvent_Type_MachineFac)) {
                if (hvlpevent_is_ack(event))
@@ -847,7 +848,7 @@ static int mf_get_boot_rtc(struct rtc_time *tm)
        /* We need to poll here as we are not yet taking interrupts */
        while (rtc_data.busy) {
                if (hvlpevent_is_pending())
-                       process_hvlpevents(NULL);
+                       process_hvlpevents();
        }
        return rtc_set_tm(rtc_data.rc, rtc_data.ce_msg.ce_msg, tm);
 }
@@ -1178,7 +1179,7 @@ static ssize_t proc_mf_change_vmlinux(struct file *file,
                                      const char __user *buf,
                                      size_t count, loff_t *ppos)
 {
-       struct proc_dir_entry *dp = PDE(file->f_dentry->d_inode);
+       struct proc_dir_entry *dp = PDE(file->f_path.dentry->d_inode);
        ssize_t rc;
        dma_addr_t dma_addr;
        char *page;
@@ -1235,6 +1236,9 @@ static int __init mf_proc_init(void)
        char name[2];
        int i;
 
+       if (!firmware_has_feature(FW_FEATURE_ISERIES))
+               return 0;
+
        mf_proc_root = proc_mkdir("iSeries/mf", NULL);
        if (!mf_proc_root)
                return 1;
@@ -1249,7 +1253,6 @@ static int __init mf_proc_init(void)
                ent = create_proc_entry("cmdline", S_IFREG|S_IRUSR|S_IWUSR, mf);
                if (!ent)
                        return 1;
-               ent->nlink = 1;
                ent->data = (void *)(long)i;
                ent->read_proc = proc_mf_dump_cmdline;
                ent->write_proc = proc_mf_change_cmdline;
@@ -1260,7 +1263,6 @@ static int __init mf_proc_init(void)
                ent = create_proc_entry("vmlinux", S_IFREG|S_IWUSR, mf);
                if (!ent)
                        return 1;
-               ent->nlink = 1;
                ent->data = (void *)(long)i;
                ent->proc_fops = &proc_vmlinux_operations;
        }
@@ -1268,7 +1270,6 @@ static int __init mf_proc_init(void)
        ent = create_proc_entry("side", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
        if (!ent)
                return 1;
-       ent->nlink = 1;
        ent->data = (void *)0;
        ent->read_proc = proc_mf_dump_side;
        ent->write_proc = proc_mf_change_side;
@@ -1276,7 +1277,6 @@ static int __init mf_proc_init(void)
        ent = create_proc_entry("src", S_IFREG|S_IRUSR|S_IWUSR, mf_proc_root);
        if (!ent)
                return 1;
-       ent->nlink = 1;
        ent->data = (void *)0;
        ent->read_proc = proc_mf_dump_src;
        ent->write_proc = proc_mf_change_src;