Message ID | 1614838092-30398-1-git-send-email-skomatineni@nvidia.com |
---|---|
Headers | show |
Series | Add cpuidle support for Tegra194 | expand |
On 04/03/2021 07:08, Sowjanya Komatineni wrote: > Add Tegra CPUIDLE driver section with maintainers and mailing list > entries. > > Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com> > --- > MAINTAINERS | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINERS > index cac8429..277fcfd 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -4679,6 +4679,18 @@ S: Supported > F: drivers/cpuidle/cpuidle-psci.h > F: drivers/cpuidle/cpuidle-psci-domain.c > > +CPUIDLE DRIVER - TEGRA194 > +M: Thierry Reding <thierry.reding@gmail.com> > +M: Jonathan Hunter <jonathanh@nvidia.com> > +M: Krishna Sitaraman <ksitaraman@nvidia.com> > +M: Sanjay Chandrashekara <sanjayc@nvidia.com> > +M: Sowjanya Komatineni <skomatineni@nvidia.com> It does not make sense to have so many maintainers for a single file. > +L: linux-pm@vger.kernel.org > +L: linux-tegra@vger.kernel.org > +S: Maintained > +F: Documentation/devicetree/bindings/arm/nvidia,tegra194-ccplex.yaml > +F: drivers/cpuidle/cpuidle-tegra194.c > + > CRAMFS FILESYSTEM > M: Nicolas Pitre <nico@fluxnic.net> > S: Maintained >
04.03.2021 09:08, Sowjanya Komatineni пишет: ... > +static int __init tegra194_cpuidle_probe(struct platform_device *pdev) > +{ > + struct cpumask *cpumask; > + int cpu, ret; > + > + if (!check_mce_version()) { > + pr_err("cpuidle: incompatible MCE version, cannot register driver\n"); Should be dev_err() everywhere. > + return -ENODEV; > + } > + > + tsc_per_usec = arch_timer_get_cntfrq() / 1000000; > + > + cpumask = devm_kzalloc(&pdev->dev, cpumask_size(), GFP_KERNEL); > + for_each_online_cpu(cpu) > + cpumask_set_cpu(cpu, cpumask); cpumask_copy(..)? > + t194_cpu_idle_driver.cpumask = cpumask; Depending on 'online' mask instead of the 'present' mask looks odd. Is this really intended to be so? ... > +static int tegra194_cpuidle_remove(struct platform_device *pdev) > +{ > + unregister_pm_notifier(&suspend_notifier); > + cpuhp_remove_state(hp_state); > + cpuidle_unregister(&t194_cpu_idle_driver); > + kfree(t194_cpu_idle_driver.cpumask); kfree() of a managed resource.