[PATCH] ppc64: Fix issue with non zero boot cpu

Anton Blanchard anton at samba.org
Mon Sep 19 18:51:05 EST 2005


Hi,

The new version of the flattened device tree passes the boot cpuid in the
header instead of via a linux,boot-cpu property.

We need to update the in kernel OF parsing code to do this, otherwise
machines with a non zero boot cpuid fail to come up.

Signed-off-by: Anton Blanchard <anton at samba.org>
---

Index: build/arch/ppc64/kernel/prom_init.c
===================================================================
--- build.orig/arch/ppc64/kernel/prom_init.c	2005-09-15 17:33:46.000000000 +1000
+++ build/arch/ppc64/kernel/prom_init.c	2005-09-19 17:36:16.000000000 +1000
@@ -1711,6 +1711,7 @@
 	unsigned long offset = reloc_offset();
 	unsigned long mem_start, mem_end, room;
 	struct boot_param_header *hdr;
+	struct prom_t *_prom = PTRRELOC(&prom);
 	char *namep;
 	u64 *rsvmap;
 
@@ -1765,6 +1766,7 @@
 	RELOC(dt_struct_end) = PAGE_ALIGN(mem_start);
 
 	/* Finish header */
+	hdr->boot_cpuid_phys = _prom->cpu;
 	hdr->magic = OF_DT_HEADER;
 	hdr->totalsize = RELOC(dt_struct_end) - RELOC(dt_header_start);
 	hdr->off_dt_struct = RELOC(dt_struct_start) - RELOC(dt_header_start);
@@ -1854,7 +1856,6 @@
 
 	cpu_pkg = call_prom("instance-to-package", 1, 1, prom_cpu);
 
-	prom_setprop(cpu_pkg, "linux,boot-cpu", NULL, 0);
 	prom_getprop(cpu_pkg, "reg", &getprop_rval, sizeof(getprop_rval));
 	_prom->cpu = getprop_rval;
 



More information about the Linuxppc64-dev mailing list