projects
/
platform
/
kernel
/
u-boot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f77329c
)
powerpc/mpc85xx: check number of cores
author
York Sun
<yorksun@freescale.com>
Mon, 8 Oct 2012 07:44:10 +0000
(07:44 +0000)
committer
Andy Fleming
<afleming@freescale.com>
Mon, 22 Oct 2012 19:31:15 +0000
(14:31 -0500)
Panic if the number of cores is more than CONFIG_MAX_CPUS because it will
surely overflow gd structure.
Signed-off-by: York Sun <yorksun@freescale.com>
Signed-off-by: Andy Fleming <afleming@freescale.com>
arch/powerpc/cpu/mpc85xx/cpu.c
patch
|
blob
|
history
diff --git
a/arch/powerpc/cpu/mpc85xx/cpu.c
b/arch/powerpc/cpu/mpc85xx/cpu.c
index
26fc84c
..
40cce1d
100644
(file)
--- a/
arch/powerpc/cpu/mpc85xx/cpu.c
+++ b/
arch/powerpc/cpu/mpc85xx/cpu.c
@@
-127,6
+127,11
@@
int checkcpu (void)
printf(", Version: %d.%d, (0x%08x)\n", major, minor, pvr);
+ if (nr_cores > CONFIG_MAX_CPUS) {
+ panic("\nUnexpected number of cores: %d, max is %d\n",
+ nr_cores, CONFIG_MAX_CPUS);
+ }
+
get_sys_info(&sysinfo);
puts("Clock Configuration:");