[RESEND,2/4] x86/smp: Export symbol cpu_clustergroup_mask

Message ID 20231116142245.1233485-2-kan.liang@linux.intel.com
State New
Headers
Series [RESEND,1/4] perf/x86/intel/cstate: Cleanup duplicate attr_groups |

Commit Message

Liang, Kan Nov. 16, 2023, 2:22 p.m. UTC
  From: Kan Liang <kan.liang@linux.intel.com>

Intel cstate PMU driver will invoke the topology_cluster_cpumask() to
retrieve the CPU mask of a cluster. A modpost error is triggered since
the symbol cpu_clustergroup_mask is not exported.

Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
---
 arch/x86/kernel/smpboot.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Peter Zijlstra Nov. 16, 2023, 2:40 p.m. UTC | #1
On Thu, Nov 16, 2023 at 06:22:43AM -0800, kan.liang@linux.intel.com wrote:
> From: Kan Liang <kan.liang@linux.intel.com>
> 
> Intel cstate PMU driver will invoke the topology_cluster_cpumask() to
> retrieve the CPU mask of a cluster. A modpost error is triggered since
> the symbol cpu_clustergroup_mask is not exported.
> 
> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
> ---
>  arch/x86/kernel/smpboot.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index 48e040618731..376387ca6be5 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -747,6 +747,7 @@ const struct cpumask *cpu_clustergroup_mask(int cpu)
>  {
>  	return cpu_l2c_shared_mask(cpu);
>  }
> +EXPORT_SYMBOL(cpu_clustergroup_mask);

I made that _GPL.

Queued the lot.
  
Liang, Kan Nov. 16, 2023, 3:20 p.m. UTC | #2
On 2023-11-16 9:40 a.m., Peter Zijlstra wrote:
> On Thu, Nov 16, 2023 at 06:22:43AM -0800, kan.liang@linux.intel.com wrote:
>> From: Kan Liang <kan.liang@linux.intel.com>
>>
>> Intel cstate PMU driver will invoke the topology_cluster_cpumask() to
>> retrieve the CPU mask of a cluster. A modpost error is triggered since
>> the symbol cpu_clustergroup_mask is not exported.
>>
>> Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
>> ---
>>  arch/x86/kernel/smpboot.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
>> index 48e040618731..376387ca6be5 100644
>> --- a/arch/x86/kernel/smpboot.c
>> +++ b/arch/x86/kernel/smpboot.c
>> @@ -747,6 +747,7 @@ const struct cpumask *cpu_clustergroup_mask(int cpu)
>>  {
>>  	return cpu_l2c_shared_mask(cpu);
>>  }
>> +EXPORT_SYMBOL(cpu_clustergroup_mask);
> 
> I made that _GPL.

Sure.
> 
> Queued the lot.

Thanks!

Kan
  

Patch

diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
index 48e040618731..376387ca6be5 100644
--- a/arch/x86/kernel/smpboot.c
+++ b/arch/x86/kernel/smpboot.c
@@ -747,6 +747,7 @@  const struct cpumask *cpu_clustergroup_mask(int cpu)
 {
 	return cpu_l2c_shared_mask(cpu);
 }
+EXPORT_SYMBOL(cpu_clustergroup_mask);
 
 static void impress_friends(void)
 {