Skip to content

Commit

Permalink
sparc32: fix sparcstation 5 boot
Browse files Browse the repository at this point in the history
The sparcstation 5 I have available has no MID property for the CPU.
This resulted in a panic when booting a SMP kernel on this box.

The assigned field in cpu_data is never used, so if we fail
to read the MID property then inform user and continue booting.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Sam Ravnborg authored and David S. Miller committed Apr 21, 2011
1 parent 505d914 commit f486b3d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions arch/sparc/kernel/smp_32.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,17 +53,21 @@ cpumask_t smp_commenced_mask = CPU_MASK_NONE;
void __cpuinit smp_store_cpu_info(int id)
{
int cpu_node;
int mid;

cpu_data(id).udelay_val = loops_per_jiffy;

cpu_find_by_mid(id, &cpu_node);
cpu_data(id).clock_tick = prom_getintdefault(cpu_node,
"clock-frequency", 0);
cpu_data(id).prom_node = cpu_node;
cpu_data(id).mid = cpu_get_hwmid(cpu_node);
mid = cpu_get_hwmid(cpu_node);

if (cpu_data(id).mid < 0)
panic("No MID found for CPU%d at node 0x%08d", id, cpu_node);
if (mid < 0) {
printk(KERN_NOTICE "No MID found for CPU%d at node 0x%08d", id, cpu_node);
mid = 0;
}
cpu_data(id).mid = mid;
}

void __init smp_cpus_done(unsigned int max_cpus)
Expand Down

0 comments on commit f486b3d

Please sign in to comment.