diff options
author | Anton Blanchard <anton@samba.org> | 2005-09-21 12:55:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-21 13:11:54 -0400 |
commit | 1bc2a3bb86688ffca691ba2ad30a2d5dcba774cf (patch) | |
tree | 09e8f19669e0494cd3464b0d5babebf259778c30 | |
parent | d6dbf42ee36d4f9ffc2a93877c19937c81974124 (diff) |
[PATCH] ppc64: Fix issue with non zero boot cpu
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@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/ppc64/kernel/prom_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/ppc64/kernel/prom_init.c b/arch/ppc64/kernel/prom_init.c index 9979919cdf92..f252670874a4 100644 --- a/arch/ppc64/kernel/prom_init.c +++ b/arch/ppc64/kernel/prom_init.c | |||
@@ -1711,6 +1711,7 @@ static void __init flatten_device_tree(void) | |||
1711 | unsigned long offset = reloc_offset(); | 1711 | unsigned long offset = reloc_offset(); |
1712 | unsigned long mem_start, mem_end, room; | 1712 | unsigned long mem_start, mem_end, room; |
1713 | struct boot_param_header *hdr; | 1713 | struct boot_param_header *hdr; |
1714 | struct prom_t *_prom = PTRRELOC(&prom); | ||
1714 | char *namep; | 1715 | char *namep; |
1715 | u64 *rsvmap; | 1716 | u64 *rsvmap; |
1716 | 1717 | ||
@@ -1765,6 +1766,7 @@ static void __init flatten_device_tree(void) | |||
1765 | RELOC(dt_struct_end) = PAGE_ALIGN(mem_start); | 1766 | RELOC(dt_struct_end) = PAGE_ALIGN(mem_start); |
1766 | 1767 | ||
1767 | /* Finish header */ | 1768 | /* Finish header */ |
1769 | hdr->boot_cpuid_phys = _prom->cpu; | ||
1768 | hdr->magic = OF_DT_HEADER; | 1770 | hdr->magic = OF_DT_HEADER; |
1769 | hdr->totalsize = RELOC(dt_struct_end) - RELOC(dt_header_start); | 1771 | hdr->totalsize = RELOC(dt_struct_end) - RELOC(dt_header_start); |
1770 | hdr->off_dt_struct = RELOC(dt_struct_start) - RELOC(dt_header_start); | 1772 | hdr->off_dt_struct = RELOC(dt_struct_start) - RELOC(dt_header_start); |
@@ -1854,7 +1856,6 @@ static void __init prom_find_boot_cpu(void) | |||
1854 | 1856 | ||
1855 | cpu_pkg = call_prom("instance-to-package", 1, 1, prom_cpu); | 1857 | cpu_pkg = call_prom("instance-to-package", 1, 1, prom_cpu); |
1856 | 1858 | ||
1857 | prom_setprop(cpu_pkg, "linux,boot-cpu", NULL, 0); | ||
1858 | prom_getprop(cpu_pkg, "reg", &getprop_rval, sizeof(getprop_rval)); | 1859 | prom_getprop(cpu_pkg, "reg", &getprop_rval, sizeof(getprop_rval)); |
1859 | _prom->cpu = getprop_rval; | 1860 | _prom->cpu = getprop_rval; |
1860 | 1861 | ||