]> err.no Git - linux-2.6/blobdiff - arch/powerpc/platforms/pseries/setup.c
Merge branch 'audit.b39' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/audit...
[linux-2.6] / arch / powerpc / platforms / pseries / setup.c
index e2fcd2307e6791a62828c91649940c848c1028f3..f0b7146a110f7238abcd39d633db63dd44711481 100644 (file)
@@ -168,7 +168,7 @@ static void __init pseries_mpic_init_IRQ(void)
 
        /* Look for cascade */
        for_each_node_by_type(np, "interrupt-controller")
-               if (device_is_compatible(np, "chrp,iic")) {
+               if (of_device_is_compatible(np, "chrp,iic")) {
                        cascade = np;
                        break;
                }
@@ -176,7 +176,7 @@ static void __init pseries_mpic_init_IRQ(void)
                return;
 
        cascade_irq = irq_of_parse_and_map(cascade, 0);
-       if (cascade == NO_IRQ) {
+       if (cascade_irq == NO_IRQ) {
                printk(KERN_ERR "mpic: failed to map cascade interrupt");
                return;
        }
@@ -320,8 +320,6 @@ static void __init pSeries_init_early(void)
 {
        DBG(" -> pSeries_init_early()\n");
 
-       fw_feature_init();
-
        if (firmware_has_feature(FW_FEATURE_LPAR))
                find_udbg_vterm();
 
@@ -335,32 +333,6 @@ static void __init pSeries_init_early(void)
        DBG(" <- pSeries_init_early()\n");
 }
 
-
-static int pSeries_check_legacy_ioport(unsigned int baseport)
-{
-       struct device_node *np;
-
-#define I8042_DATA_REG 0x60
-#define FDC_BASE       0x3f0
-
-
-       switch(baseport) {
-       case I8042_DATA_REG:
-               np = of_find_node_by_type(NULL, "8042");
-               if (np == NULL)
-                       return -ENODEV;
-               of_node_put(np);
-               break;
-       case FDC_BASE:
-               np = of_find_node_by_type(NULL, "fdc");
-               if (np == NULL)
-                       return -ENODEV;
-               of_node_put(np);
-               break;
-       }
-       return 0;
-}
-
 /*
  * Called very early, MMU is off, device-tree isn't unflattened
  */
@@ -369,14 +341,21 @@ static int __init pSeries_probe_hypertas(unsigned long node,
                                         const char *uname, int depth,
                                         void *data)
 {
+       const char *hypertas;
+       unsigned long len;
+
        if (depth != 1 ||
            (strcmp(uname, "rtas") != 0 && strcmp(uname, "rtas@0") != 0))
-               return 0;
+               return 0;
 
-       if (of_get_flat_dt_prop(node, "ibm,hypertas-functions", NULL) != NULL)
-               powerpc_firmware_features |= FW_FEATURE_LPAR;
+       hypertas = of_get_flat_dt_prop(node, "ibm,hypertas-functions", &len);
+       if (!hypertas)
+               return 1;
 
-       return 1;
+       powerpc_firmware_features |= FW_FEATURE_LPAR;
+       fw_feature_init(hypertas, len);
+
+       return 1;
 }
 
 static int __init pSeries_probe(void)
@@ -425,6 +404,7 @@ static void pseries_dedicated_idle_sleep(void)
         * a good time to find other work to dispatch.
         */
        get_lppaca()->idle = 1;
+       get_lppaca()->donate_dedicated_cpu = 1;
 
        /*
         * We come in with interrupts disabled, and need_resched()
@@ -457,6 +437,7 @@ static void pseries_dedicated_idle_sleep(void)
 
 out:
        HMT_medium();
+       get_lppaca()->donate_dedicated_cpu = 0;
        get_lppaca()->idle = 0;
 }
 
@@ -537,7 +518,6 @@ define_machine(pseries) {
        .set_rtc_time           = rtas_set_rtc_time,
        .calibrate_decr         = generic_calibrate_decr,
        .progress               = rtas_progress,
-       .check_legacy_ioport    = pSeries_check_legacy_ioport,
        .system_reset_exception = pSeries_system_reset_exception,
        .machine_check_exception = pSeries_machine_check_exception,
 };