|
@@ -1,5 +1,6 @@
|
|
/*
|
|
/*
|
|
* Copyright (c) 2013-2021 The Linux Foundation. All rights reserved.
|
|
* Copyright (c) 2013-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
|
|
* Permission to use, copy, modify, and/or distribute this software for
|
|
* any purpose with or without fee is hereby granted, provided that the
|
|
* any purpose with or without fee is hereby granted, provided that the
|
|
@@ -3019,13 +3020,14 @@ const char *hif_pci_get_irq_name(int irq_no)
|
|
return "pci-dummy";
|
|
return "pci-dummy";
|
|
}
|
|
}
|
|
|
|
|
|
-#ifdef HIF_CPU_PERF_AFFINE_MASK
|
|
|
|
-void hif_pci_irq_set_affinity_hint(
|
|
|
|
- struct hif_exec_context *hif_ext_group)
|
|
|
|
|
|
+void hif_pci_irq_set_affinity_hint(struct hif_exec_context *hif_ext_group,
|
|
|
|
+ bool perf)
|
|
{
|
|
{
|
|
int i, ret;
|
|
int i, ret;
|
|
unsigned int cpus;
|
|
unsigned int cpus;
|
|
bool mask_set = false;
|
|
bool mask_set = false;
|
|
|
|
+ int cpu_cluster = perf ? CPU_CLUSTER_TYPE_PERF :
|
|
|
|
+ CPU_CLUSTER_TYPE_LITTLE;
|
|
|
|
|
|
for (i = 0; i < hif_ext_group->numirq; i++)
|
|
for (i = 0; i < hif_ext_group->numirq; i++)
|
|
qdf_cpumask_clear(&hif_ext_group->new_cpu_mask[i]);
|
|
qdf_cpumask_clear(&hif_ext_group->new_cpu_mask[i]);
|
|
@@ -3033,7 +3035,7 @@ void hif_pci_irq_set_affinity_hint(
|
|
for (i = 0; i < hif_ext_group->numirq; i++) {
|
|
for (i = 0; i < hif_ext_group->numirq; i++) {
|
|
qdf_for_each_online_cpu(cpus) {
|
|
qdf_for_each_online_cpu(cpus) {
|
|
if (qdf_topology_physical_package_id(cpus) ==
|
|
if (qdf_topology_physical_package_id(cpus) ==
|
|
- CPU_CLUSTER_TYPE_PERF) {
|
|
|
|
|
|
+ cpu_cluster) {
|
|
qdf_cpumask_set_cpu(cpus,
|
|
qdf_cpumask_set_cpu(cpus,
|
|
&hif_ext_group->
|
|
&hif_ext_group->
|
|
new_cpu_mask[i]);
|
|
new_cpu_mask[i]);
|
|
@@ -3052,12 +3054,7 @@ void hif_pci_irq_set_affinity_hint(
|
|
qdf_dev_modify_irq_status(hif_ext_group->os_irq[i],
|
|
qdf_dev_modify_irq_status(hif_ext_group->os_irq[i],
|
|
0, IRQ_NO_BALANCING);
|
|
0, IRQ_NO_BALANCING);
|
|
if (ret)
|
|
if (ret)
|
|
- qdf_err("Set affinity %*pbl fails for IRQ %d ",
|
|
|
|
- qdf_cpumask_pr_args(&hif_ext_group->
|
|
|
|
- new_cpu_mask[i]),
|
|
|
|
- hif_ext_group->os_irq[i]);
|
|
|
|
- else
|
|
|
|
- qdf_debug("Set affinity %*pbl for IRQ: %d",
|
|
|
|
|
|
+ qdf_debug("Set affinity %*pbl fails for IRQ %d ",
|
|
qdf_cpumask_pr_args(&hif_ext_group->
|
|
qdf_cpumask_pr_args(&hif_ext_group->
|
|
new_cpu_mask[i]),
|
|
new_cpu_mask[i]),
|
|
hif_ext_group->os_irq[i]);
|
|
hif_ext_group->os_irq[i]);
|
|
@@ -3068,6 +3065,7 @@ void hif_pci_irq_set_affinity_hint(
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+#ifdef HIF_CPU_PERF_AFFINE_MASK
|
|
void hif_pci_ce_irq_set_affinity_hint(
|
|
void hif_pci_ce_irq_set_affinity_hint(
|
|
struct hif_softc *scn)
|
|
struct hif_softc *scn)
|
|
{
|
|
{
|
|
@@ -3171,7 +3169,7 @@ void hif_pci_config_irq_affinity(struct hif_softc *scn)
|
|
/* Set IRQ affinity for WLAN DP interrupts*/
|
|
/* Set IRQ affinity for WLAN DP interrupts*/
|
|
for (i = 0; i < hif_state->hif_num_extgroup; i++) {
|
|
for (i = 0; i < hif_state->hif_num_extgroup; i++) {
|
|
hif_ext_group = hif_state->hif_ext_group[i];
|
|
hif_ext_group = hif_state->hif_ext_group[i];
|
|
- hif_pci_irq_set_affinity_hint(hif_ext_group);
|
|
|
|
|
|
+ hif_pci_irq_set_affinity_hint(hif_ext_group, true);
|
|
}
|
|
}
|
|
/* Set IRQ affinity for CE interrupts*/
|
|
/* Set IRQ affinity for CE interrupts*/
|
|
hif_pci_ce_irq_set_affinity_hint(scn);
|
|
hif_pci_ce_irq_set_affinity_hint(scn);
|
|
@@ -3219,6 +3217,23 @@ int hif_pci_configure_grp_irq(struct hif_softc *scn,
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+void hif_pci_set_grp_intr_affinity(struct hif_softc *scn,
|
|
|
|
+ uint32_t grp_intr_bitmask, bool perf)
|
|
|
|
+{
|
|
|
|
+ int i;
|
|
|
|
+ struct HIF_CE_state *hif_state = HIF_GET_CE_STATE(scn);
|
|
|
|
+ struct hif_exec_context *hif_ext_group;
|
|
|
|
+
|
|
|
|
+ for (i = 0; i < hif_state->hif_num_extgroup; i++) {
|
|
|
|
+ if (!(grp_intr_bitmask & BIT(i)))
|
|
|
|
+ continue;
|
|
|
|
+
|
|
|
|
+ hif_ext_group = hif_state->hif_ext_group[i];
|
|
|
|
+ hif_pci_irq_set_affinity_hint(hif_ext_group, perf);
|
|
|
|
+ qdf_atomic_set(&hif_ext_group->force_napi_complete, -1);
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
#if (defined(QCA_WIFI_QCA6390) || defined(QCA_WIFI_QCA6490) || \
|
|
#if (defined(QCA_WIFI_QCA6390) || defined(QCA_WIFI_QCA6490) || \
|
|
defined(QCA_WIFI_WCN7850))
|
|
defined(QCA_WIFI_WCN7850))
|
|
uint32_t hif_pci_reg_read32(struct hif_softc *hif_sc,
|
|
uint32_t hif_pci_reg_read32(struct hif_softc *hif_sc,
|