aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorStewart Smith <stewart@linux.ibm.com>2018-07-19 19:41:44 +1000
committerStewart Smith <stewart@linux.ibm.com>2018-07-20 10:44:59 +1000
commit25f7266f736c0e2a0e91e2aa020a9627638c35f4 (patch)
treec3a76f997406df1db6a9f6be9080a54358617337 /core
parentc1d43fc84a30828ac93a20275984dcd6c7608b7a (diff)
downloadskiboot-25f7266f736c0e2a0e91e2aa020a9627638c35f4.zip
skiboot-25f7266f736c0e2a0e91e2aa020a9627638c35f4.tar.gz
skiboot-25f7266f736c0e2a0e91e2aa020a9627638c35f4.tar.bz2
core/cpu.c: assert pir is sane before using
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/cpu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/core/cpu.c b/core/cpu.c
index 8c55178..b5bfb27 100644
--- a/core/cpu.c
+++ b/core/cpu.c
@@ -1151,6 +1151,7 @@ void init_all_cpus(void)
" State=%d\n", pir, server_no, state);
/* Setup thread 0 */
+ assert(pir <= cpu_max_pir);
t = pt = &cpu_stacks[pir].cpu;
if (t != boot_cpu) {
init_cpu_thread(t, state, pir);