Remove obsolete #include <linux/config.h>
[pandora-kernel.git] / arch / powerpc / platforms / powermac / setup.c
index 4d15e39..8654b5f 100644 (file)
@@ -23,7 +23,6 @@
  * bootup setup stuff..
  */
 
-#include <linux/config.h>
 #include <linux/init.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
@@ -458,16 +457,28 @@ static int pmac_pm_finish(suspend_state_t state)
        printk(KERN_DEBUG "%s(%d)\n", __FUNCTION__, state);
 
        /* Restore userland MMU context */
-       set_context(current->active_mm->context, current->active_mm->pgd);
+       set_context(current->active_mm->context.id, current->active_mm->pgd);
 
        return 0;
 }
 
+static int pmac_pm_valid(suspend_state_t state)
+{
+       switch (state) {
+       case PM_SUSPEND_DISK:
+               return 1;
+       /* can't do any other states via generic mechanism yet */
+       default:
+               return 0;
+       }
+}
+
 static struct pm_ops pmac_pm_ops = {
        .pm_disk_mode   = PM_DISK_SHUTDOWN,
        .prepare        = pmac_pm_prepare,
        .enter          = pmac_pm_enter,
        .finish         = pmac_pm_finish,
+       .valid          = pmac_pm_valid,
 };
 
 #endif /* CONFIG_SOFTWARE_SUSPEND */
@@ -588,13 +599,6 @@ pmac_halt(void)
  */
 static void __init pmac_init_early(void)
 {
-#ifdef CONFIG_PPC64
-       /* Initialize hash table, from now on, we can take hash faults
-        * and call ioremap
-        */
-       hpte_init_native();
-#endif
-
        /* Enable early btext debug if requested */
        if (strstr(cmd_line, "btextdbg")) {
                udbg_adb_init_early();
@@ -671,6 +675,8 @@ static int __init pmac_probe(void)
         * part of the cacheable linar mapping
         */
        alloc_dart_table();
+
+       hpte_init_native();
 #endif
 
 #ifdef CONFIG_PPC32