Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

arch_in_int_handler not working on multicore ARCH #368

Open
uandkiran opened this issue Feb 4, 2023 · 1 comment
Open

arch_in_int_handler not working on multicore ARCH #368

uandkiran opened this issue Feb 4, 2023 · 1 comment

Comments

@uandkiran
Copy link

uandkiran commented Feb 4, 2023

on multicore processor, arch_in_int_handler call on CoreX returns 1, when interrupt hanlder is actually active on CoreY.
Sol:
__arm_in_handler needs to be percore variable rather than single variable shared across core(s)

static inline bool arch_in_int_handler(void) {
#if ARM_ISA_ARMV7M
uint32_t ipsr;
__asm volatile ("MRS %0, ipsr" : "=r" (ipsr) );
return (ipsr & IPSR_ISR_Msk);
#else
/* set by the interrupt glue to track that the cpu is inside a handler */
extern bool __arm_in_handler;

return __arm_in_handler;

#endif
}

@travisg
Copy link
Member

travisg commented Feb 4, 2023

This is very true. Need to add a per cpu structure and put the bool there, if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants