summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/cds/inc/cds_sched.h2
-rw-r--r--core/cds/src/cds_sched.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/core/cds/inc/cds_sched.h b/core/cds/inc/cds_sched.h
index 2b33ebb515ab..83cf40316412 100644
--- a/core/cds/inc/cds_sched.h
+++ b/core/cds/inc/cds_sched.h
@@ -203,7 +203,7 @@ typedef struct _cds_sched_context {
struct notifier_block *cpu_hot_plug_notifier;
/* affinity lock */
- spinlock_t affinity_lock;
+ struct mutex affinity_lock;
/* rx thread affinity cpu */
unsigned long rx_thread_cpu;
diff --git a/core/cds/src/cds_sched.c b/core/cds/src/cds_sched.c
index dadfbcdda4d8..d452b7ede1b2 100644
--- a/core/cds/src/cds_sched.c
+++ b/core/cds/src/cds_sched.c
@@ -270,15 +270,15 @@ int cds_sched_handle_cpu_hot_plug(void)
if (cds_is_load_or_unload_in_progress())
return 0;
- spin_lock_bh(&pSchedContext->affinity_lock);
+ mutex_lock(&pSchedContext->affinity_lock);
if (cds_sched_find_attach_cpu(pSchedContext,
pSchedContext->high_throughput_required)) {
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
"%s: handle hot plug fail", __func__);
- spin_unlock_bh(&pSchedContext->affinity_lock);
+ mutex_unlock(&pSchedContext->affinity_lock);
return 1;
}
- spin_unlock_bh(&pSchedContext->affinity_lock);
+ mutex_unlock(&pSchedContext->affinity_lock);
return 0;
}
@@ -308,15 +308,15 @@ int cds_sched_handle_throughput_req(bool high_tput_required)
return 0;
}
- spin_lock_bh(&pSchedContext->affinity_lock);
+ mutex_lock(&pSchedContext->affinity_lock);
pSchedContext->high_throughput_required = high_tput_required;
if (cds_sched_find_attach_cpu(pSchedContext, high_tput_required)) {
QDF_TRACE(QDF_MODULE_ID_QDF, QDF_TRACE_LEVEL_ERROR,
"%s: handle throughput req fail", __func__);
- spin_unlock_bh(&pSchedContext->affinity_lock);
+ mutex_unlock(&pSchedContext->affinity_lock);
return 1;
}
- spin_unlock_bh(&pSchedContext->affinity_lock);
+ mutex_unlock(&pSchedContext->affinity_lock);
return 0;
}
@@ -510,7 +510,7 @@ QDF_STATUS cds_sched_open(void *p_cds_context,
}
register_hotcpu_notifier(&cds_cpu_hotplug_notifier);
pSchedContext->cpu_hot_plug_notifier = &cds_cpu_hotplug_notifier;
- spin_lock_init(&pSchedContext->affinity_lock);
+ mutex_init(&pSchedContext->affinity_lock);
pSchedContext->high_throughput_required = false;
#endif
gp_cds_sched_context = pSchedContext;