]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc64: Fix prom.c to boot on G5 after make_room fix
authorAndrew Morton <akpm@osdl.org>
Mon, 26 Apr 2004 15:58:06 +0000 (08:58 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Mon, 26 Apr 2004 15:58:06 +0000 (08:58 -0700)
From: Rusty Russell <rusty@rustcorp.com.au>

Ben Herrenschmidt made this actually boot.

arch/ppc64/kernel/prom.c

index 1e2d7aa348394986d7e1ae39a4d4ac2e45cff6b0..94c1023bc8564042e0a658921adb3671470948a2 100644 (file)
@@ -789,7 +789,7 @@ static void prom_initialize_dart_table(void)
        /* 16MB (1 << 24) alignment. We allocate a full 16Mb chuck since we
         * will blow up an entire large page anyway in the kernel mapping
         */
-       RELOC(dart_tablebase) =
+       RELOC(dart_tablebase) = (unsigned long)
                abs_to_virt(lmb_alloc_base(1UL<<24, 1UL<<24, 0x80000000L));
 
        prom_print(RELOC("Dart at: "));
@@ -2202,10 +2202,12 @@ interpret_dbdma_props(struct device_node *np, unsigned long mem_start,
        struct device_node *db;
 
        base_address = 0;
-       for (db = np->parent; db != NULL; db = db->parent) {
-               if (!strcmp(db->type, "dbdma") && db->n_addrs != 0) {
-                       base_address = db->addrs[0].address;
-                       break;
+       if (!measure_only) {
+               for (db = np->parent; db != NULL; db = db->parent) {
+                       if (!strcmp(db->type, "dbdma") && db->n_addrs != 0) {
+                               base_address = db->addrs[0].address;
+                               break;
+                       }
                }
        }
 
@@ -2240,10 +2242,12 @@ interpret_macio_props(struct device_node *np, unsigned long mem_start,
        struct device_node *db;
 
        base_address = 0;
-       for (db = np->parent; db != NULL; db = db->parent) {
-               if (!strcmp(db->type, "mac-io") && db->n_addrs != 0) {
-                       base_address = db->addrs[0].address;
-                       break;
+       if (!measure_only) {
+               for (db = np->parent; db != NULL; db = db->parent) {
+                       if (!strcmp(db->type, "mac-io") && db->n_addrs != 0) {
+                               base_address = db->addrs[0].address;
+                               break;
+                       }
                }
        }