zhuyanlinzyl commented on a change in pull request #5261:
URL: https://github.com/apache/incubator-nuttx/pull/5261#discussion_r790380438



##########
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:
       Yes, we use software interrupt  instead of syscall.
   
   As I mentioned in title.
   
   `syscall` instruction has the same level (interruptlevel1) with other common 
interrupts (interruptlevel1).
   
   We must use a higher interrupt level that can generate interrupt when 
`enter_critical_section()`
   
   The sw interrupt in our hardware design, is hardwired to interrupt level2. 
   
   So We  can use it.
   




-- 
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]


Reply via email to