qcacmn: Add API to get the cluster ID for a cpu

Kernel 6.0 and above has deprecated the use of
topology_physical_package_id() and instead of this
API topology_cluster_id() needs to be used to get
the cluster ID of a given CPU.

Add QDF abstraction API for topology_cluster_id().

Change-Id: I4ca555c016730afc6cac2a4bf55d9f48c6f4cae0
CRs-Fixed: 3488031
This commit is contained in:
Rakesh Pillai
2023-04-27 08:01:58 -07:00
کامیت شده توسط Madan Koyyalamudi
والد ce53e06591
کامیت 5b087aa295

مشاهده پرونده

@@ -122,6 +122,7 @@ __qdf_dev_set_irq_affinity(uint32_t irnum, struct qdf_cpu_mask *cpmask)
return qdf_status_from_os_return(ret);
}
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 0, 0))
/**
* __qdf_topology_physical_package_id() - API to retrieve the
* cluster info
@@ -130,12 +131,28 @@ __qdf_dev_set_irq_affinity(uint32_t irnum, struct qdf_cpu_mask *cpmask)
* This function returns the cluster information for give cpu
* core
*
* Return: 1 for perf and 0 for non-perf cluster
* Return: Cluster ID of the CPU
*/
static inline int __qdf_topology_physical_package_id(unsigned int cpu)
{
return topology_cluster_id(cpu);
}
#else
/**
* __qdf_topology_physical_package_id() - API to retrieve the
* cluster info
* @cpu: cpu core
*
* This function returns the cluster information for give cpu
* core
*
* Return: Cluster ID of the CPU
*/
static inline int __qdf_topology_physical_package_id(unsigned int cpu)
{
return topology_physical_package_id(cpu);
}
#endif
/**
* __qdf_cpumask_subset() - API to check for subset in cpumasks