eenurkka commented on code in PR #6304:
URL: https://github.com/apache/incubator-nuttx/pull/6304#discussion_r877895842


##########
arch/risc-v/src/mpfs/mpfs_ihc.c:
##########
@@ -367,6 +440,51 @@ static void mpfs_ihc_rx_handler(uint32_t *message, bool 
is_ack)
     }
 }
 
+/****************************************************************************
+ * Name: mpfs_ihc_message_present_handler
+ *
+ * Description:
+ *   This function fills up a structure that gets into the remote end, such
+ *   as Linux kernel.  The structure may contain data from the
+ *   MPFS_IHC_MSG_IN -register, or in case of an ack, just the irq_type.
+ *
+ * Input Parameters:
+ *   message  - Pointer for storing data, must not be NULL
+ *   mhartid  - The primary hart id of a set of hartids.  Not necessarily
+ *              the absolute mhartid if multiple harts are incorporated
+ *              within the remote (eg. Linux kernel used on 2 harts).
+ *   rhartid  - Remote hart id
+ *   is_ack   - Boolean indicating an ack message
+ *
+ * Returned Value:
+ *   None
+ *
+ ****************************************************************************/
+
+static void mpfs_ihc_message_present_handler(uint32_t *message,
+                                             uint32_t mhartid,
+                                             uint32_t rhartid,
+                                             bool is_ack)
+{
+  struct ihc_sbi_rx_msg msg;
+  uintptr_t message_ihc     = (uintptr_t)MPFS_IHC_MSG_IN(mhartid, rhartid);
+  uint32_t message_size_ihc = getreg32(MPFS_IHC_MSG_SIZE(mhartid, rhartid));
+
+  if (is_ack == true)

Review Comment:
   Right



-- 
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: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to