diff options
-rw-r--r-- | arch/blackfin/kernel/cplb-nompu/cplbinit.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/blackfin/kernel/cplb-nompu/cplbinit.c b/arch/blackfin/kernel/cplb-nompu/cplbinit.c index afef5c740aa4..e14c37e98ed5 100644 --- a/arch/blackfin/kernel/cplb-nompu/cplbinit.c +++ b/arch/blackfin/kernel/cplb-nompu/cplbinit.c | |||
@@ -420,8 +420,17 @@ void __init generate_cplb_tables_cpu(unsigned int cpu) | |||
420 | } | 420 | } |
421 | } | 421 | } |
422 | 422 | ||
423 | /* close tables */ | 423 | /* make sure we locked the kernel start */ |
424 | BUG_ON(cplb.init_i.pos < 2 + cplb_data[ZERO_P].valid); | ||
425 | BUG_ON(cplb.init_d.pos < 1 + cplb_data[ZERO_P].valid + cplb_data[L1D_MEM].valid); | ||
426 | |||
427 | /* make sure we didnt overflow the table */ | ||
428 | BUG_ON(cplb.init_i.size <= cplb.init_i.pos); | ||
429 | BUG_ON(cplb.init_d.size <= cplb.init_d.pos); | ||
430 | BUG_ON(cplb.switch_i.size <= cplb.switch_i.pos); | ||
431 | BUG_ON(cplb.switch_d.size <= cplb.switch_d.pos); | ||
424 | 432 | ||
433 | /* close tables */ | ||
425 | close_cplbtab(&cplb.init_i); | 434 | close_cplbtab(&cplb.init_i); |
426 | close_cplbtab(&cplb.init_d); | 435 | close_cplbtab(&cplb.init_d); |
427 | 436 | ||