Commit 8b66a490 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc64: Fix prom.c to boot on G5 after make_room fix

From: Rusty Russell <rusty@rustcorp.com.au>

Ben Herrenschmidt made this actually boot.
parent efa8a179
...@@ -789,7 +789,7 @@ static void prom_initialize_dart_table(void) ...@@ -789,7 +789,7 @@ static void prom_initialize_dart_table(void)
/* 16MB (1 << 24) alignment. We allocate a full 16Mb chuck since we /* 16MB (1 << 24) alignment. We allocate a full 16Mb chuck since we
* will blow up an entire large page anyway in the kernel mapping * 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)); abs_to_virt(lmb_alloc_base(1UL<<24, 1UL<<24, 0x80000000L));
prom_print(RELOC("Dart at: ")); prom_print(RELOC("Dart at: "));
...@@ -2202,12 +2202,14 @@ interpret_dbdma_props(struct device_node *np, unsigned long mem_start, ...@@ -2202,12 +2202,14 @@ interpret_dbdma_props(struct device_node *np, unsigned long mem_start,
struct device_node *db; struct device_node *db;
base_address = 0; base_address = 0;
if (!measure_only) {
for (db = np->parent; db != NULL; db = db->parent) { for (db = np->parent; db != NULL; db = db->parent) {
if (!strcmp(db->type, "dbdma") && db->n_addrs != 0) { if (!strcmp(db->type, "dbdma") && db->n_addrs != 0) {
base_address = db->addrs[0].address; base_address = db->addrs[0].address;
break; break;
} }
} }
}
rp = (struct reg_property32 *) get_property(np, "reg", &l); rp = (struct reg_property32 *) get_property(np, "reg", &l);
if (rp != 0 && l >= sizeof(struct reg_property32)) { if (rp != 0 && l >= sizeof(struct reg_property32)) {
...@@ -2240,12 +2242,14 @@ interpret_macio_props(struct device_node *np, unsigned long mem_start, ...@@ -2240,12 +2242,14 @@ interpret_macio_props(struct device_node *np, unsigned long mem_start,
struct device_node *db; struct device_node *db;
base_address = 0; base_address = 0;
if (!measure_only) {
for (db = np->parent; db != NULL; db = db->parent) { for (db = np->parent; db != NULL; db = db->parent) {
if (!strcmp(db->type, "mac-io") && db->n_addrs != 0) { if (!strcmp(db->type, "mac-io") && db->n_addrs != 0) {
base_address = db->addrs[0].address; base_address = db->addrs[0].address;
break; break;
} }
} }
}
rp = (struct reg_property32 *) get_property(np, "reg", &l); rp = (struct reg_property32 *) get_property(np, "reg", &l);
if (rp != 0 && l >= sizeof(struct reg_property32)) { if (rp != 0 && l >= sizeof(struct reg_property32)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment