|
@@ -6343,8 +6343,9 @@ static int get_unique_hlos_process_id(uint32_t cid)
|
|
|
{
|
|
|
int tgid_frpc = -1, tgid_index = 1;
|
|
|
struct fastrpc_apps *me = &gfa;
|
|
|
+ unsigned long irq_flags = 0;
|
|
|
|
|
|
- spin_lock(&me->hlock);
|
|
|
+ spin_lock_irqsave(&me->hlock, irq_flags);
|
|
|
for (tgid_index = 1; tgid_index < MAX_FRPC_TGID; tgid_index++) {
|
|
|
if (!frpc_tgid_usage_array[cid][tgid_index]) {
|
|
|
tgid_frpc = tgid_index;
|
|
@@ -6353,7 +6354,7 @@ static int get_unique_hlos_process_id(uint32_t cid)
|
|
|
break;
|
|
|
}
|
|
|
}
|
|
|
- spin_unlock(&me->hlock);
|
|
|
+ spin_unlock_irqrestore(&me->hlock, irq_flags);
|
|
|
return tgid_frpc;
|
|
|
}
|
|
|
|
|
@@ -7657,6 +7658,7 @@ static int fastrpc_restart_notifier_cb(struct notifier_block *nb,
|
|
|
struct hlist_node *n;
|
|
|
int cid = -1;
|
|
|
struct timespec64 startT = {0};
|
|
|
+ unsigned long irq_flags = 0;
|
|
|
|
|
|
ctx = container_of(nb, struct fastrpc_channel_ctx, nb);
|
|
|
cid = ctx - &me->channel[0];
|
|
@@ -7676,13 +7678,13 @@ static int fastrpc_restart_notifier_cb(struct notifier_block *nb,
|
|
|
case QCOM_SSR_AFTER_SHUTDOWN:
|
|
|
fastrpc_rproc_trace_events(gcinfo[cid].subsys,
|
|
|
"QCOM_SSR_AFTER_SHUTDOWN", "fastrpc_restart_notifier-enter");
|
|
|
- spin_lock(&me->hlock);
|
|
|
+ spin_lock_irqsave(&me->hlock, irq_flags);
|
|
|
hlist_for_each_entry_safe(fl, n, &me->drivers, hn) {
|
|
|
if (fl->cid != cid)
|
|
|
continue;
|
|
|
complete(&fl->shutdown);
|
|
|
}
|
|
|
- spin_unlock(&me->hlock);
|
|
|
+ spin_unlock_irqrestore(&me->hlock, irq_flags);
|
|
|
ctx->subsystemstate = SUBSYSTEM_DOWN;
|
|
|
pr_info("adsprpc: %s: received RAMDUMP notification for %s\n",
|
|
|
__func__, gcinfo[cid].subsys);
|