Explorar o código

qcacmn: Add QDF api to get smp processor id

Add QDF api to get smp processor id.

Change-Id: If0187ca1bc609f4cb9107bbb343b2bb180910f46
CRs-Fixed: 3066767
Yeshwanth Sriram Guntuka %!s(int64=3) %!d(string=hai) anos
pai
achega
1ede276269
Modificáronse 2 ficheiros con 20 adicións e 0 borrados
  1. 10 0
      qdf/inc/qdf_util.h
  2. 10 0
      qdf/linux/src/i_qdf_util.h

+ 10 - 0
qdf/inc/qdf_util.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -886,4 +887,13 @@ int qdf_fls(uint32_t x)
 	return __qdf_fls(x);
 }
 
+/**
+ * qdf_get_smp_processor_id() - Get the current CPU id
+ *
+ * Return: current CPU id
+ */
+static inline int qdf_get_smp_processor_id(void)
+{
+	return __qdf_get_smp_processor_id();
+}
 #endif /*_QDF_UTIL_H*/

+ 10 - 0
qdf/linux/src/i_qdf_util.h

@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
+ * Copyright (c) 2021 Qualcomm Innovation Center, Inc. All rights reserved.
  *
  * Permission to use, copy, modify, and/or distribute this software for
  * any purpose with or without fee is hereby granted, provided that the
@@ -500,4 +501,13 @@ int __qdf_fls(uint32_t x)
 	return fls(x);
 }
 
+/**
+ * __qdf_get_smp_processor_id() - Get the current CPU id
+ *
+ * Return: current CPU id
+ */
+static inline int __qdf_get_smp_processor_id(void)
+{
+	return smp_processor_id();
+}
 #endif /*_I_QDF_UTIL_H*/