diff --git a/arch/arm/src/arm/arm_tcbinfo.c b/arch/arm/src/arm/arm_tcbinfo.c index 5540d8fc84..8c0f410683 100644 --- a/arch/arm/src/arm/arm_tcbinfo.c +++ b/arch/arm/src/arm/arm_tcbinfo.c @@ -66,7 +66,7 @@ const struct tcbinfo_s g_tcbinfo = .name_off = TCB_NAME_OFF, .regs_off = TCB_REGS_OFF, .basic_num = 17, - .total_num = XCPTCONTEXT_REGS, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/arm/src/armv6-m/arm_tcbinfo.c b/arch/arm/src/armv6-m/arm_tcbinfo.c index cd80cf0d9c..e1fe86c8be 100644 --- a/arch/arm/src/armv6-m/arm_tcbinfo.c +++ b/arch/arm/src/armv6-m/arm_tcbinfo.c @@ -73,7 +73,7 @@ const struct tcbinfo_s g_tcbinfo = .name_off = TCB_NAME_OFF, .regs_off = TCB_REGS_OFF, .basic_num = 17, - .total_num = XCPTCONTEXT_REGS, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/arm/src/armv7-a/arm_tcbinfo.c b/arch/arm/src/armv7-a/arm_tcbinfo.c index 2fefe348fb..16f44950c3 100644 --- a/arch/arm/src/armv7-a/arm_tcbinfo.c +++ b/arch/arm/src/armv7-a/arm_tcbinfo.c @@ -108,7 +108,7 @@ const struct tcbinfo_s g_tcbinfo = .name_off = TCB_NAME_OFF, .regs_off = TCB_REGS_OFF, .basic_num = 17, - .total_num = XCPTCONTEXT_REGS, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/arm/src/armv7-m/arm_tcbinfo.c b/arch/arm/src/armv7-m/arm_tcbinfo.c index 97a967f6e3..a21548097f 100644 --- a/arch/arm/src/armv7-m/arm_tcbinfo.c +++ b/arch/arm/src/armv7-m/arm_tcbinfo.c @@ -114,7 +114,7 @@ const struct tcbinfo_s g_tcbinfo = .name_off = TCB_NAME_OFF, .regs_off = TCB_REGS_OFF, .basic_num = 17, - .total_num = XCPTCONTEXT_REGS, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/arm/src/armv7-r/arm_tcbinfo.c b/arch/arm/src/armv7-r/arm_tcbinfo.c index 72b1f895e6..51c8c4922f 100644 --- a/arch/arm/src/armv7-r/arm_tcbinfo.c +++ b/arch/arm/src/armv7-r/arm_tcbinfo.c @@ -108,7 +108,7 @@ const struct tcbinfo_s g_tcbinfo = .name_off = TCB_NAME_OFF, .regs_off = TCB_REGS_OFF, .basic_num = 17, - .total_num = XCPTCONTEXT_REGS, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/arm/src/armv8-m/arm_tcbinfo.c b/arch/arm/src/armv8-m/arm_tcbinfo.c index 40b4db8b0e..5e8167c8e5 100644 --- a/arch/arm/src/armv8-m/arm_tcbinfo.c +++ b/arch/arm/src/armv8-m/arm_tcbinfo.c @@ -114,7 +114,7 @@ const struct tcbinfo_s g_tcbinfo = .name_off = TCB_NAME_OFF, .regs_off = TCB_REGS_OFF, .basic_num = 17, - .total_num = XCPTCONTEXT_REGS, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/risc-v/src/common/riscv_tcbinfo.c b/arch/risc-v/src/common/riscv_tcbinfo.c index 72183bd27f..934c1963e1 100644 --- a/arch/risc-v/src/common/riscv_tcbinfo.c +++ b/arch/risc-v/src/common/riscv_tcbinfo.c @@ -120,7 +120,7 @@ const struct tcbinfo_s g_tcbinfo = .name_off = TCB_NAME_OFF, .regs_off = TCB_REGS_OFF, .basic_num = 33, - .total_num = XCPTCONTEXT_REGS, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, }, diff --git a/arch/xtensa/src/common/xtensa_tcbinfo.c b/arch/xtensa/src/common/xtensa_tcbinfo.c index 882da9abaa..028be39e24 100644 --- a/arch/xtensa/src/common/xtensa_tcbinfo.c +++ b/arch/xtensa/src/common/xtensa_tcbinfo.c @@ -65,7 +65,7 @@ const struct tcbinfo_s g_tcbinfo = .name_off = TCB_NAME_OFF, .regs_off = TCB_REGS_OFF, .basic_num = COMMON_CTX_REGS, - .total_num = XCPTCONTEXT_REGS, + .total_num = sizeof(g_reg_offs) / sizeof(g_reg_offs[0]), { .p = g_reg_offs, },