From 8b66a490ca00957a54c47f7a060cd6772ee15c20 Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Mon, 26 Apr 2004 08:58:06 -0700 Subject: [PATCH] [PATCH] ppc64: Fix prom.c to boot on G5 after make_room fix From: Rusty Russell Ben Herrenschmidt made this actually boot. --- arch/ppc64/kernel/prom.c | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/arch/ppc64/kernel/prom.c b/arch/ppc64/kernel/prom.c index 1e2d7aa34839..94c1023bc856 100644 --- a/arch/ppc64/kernel/prom.c +++ b/arch/ppc64/kernel/prom.c @@ -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; + } } } -- 2.39.5