diff options
| author | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-07 07:02:46 +0300 |
|---|---|---|
| committer | Kimplul <kimi.h.kuparinen@gmail.com> | 2024-07-07 07:02:46 +0300 |
| commit | b97967ab660243b723f246db03c2e4a82e125f3f (patch) | |
| tree | d30ef3f9dbbc33453c868282b749018659fb6a6b /arch | |
| parent | 122374c362ba8bb9082385da3c82e264ab594f15 (diff) | |
| download | kmi-b97967ab660243b723f246db03c2e4a82e125f3f.tar.gz kmi-b97967ab660243b723f246db03c2e4a82e125f3f.zip | |
simplify assertions
+ No real point having multiple different levels of assertions, just say
you assert something and be done with it
Diffstat (limited to 'arch')
| -rwxr-xr-x | arch/riscv64/conf/init | bin | 4008 -> 3960 bytes | |||
| -rw-r--r-- | arch/riscv64/conf/initrd | bin | 4608 -> 4608 bytes | |||
| -rw-r--r-- | arch/riscv64/kernel/smp.c | 2 | ||||
| -rw-r--r-- | arch/riscv64/kernel/vmem.c | 5 |
4 files changed, 4 insertions, 3 deletions
diff --git a/arch/riscv64/conf/init b/arch/riscv64/conf/init Binary files differindex 567ff43..5b06586 100755 --- a/arch/riscv64/conf/init +++ b/arch/riscv64/conf/init diff --git a/arch/riscv64/conf/initrd b/arch/riscv64/conf/initrd Binary files differindex e331c21..a792456 100644 --- a/arch/riscv64/conf/initrd +++ b/arch/riscv64/conf/initrd diff --git a/arch/riscv64/kernel/smp.c b/arch/riscv64/kernel/smp.c index a878b90..e48a216 100644 --- a/arch/riscv64/kernel/smp.c +++ b/arch/riscv64/kernel/smp.c @@ -86,7 +86,7 @@ void smp_bringup(struct vmem *b, void *fdt) if (r.value == SBI_HART_STARTED) { /* there should ever only be one started hart */ - catastrophic_assert(cpuid_to_hartid(0) == -1); + assert(cpuid_to_hartid(0) == -1); cpuid_to_hartid(0) = hartid; continue; } diff --git a/arch/riscv64/kernel/vmem.c b/arch/riscv64/kernel/vmem.c index 68869a3..b97082f 100644 --- a/arch/riscv64/kernel/vmem.c +++ b/arch/riscv64/kernel/vmem.c @@ -436,6 +436,7 @@ struct vmem *init_mapping() struct vmem *init_vmem(void *fdt) { UNUSED(fdt); + struct vmem *b = create_vmem(); __populate_dmap(b); /* update which memory branch to use */ @@ -597,7 +598,7 @@ void mark_rpc_invalid(struct tcb *t, vm_t top) struct vmem *b = t->arch.rpc_leaf; int top_idx = t->arch.rpc_idx; int bottom_idx = (top - RPC_STACK_BASE) / BASE_PAGE_SIZE; - catastrophic_assert(bottom_idx < top_idx); + assert(bottom_idx < top_idx); while (top_idx != bottom_idx) { pm_t *pte = (pm_t *)&b->leaf[top_idx]; @@ -614,7 +615,7 @@ void mark_rpc_valid(struct tcb *t, vm_t bottom) struct vmem *b = t->arch.rpc_leaf; int bottom_idx = t->arch.rpc_idx; int top_idx = (bottom - RPC_STACK_BASE) / BASE_PAGE_SIZE; - catastrophic_assert(bottom_idx < top_idx); + assert(bottom_idx < top_idx); while (top_idx != bottom_idx) { pm_t *pte = (pm_t *)&b->leaf[bottom_idx]; |
