Ouss4 commented on a change in pull request #5261:
URL: https://github.com/apache/incubator-nuttx/pull/5261#discussion_r790578437
##########
File path: arch/xtensa/include/syscall.h
##########
@@ -41,6 +64,194 @@
* Inline functions
****************************************************************************/
+#ifndef __ASSEMBLY__
+
+/* SVC call with SYS_ call number and no parameters */
+
+static inline uintptr_t sys_call0(unsigned int nbr)
+{
+ register long reg0 __asm__("a2") = (long)(nbr);
+
+ __asm__ __volatile__
+ (
+ "isync\n"
+ "dsync\n"
+ "esync\n"
+ "memw\n"
+ "movi a3, %1\n"
+ "wsr a3, intset\n"
Review comment:
@zhuyanlinzyl the namings are a bit confusing here. The title says "Use
SVC call in context swtich", SVC is an ARM thing, which I thought was meant to
say `syscall`. In your last PR you fixed the entry into the exception caused
by `syscall` so I thought this is the continuation of that work.
Anyway, back to the software interrupt. So you have a software interrupt
hardwired to interrupt level2 and it's attached to the `xtensa_svcall` ISR. I
would suggest we fix the naming later, and call it `swint` as we do in RISC-V
and others.
@xiaoxiang781216 @zhuyanlinzyl what level is your timer interrupt? It has to
be smaller than or same level as your software interrupt level for this to
work? Otherwise the software interrupt will still be masked.
--
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]