This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 1e55ca43efd74e52c7ff36aae7624959cbb0106f
Author: zhangyuan21 <[email protected]>
AuthorDate: Wed Aug 2 19:09:11 2023 +0800

    arm64: set cpuid according to mpidr
    
    Signed-off-by: zhangyuan21 <[email protected]>
---
 arch/arm64/src/goldfish/goldfish_boot.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/arm64/src/goldfish/goldfish_boot.c 
b/arch/arm64/src/goldfish/goldfish_boot.c
index d29af1a43c..308b432ee6 100644
--- a/arch/arm64/src/goldfish/goldfish_boot.c
+++ b/arch/arm64/src/goldfish/goldfish_boot.c
@@ -125,6 +125,19 @@ uint64_t arm64_get_mpid(int cpu)
   return CORE_TO_MPID(cpu, 0);
 }
 
+/****************************************************************************
+ * Name: arm64_get_cpuid
+ *
+ * Description:
+ *   The function from mpid to get cpu id
+ *
+ ****************************************************************************/
+
+int arm64_get_cpuid(uint64_t mpid)
+{
+  return MPID_TO_CORE(mpid, 0);
+}
+
 #endif /* CONFIG_SMP */
 
 /****************************************************************************

Reply via email to