Commit 0e12b532 authored by Todd Inglett's avatar Todd Inglett Committed by Peter Bergner

fix cpuid to physical id needed in 2.5

parent ce6d70eb
...@@ -877,11 +877,10 @@ static void ...@@ -877,11 +877,10 @@ static void
prom_hold_cpus(unsigned long mem) prom_hold_cpus(unsigned long mem)
{ {
unsigned long i; unsigned long i;
unsigned int reg; unsigned int cpuid;
phandle node; phandle node;
unsigned long offset = reloc_offset(); unsigned long offset = reloc_offset();
char type[64], *path; char type[64], *path;
int cpuid = 0;
extern void __secondary_hold(void); extern void __secondary_hold(void);
extern unsigned long __secondary_hold_spinloop; extern unsigned long __secondary_hold_spinloop;
extern unsigned long __secondary_hold_acknowledge; extern unsigned long __secondary_hold_acknowledge;
...@@ -940,12 +939,12 @@ prom_hold_cpus(unsigned long mem) ...@@ -940,12 +939,12 @@ prom_hold_cpus(unsigned long mem)
if (strcmp(type, RELOC("okay")) != 0) if (strcmp(type, RELOC("okay")) != 0)
continue; continue;
reg = -1; cpuid = -1;
call_prom(RELOC("getprop"), 4, 1, node, RELOC("reg"), call_prom(RELOC("getprop"), 4, 1, node, RELOC("reg"),
&reg, sizeof(reg)); &cpuid, sizeof(cpuid));
/* Only need to start secondary procs, not ourself. */ /* Only need to start secondary procs, not ourself. */
if ( reg == _prom->cpu ) if ( cpuid == _prom->cpu )
continue; continue;
path = (char *) mem; path = (char *) mem;
...@@ -954,15 +953,10 @@ prom_hold_cpus(unsigned long mem) ...@@ -954,15 +953,10 @@ prom_hold_cpus(unsigned long mem)
node, path, 255) < 0) node, path, 255) < 0)
continue; continue;
cpuid++;
#ifdef DEBUG_PROM #ifdef DEBUG_PROM
prom_print_nl();
prom_print(RELOC("cpuid = 0x"));
prom_print_hex(cpuid);
prom_print_nl(); prom_print_nl();
prom_print(RELOC("cpu hw idx = 0x")); prom_print(RELOC("cpu hw idx = 0x"));
prom_print_hex(reg); prom_print_hex(cpuid);
prom_print_nl(); prom_print_nl();
#endif #endif
prom_print(RELOC("starting cpu ")); prom_print(RELOC("starting cpu "));
...@@ -990,9 +984,6 @@ prom_hold_cpus(unsigned long mem) ...@@ -990,9 +984,6 @@ prom_hold_cpus(unsigned long mem)
prom_print(RELOC(" 3) secondary_hold = 0x")); prom_print(RELOC(" 3) secondary_hold = 0x"));
prom_print_hex(secondary_hold); prom_print_hex(secondary_hold);
prom_print_nl(); prom_print_nl();
prom_print(RELOC(" 3) cpuid = 0x"));
prom_print_hex(cpuid);
prom_print_nl();
#endif #endif
call_prom(RELOC("start-cpu"), 3, 0, node, secondary_hold, cpuid); call_prom(RELOC("start-cpu"), 3, 0, node, secondary_hold, cpuid);
prom_print(RELOC("...")); prom_print(RELOC("..."));
......
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