[POWERPC] clean up pseries hcall interfaces
[powerpc.git] / arch / powerpc / platforms / pseries / lpar.c
index 634b7d0..6cbf142 100644 (file)
@@ -21,7 +21,6 @@
 
 #undef DEBUG_LOW
 
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/dma-mapping.h>
 #include <linux/console.h>
 #define DBG_LOW(fmt...) do { } while(0)
 #endif
 
-/* in pSeries_hvCall.S */
+/* in hvCall.S */
 EXPORT_SYMBOL(plpar_hcall);
-EXPORT_SYMBOL(plpar_hcall_4out);
+EXPORT_SYMBOL(plpar_hcall9);
 EXPORT_SYMBOL(plpar_hcall_norets);
-EXPORT_SYMBOL(plpar_hcall_8arg_2ret);
-EXPORT_SYMBOL(plpar_hcall_7arg_7ret);
-EXPORT_SYMBOL(plpar_hcall_9arg_9ret);
+
 extern void pSeries_find_serial_port(void);
 
 
@@ -205,20 +202,20 @@ void __init udbg_init_debug_lpar(void)
 void __init find_udbg_vterm(void)
 {
        struct device_node *stdout_node;
-       u32 *termno;
-       char *name;
+       const u32 *termno;
+       const char *name;
        int add_console;
 
        /* find the boot console from /chosen/stdout */
        if (!of_chosen)
                return;
-       name = (char *)get_property(of_chosen, "linux,stdout-path", NULL);
+       name = get_property(of_chosen, "linux,stdout-path", NULL);
        if (name == NULL)
                return;
        stdout_node = of_find_node_by_path(name);
        if (!stdout_node)
                return;
-       name = (char *)get_property(stdout_node, "name", NULL);
+       name = get_property(stdout_node, "name", NULL);
        if (!name) {
                printk(KERN_WARNING "stdout node missing 'name' property!\n");
                goto out;
@@ -229,7 +226,7 @@ void __init find_udbg_vterm(void)
        /* Check if it's a virtual terminal */
        if (strncmp(name, "vty", 3) != 0)
                goto out;
-       termno = (u32 *)get_property(stdout_node, "reg", NULL);
+       termno = get_property(stdout_node, "reg", NULL);
        if (termno == NULL)
                goto out;
        vtermno = termno[0];
@@ -278,7 +275,6 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group,
        unsigned long flags;
        unsigned long slot;
        unsigned long hpte_v, hpte_r;
-       unsigned long dummy0, dummy1;
 
        if (!(vflags & HPTE_V_BOLTED))
                DBG_LOW("hpte_insert(group=%lx, va=%016lx, pa=%016lx, "
@@ -303,8 +299,7 @@ long pSeries_lpar_hpte_insert(unsigned long hpte_group,
        if (rflags & (_PAGE_GUARDED|_PAGE_NO_CACHE))
                hpte_r &= ~_PAGE_COHERENT;
 
-       lpar_rc = plpar_hcall(H_ENTER, flags, hpte_group, hpte_v,
-                             hpte_r, &slot, &dummy0, &dummy1);
+       lpar_rc = plpar_pte_enter(flags, hpte_group, hpte_v, hpte_r, &slot);
        if (unlikely(lpar_rc == H_PTEG_FULL)) {
                if (!(vflags & HPTE_V_BOLTED))
                        DBG_LOW(" full\n");
@@ -513,7 +508,7 @@ void pSeries_lpar_flush_hash_range(unsigned long number, int local)
                spin_unlock_irqrestore(&pSeries_lpar_tlbie_lock, flags);
 }
 
-void hpte_init_lpar(void)
+void __init hpte_init_lpar(void)
 {
        ppc_md.hpte_invalidate  = pSeries_lpar_hpte_invalidate;
        ppc_md.hpte_updatepp    = pSeries_lpar_hpte_updatepp;
@@ -522,6 +517,4 @@ void hpte_init_lpar(void)
        ppc_md.hpte_remove      = pSeries_lpar_hpte_remove;
        ppc_md.flush_hash_range = pSeries_lpar_flush_hash_range;
        ppc_md.hpte_clear_all   = pSeries_lpar_hptab_clear;
-
-       htab_finish_init();
 }