Explorar el Código

qcacmn: Avoid using smp_processor_id() when preemptible

Call trace is observed in the function dp_rx_per_core_stats_update()
with the following message.

"using smp_processor_id() in preemptible"

Use qdf_get_cpu() as it takes care for disabling preemption.

CRs-Fixed: 3203385
Change-Id: I9761bf707b5ee92c7e0bb698c2825c9369efd7d5
Subrat Dash hace 3 años
padre
commit
ed329bd354
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  1. 3 2
      dp/wifi3.0/dp_rx.h

+ 3 - 2
dp/wifi3.0/dp_rx.h

@@ -2415,8 +2415,9 @@ static inline
 void dp_rx_per_core_stats_update(struct dp_soc *soc, uint8_t ring_id,
 				 uint32_t bufs_reaped)
 {
-	DP_STATS_INC(soc,
-		     rx.ring_packets[smp_processor_id()][ring_id], bufs_reaped);
+	int cpu_id = qdf_get_cpu();
+
+	DP_STATS_INC(soc, rx.ring_packets[cpu_id][ring_id], bufs_reaped);
 }
 
 static inline