lkml.org 
[lkml]   [2020]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH -next] arm64: Export __cpu_logical_map
On Sun, Jul 26, 2020 at 05:16:27PM +0530, Sumit Gupta wrote:
> > > > ERROR: modpost: "__cpu_logical_map" [drivers/cpufreq/tegra194-cpufreq.ko] undefined!
> > > >
> > > > ARM64 tegra194-cpufreq driver use cpu_logical_map, export
> > > > __cpu_logical_map to fix build issue.
> > > >
> >
> > I wonder why like other instances in the drivers, the mpidr is not get
> > directly from the cpu. The cpufreq_driver->init call happens when the cpu
> > is being brought online and is executed on the required cpu IIUC.
> >
> Yes, this occurs during hotplug case.
> But in the case of system boot, 'cpufreq_driver->init' is called later
> during cpufreq platform driver's probe. The value of CPU in 'policy->cpu'
> can be different from the current CPU. That's why read_cpuid_mpidr() can't
> be used.
>

Fair enough, why not do cross call like in set_target ? Since it is one-off
in init, I don't see any issue when you are doing it runtime for set_target.

> > read_cpuid_mpidr() is inline and avoids having to export the logical_cpu_map.
> > Though we may not add physical hotplug anytime soon, less dependency
> > on this cpu_logical_map is better given that we can resolve this without
> > the need to access the map.
> >

To be honest, we have tried to remove all the dependency on cluster id
in generic code as it is not well defined. This one is tegra specific
driver so should be fine. But I am still bit nervous to export
cpu_logical_map as we have no clue what that would mean for physical
hotplug.


--
Regards,
Sudeep

\
 
 \ /
  Last update: 2020-07-27 18:06    [W:0.158 / U:0.016 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site