casaroli commented on code in PR #21361: URL: https://github.com/apache/nuttx/pull/21361#discussion_r4448849389
########## arch/arm64/src/common/arm64_hwdebug.c: ########## @@ -342,6 +342,10 @@ int arm64_enable_dbgmonitor(void) mdscr |= ARM64_MDSCR_EL1_MDE | ARM64_MDSCR_EL1_KDE; write_sysreg(mdscr, mdscr_el1); + write_sysreg(0, osdlr_el1); Review Comment: This file builds only with `CONFIG_ARCH_HAVE_DEBUG`, and only `ARCH_CPU_UNKNOWN` selects it (arch/arm64/Kconfig:391). `ARCH_CORTEX_R82` does not, so this code never runs on armv8-R. Fix: select `ARCH_HAVE_DEBUG` in `ARCH_CORTEX_R82`, or say in the commit message that the change is for armv8-A. ########## arch/arm64/src/common/arm64_fork.c: ########## @@ -255,6 +255,11 @@ static pid_t arm64_fork_direct(bool vfork, struct tcb_s *parent, child->xcp.regs[REG_SPSR] |= (DAIF_IRQ_BIT | DAIF_FIQ_BIT); #endif /* CONFIG_SUPPRESS_INTERRUPTS */ + child->xcp.regs[REG_SCTLR_EL1] = read_sysreg(sctlr_el1); Review Comment: This repeats the `CONFIG_ARM64_MTE` block at line 264-266. Without `CONFIG_ARM64_MTE`, the exception return does not load `REG_SCTLR_EL1` (arm64_vector_table.S:272), so the new value has no effect. Fix: remove the old block at line 264-266, or drop this commit. ########## arch/arm64/src/common/arm64_arch_timer.c: ########## @@ -58,11 +58,6 @@ * Inline Functions ****************************************************************************/ -static inline void arm64_arch_timer_set_compare(uint64_t value) Review Comment: `arm64_arch_timer_set_compare()` is not unused: lines 112, 136, 147 and 167 still call it. CI Linux (arm64-01) fails in 67 configs with "implicit declaration of function 'arm64_arch_timer_set_compare'", fvp-armv8r:nsh too. Fix: drop the commit "Delete unused functions". -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
