Message ID | 20200604041745.28886-11-wens@csie.org (mailing list archive) |
---|---|
State | Changes Requested |
Headers | show |
Series | PM / OPP v2 & cpufreq backports part 1 | expand |
Hi, > -----Original Message----- > From: Chen-Yu Tsai (Moxa) [mailto:wens@csie.org] > Sent: Thursday, June 4, 2020 1:18 PM > To: iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT) <nobuhiro1.iwamatsu@toshiba.co.jp>; pavel@denx.de > Cc: cip-dev@lists.cip-project.org; JohnsonCH.Chen@moxa.com > Subject: [PATCH RESEND 4.4.y-cip 10/15] PM / OPP: Set cpu_dev->id in cpumask first > > From: Pi-Cheng Chen <pi-cheng.chen@linaro.org> > > Set cpu_dev->id in cpumask first when setting up cpumask for CPUs that > share the same OPP table. This might be helpful when handling cpumask > without the original CPU bitfield set. > > Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@linaro.org> > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> You forgot adding your signed-off-by tag and upstream commit id. Best regards, Nobuhiro > --- > drivers/base/power/opp/cpu.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c > index 1a2e8f260b060..a0db8b3575f38 100644 > --- a/drivers/base/power/opp/cpu.c > +++ b/drivers/base/power/opp/cpu.c > @@ -218,7 +218,6 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_of_cpumask_add_table); > /* > * Works only for OPP v2 bindings. > * > - * cpumask should be already set to mask of cpu_dev->id. > * Returns -ENOENT if operating-points-v2 bindings aren't supported. > */ > int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) > @@ -234,6 +233,8 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask > return -ENOENT; > } > > + cpumask_set_cpu(cpu_dev->id, cpumask); > + > /* OPPs are shared ? */ > if (!of_property_read_bool(np, "opp-shared")) > goto put_cpu_node; > -- > 2.27.0.rc0 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#4691): https://lists.cip-project.org/g/cip-dev/message/4691 Mute This Topic: https://lists.cip-project.org/mt/74665640/4520428 Group Owner: cip-dev+owner@lists.cip-project.org Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129116/1171672734/xyzzy [patchwork-cip-dev@patchwork.kernel.org] -=-=-=-=-=-=-=-=-=-=-=-
On Thu, Jun 4, 2020 at 2:43 PM <nobuhiro1.iwamatsu@toshiba.co.jp> wrote: > > Hi, > > > -----Original Message----- > > From: Chen-Yu Tsai (Moxa) [mailto:wens@csie.org] > > Sent: Thursday, June 4, 2020 1:18 PM > > To: iwamatsu nobuhiro(岩松 信洋 □SWC◯ACT) <nobuhiro1.iwamatsu@toshiba.co.jp>; pavel@denx.de > > Cc: cip-dev@lists.cip-project.org; JohnsonCH.Chen@moxa.com > > Subject: [PATCH RESEND 4.4.y-cip 10/15] PM / OPP: Set cpu_dev->id in cpumask first > > > > From: Pi-Cheng Chen <pi-cheng.chen@linaro.org> > > > > Set cpu_dev->id in cpumask first when setting up cpumask for CPUs that > > share the same OPP table. This might be helpful when handling cpumask > > without the original CPU bitfield set. > > > > Signed-off-by: Pi-Cheng Chen <pi-cheng.chen@linaro.org> > > Acked-by: Viresh Kumar <viresh.kumar@linaro.org> > > Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> > > You forgot adding your signed-off-by tag and upstream commit id. Oops... FWIW, this is commit d9de19b1cc013433ad293365b5b3902ec73dfd60 upstream. Signed-off-by: Chen-Yu Tsai (Moxa) <wens@csie.org> Will resend after a round of reviews. ChenYu > Best regards, > Nobuhiro > > > --- > > drivers/base/power/opp/cpu.c | 3 ++- > > 1 file changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c > > index 1a2e8f260b060..a0db8b3575f38 100644 > > --- a/drivers/base/power/opp/cpu.c > > +++ b/drivers/base/power/opp/cpu.c > > @@ -218,7 +218,6 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_of_cpumask_add_table); > > /* > > * Works only for OPP v2 bindings. > > * > > - * cpumask should be already set to mask of cpu_dev->id. > > * Returns -ENOENT if operating-points-v2 bindings aren't supported. > > */ > > int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) > > @@ -234,6 +233,8 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask > > return -ENOENT; > > } > > > > + cpumask_set_cpu(cpu_dev->id, cpumask); > > + > > /* OPPs are shared ? */ > > if (!of_property_read_bool(np, "opp-shared")) > > goto put_cpu_node; > > -- > > 2.27.0.rc0 > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#4692): https://lists.cip-project.org/g/cip-dev/message/4692 Mute This Topic: https://lists.cip-project.org/mt/74665640/4520428 Group Owner: cip-dev+owner@lists.cip-project.org Unsubscribe: https://lists.cip-project.org/g/cip-dev/leave/8129116/1171672734/xyzzy [patchwork-cip-dev@patchwork.kernel.org] -=-=-=-=-=-=-=-=-=-=-=-
diff --git a/drivers/base/power/opp/cpu.c b/drivers/base/power/opp/cpu.c index 1a2e8f260b060..a0db8b3575f38 100644 --- a/drivers/base/power/opp/cpu.c +++ b/drivers/base/power/opp/cpu.c @@ -218,7 +218,6 @@ EXPORT_SYMBOL_GPL(dev_pm_opp_of_cpumask_add_table); /* * Works only for OPP v2 bindings. * - * cpumask should be already set to mask of cpu_dev->id. * Returns -ENOENT if operating-points-v2 bindings aren't supported. */ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask) @@ -234,6 +233,8 @@ int dev_pm_opp_of_get_sharing_cpus(struct device *cpu_dev, cpumask_var_t cpumask return -ENOENT; } + cpumask_set_cpu(cpu_dev->id, cpumask); + /* OPPs are shared ? */ if (!of_property_read_bool(np, "opp-shared")) goto put_cpu_node;