
Update QCA_NAPI_DEF_SCALE_BIN_SHIFT for defconfig builds to the same value as the perf build. Move the WLAN ext irqs to gold cores for defconfig builds. Disable cpu isolation before moving the IRQs to gold cores. Add the ability to move IRQs to gold cores when the cpus hotplug in. Change-Id: I4cfecd02a1a2200dc99adee9a324b90c877c13fd CRs-Fixed: 2638820
92 lines
2.4 KiB
C
92 lines
2.4 KiB
C
/*
|
|
* Copyright (c) 2015-2020 The Linux Foundation. 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
|
|
* above copyright notice and this permission notice appear in all
|
|
* copies.
|
|
*
|
|
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
|
|
* WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
|
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
|
|
* AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
|
|
* DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
|
|
* PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
* PERFORMANCE OF THIS SOFTWARE.
|
|
*/
|
|
|
|
#ifndef __HIF_IRQ_AFFINITY_H__
|
|
#define __HIF_IRQ_AFFINITY_H__
|
|
|
|
#ifdef HIF_IRQ_AFFINITY
|
|
#ifndef FEATURE_NAPI
|
|
#error /*HIF_IRQ_AFFINITY currently relies on FEATURE_NAPI*/
|
|
#endif
|
|
#endif
|
|
|
|
/* CLD headers */
|
|
#include <hif.h> /* struct hif_opaque_softc; */
|
|
#include <hif_napi.h>
|
|
struct hif_opaque_softc;
|
|
enum qca_blacklist_op;
|
|
|
|
int hif_exec_cpu_migrate(struct qca_napi_data *napid, int cpu, int action);
|
|
|
|
int hif_exec_cpu_blacklist(struct qca_napi_data *napid,
|
|
enum qca_blacklist_op op);
|
|
|
|
#ifdef HIF_IRQ_AFFINITY
|
|
int hif_exec_event(struct hif_opaque_softc *hif,
|
|
enum qca_napi_event event,
|
|
void *data);
|
|
|
|
|
|
/* hif_irq_affinity_remove() - remove affinity before freeing the irq
|
|
* @os_irq: irq number to remove affinity from
|
|
*/
|
|
static inline void hif_irq_affinity_remove(int os_irq)
|
|
{
|
|
irq_set_affinity_hint(os_irq, NULL);
|
|
}
|
|
#else
|
|
static inline void hif_irq_affinity_remove(int os_irq)
|
|
{
|
|
}
|
|
|
|
static inline int hif_exec_event(struct hif_opaque_softc *hif,
|
|
enum qca_napi_event event,
|
|
void *data)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif
|
|
|
|
/**
|
|
* hif_napi_core_ctl_set_boost() - This API is used to move
|
|
* tasks to CPUs with higher capacity
|
|
* @boost: If set move tasks to higher capacity CPUs
|
|
*
|
|
* This function moves tasks to higher capacity CPUs than those
|
|
* where the tasks would have normally ended up
|
|
*
|
|
* Return: None
|
|
*/
|
|
static inline int hif_napi_core_ctl_set_boost(bool boost)
|
|
{
|
|
return qdf_core_ctl_set_boost(boost);
|
|
}
|
|
|
|
#ifdef HIF_CPU_PERF_AFFINE_MASK
|
|
static inline int hif_core_ctl_set_boost(bool boost)
|
|
{
|
|
return hif_napi_core_ctl_set_boost(boost);
|
|
}
|
|
#else
|
|
static inline int hif_core_ctl_set_boost(bool boost)
|
|
{
|
|
return 0;
|
|
}
|
|
#endif
|
|
#endif
|