qcacmn: Add new QDF APIs
1. qdf_cpumask_and - *dstp = *src1p & *src2p 2. qdf_cpumask_andnot - *dstp = *src1p & ~*src2p 3. qdf_cpumask_equal - *src1p == *src2p 4. qdf_cpumask_complement *dstp = ~*srcp 5. qdf_walt_get_cpus_taken - Get taken CPUs Change-Id: I3a9038cfe033b155bd098e88e3bf176513b728e8 CRs-Fixed: 3479945
Cette révision appartient à :

révisé par
Rahul Choudhary

Parent
8cd2038ec0
révision
9fb079e747
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
|
||||
@@ -228,4 +228,57 @@ void qdf_cpumask_or(qdf_cpu_mask *dstp, qdf_cpu_mask *src1p,
|
||||
void
|
||||
qdf_thread_cpumap_print_to_pagebuf(bool list, char *new_mask_str,
|
||||
qdf_cpu_mask *new_mask);
|
||||
|
||||
/**
|
||||
* qdf_cpumask_and - *dstp = *src1p & *src2p
|
||||
* @dstp: the cpumask result
|
||||
* @src1p: the first input
|
||||
* @src2p: the second input
|
||||
*
|
||||
* Return: If *@dstp is empty, returns false, else returns true
|
||||
*/
|
||||
bool
|
||||
qdf_cpumask_and(qdf_cpu_mask *dstp, const qdf_cpu_mask *src1p,
|
||||
const qdf_cpu_mask *src2p);
|
||||
|
||||
/**
|
||||
* qdf_cpumask_andnot - *dstp = *src1p & ~*src2p
|
||||
* @dstp: the cpumask result
|
||||
* @src1p: the first input
|
||||
* @src2p: the second input
|
||||
*
|
||||
* Return: If *@dstp is empty, returns false, else returns true
|
||||
*/
|
||||
bool
|
||||
qdf_cpumask_andnot(qdf_cpu_mask *dstp, const qdf_cpu_mask *src1p,
|
||||
const qdf_cpu_mask *src2p);
|
||||
|
||||
/**
|
||||
* qdf_cpumask_equal - *src1p == *src2p
|
||||
* @src1p: the first input
|
||||
* @src2p: the second input
|
||||
*
|
||||
* Return: If *@src1p == *@src2p return true, else return false
|
||||
*/
|
||||
bool
|
||||
qdf_cpumask_equal(const qdf_cpu_mask *src1p, const qdf_cpu_mask *src2p);
|
||||
|
||||
/**
|
||||
* qdf_cpumask_complement - *dstp = ~*srcp
|
||||
* @dstp: the cpumask result
|
||||
* @srcp: the input to invert
|
||||
*
|
||||
* Return: None
|
||||
*/
|
||||
void
|
||||
qdf_cpumask_complement(qdf_cpu_mask *dstp, const qdf_cpu_mask *srcp);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
/**
|
||||
* qdf_walt_get_cpus_taken - Get taken CPUs
|
||||
*
|
||||
* Return: Taken CPUs
|
||||
*/
|
||||
qdf_cpu_mask qdf_walt_get_cpus_taken(void);
|
||||
#endif
|
||||
#endif /* __QDF_THREADS_H */
|
||||
|
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright (c) 2014-2021 The Linux Foundation. All rights reserved.
|
||||
* Copyright (c) 2022 Qualcomm Innovation Center, Inc. All rights reserved.
|
||||
* Copyright (c) 2022-2023 Qualcomm Innovation Center, Inc. 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
|
||||
@@ -323,3 +323,45 @@ qdf_thread_cpumap_print_to_pagebuf(bool list, char *new_mask_str,
|
||||
|
||||
qdf_export_symbol(qdf_thread_cpumap_print_to_pagebuf);
|
||||
|
||||
bool
|
||||
qdf_cpumask_and(qdf_cpu_mask *dstp, const qdf_cpu_mask *src1p,
|
||||
const qdf_cpu_mask *src2p)
|
||||
{
|
||||
return cpumask_and(dstp, src1p, src2p);
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_cpumask_and);
|
||||
|
||||
bool
|
||||
qdf_cpumask_andnot(qdf_cpu_mask *dstp, const qdf_cpu_mask *src1p,
|
||||
const qdf_cpu_mask *src2p)
|
||||
{
|
||||
return cpumask_andnot(dstp, src1p, src2p);
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_cpumask_andnot);
|
||||
|
||||
bool
|
||||
qdf_cpumask_equal(const qdf_cpu_mask *src1p, const qdf_cpu_mask *src2p)
|
||||
{
|
||||
return cpumask_equal(src1p, src2p);
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_cpumask_equal);
|
||||
|
||||
void
|
||||
qdf_cpumask_complement(qdf_cpu_mask *dstp, const qdf_cpu_mask *srcp)
|
||||
{
|
||||
cpumask_complement(dstp, srcp);
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_cpumask_complement);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(6, 1, 0))
|
||||
qdf_cpu_mask qdf_walt_get_cpus_taken(void)
|
||||
{
|
||||
return walt_get_cpus_taken();
|
||||
}
|
||||
|
||||
qdf_export_symbol(qdf_walt_get_cpus_taken);
|
||||
#endif
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur