From: Rex-BC Chen <rex-bc.chen@mediatek.com> To: Viresh Kumar <viresh.kumar@linaro.org> Cc: <rafael@kernel.org>, <robh+dt@kernel.org>, <krzk+dt@kernel.org>, <matthias.bgg@gmail.com>, <jia-wei.chang@mediatek.com>, <roger.lu@mediatek.com>, <hsinyi@google.com>, <khilman@baylibre.com>, <angelogioacchino.delregno@collabora.com>, <linux-pm@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <Project_Global_Chrome_Upstream_Group@mediatek.com>, Andrew-sh.Cheng <andrew-sh.cheng@mediatek.com> Subject: Re: [PATCH v5 2/9] cpufreq: mediatek: Add opp notification support Date: Thu, 5 May 2022 17:44:17 +0800 [thread overview] Message-ID: <b2dabd5e33e39fed2efcf458c26670f29ab83233.camel@mediatek.com> (raw) In-Reply-To: <20220505084345.e3qt3ocdft75tbxv@vireshk-i7> On Thu, 2022-05-05 at 14:13 +0530, Viresh Kumar wrote: > On 04-05-22, 21:05, Rex-BC Chen wrote: > > From: "Andrew-sh.Cheng" <andrew-sh.cheng@mediatek.com> > > > > > From this opp notifier, cpufreq should listen to opp notification > > > and do > > What happened with the extra ">" here ? > Hello Viresh, Sorry for this. I don't know why it appear this ">". In my patch, there is no ">" here. I will check this.. > > static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, > > int cpu) > > { > > struct device *cpu_dev; > > @@ -396,6 +458,17 @@ static int mtk_cpu_dvfs_info_init(struct > > mtk_cpu_dvfs_info *info, int cpu) > > info->intermediate_voltage = dev_pm_opp_get_voltage(opp); > > dev_pm_opp_put(opp); > > > > + info->opp_cpu = cpu; > > + info->opp_nb.notifier_call = mtk_cpufreq_opp_notifier; > > + ret = dev_pm_opp_register_notifier(cpu_dev, &info->opp_nb); > > + if (ret) { > > + dev_err(cpu_dev, "cpu%d: failed to register opp > > notifier\n", cpu); > > + goto out_disable_inter_clock; > > + } > > + > > + mutex_init(&info->reg_lock); > > You should always initialize a resource before its users. The > notifier > callback, which can get called right after > dev_pm_opp_register_notifier() returns, will use this mutex. > ok, I will move mutex_init(&info->reg_lock) before dev_pm_opp_register_notifier(). > > + info->opp_freq = clk_get_rate(info->cpu_clk); > > + > > /* > > * If SRAM regulator is present, software "voltage tracking" is > > needed > > * for this CPU power domain. > > @@ -451,6 +524,9 @@ static void mtk_cpu_dvfs_info_release(struct > > mtk_cpu_dvfs_info *info) > > } > > > > dev_pm_opp_of_cpumask_remove_table(&info->cpus); > > + > > + if (!IS_ERR_OR_NULL(info->cpu_dev)) > > cpu_dev can never be error here. ok, I will drop this. > > > + dev_pm_opp_unregister_notifier(info->cpu_dev, &info- > > >opp_nb); > > } > > > > static int mtk_cpufreq_init(struct cpufreq_policy *policy) > > I also asked you last time to stack things in a order so they are > easier for me to apply. Bugfixes, followed by simple cleanups, which > don't make behavioral changes, followed by real patches. > > Now you have sent this patch at an early stage, which blocks me from > applying anything after this. > > I can see the earlier comments weren't all considered, and it doesn't > look nice. > Sorry for inconvenience. I will move "cpufreq: mediatek: Move voltage limits to platform data" before this patch. The order will be: //cleanup and bug fix new patch for add "platform_device_unregister(cpufreq_pdev);" cpufreq: mediatek: Move voltage limits to platform data //driver refinement cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking() //new feature cpufreq: mediatek: Add opp notification support cpufreq: mediatek: Link CCI device to CPU //support new soc cpufreq: mediatek: Add support for MT8186 //dts arm64: dts: mediatek: Add opp table and clock property for MT8183 cpufreq arm64: dts: mediatek: Add MediaTek CCI node for MT8183 arm64: dts: mediatek: Add mediatek, cci property for MT8183 cpufreq BRs, Rex _______________________________________________ Linux-mediatek mailing list Linux-mediatek@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-mediatek
WARNING: multiple messages have this Message-ID (diff)
From: Rex-BC Chen <rex-bc.chen@mediatek.com> To: Viresh Kumar <viresh.kumar@linaro.org> Cc: <rafael@kernel.org>, <robh+dt@kernel.org>, <krzk+dt@kernel.org>, <matthias.bgg@gmail.com>, <jia-wei.chang@mediatek.com>, <roger.lu@mediatek.com>, <hsinyi@google.com>, <khilman@baylibre.com>, <angelogioacchino.delregno@collabora.com>, <linux-pm@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <Project_Global_Chrome_Upstream_Group@mediatek.com>, Andrew-sh.Cheng <andrew-sh.cheng@mediatek.com> Subject: Re: [PATCH v5 2/9] cpufreq: mediatek: Add opp notification support Date: Thu, 5 May 2022 17:44:17 +0800 [thread overview] Message-ID: <b2dabd5e33e39fed2efcf458c26670f29ab83233.camel@mediatek.com> (raw) In-Reply-To: <20220505084345.e3qt3ocdft75tbxv@vireshk-i7> On Thu, 2022-05-05 at 14:13 +0530, Viresh Kumar wrote: > On 04-05-22, 21:05, Rex-BC Chen wrote: > > From: "Andrew-sh.Cheng" <andrew-sh.cheng@mediatek.com> > > > > > From this opp notifier, cpufreq should listen to opp notification > > > and do > > What happened with the extra ">" here ? > Hello Viresh, Sorry for this. I don't know why it appear this ">". In my patch, there is no ">" here. I will check this.. > > static int mtk_cpu_dvfs_info_init(struct mtk_cpu_dvfs_info *info, > > int cpu) > > { > > struct device *cpu_dev; > > @@ -396,6 +458,17 @@ static int mtk_cpu_dvfs_info_init(struct > > mtk_cpu_dvfs_info *info, int cpu) > > info->intermediate_voltage = dev_pm_opp_get_voltage(opp); > > dev_pm_opp_put(opp); > > > > + info->opp_cpu = cpu; > > + info->opp_nb.notifier_call = mtk_cpufreq_opp_notifier; > > + ret = dev_pm_opp_register_notifier(cpu_dev, &info->opp_nb); > > + if (ret) { > > + dev_err(cpu_dev, "cpu%d: failed to register opp > > notifier\n", cpu); > > + goto out_disable_inter_clock; > > + } > > + > > + mutex_init(&info->reg_lock); > > You should always initialize a resource before its users. The > notifier > callback, which can get called right after > dev_pm_opp_register_notifier() returns, will use this mutex. > ok, I will move mutex_init(&info->reg_lock) before dev_pm_opp_register_notifier(). > > + info->opp_freq = clk_get_rate(info->cpu_clk); > > + > > /* > > * If SRAM regulator is present, software "voltage tracking" is > > needed > > * for this CPU power domain. > > @@ -451,6 +524,9 @@ static void mtk_cpu_dvfs_info_release(struct > > mtk_cpu_dvfs_info *info) > > } > > > > dev_pm_opp_of_cpumask_remove_table(&info->cpus); > > + > > + if (!IS_ERR_OR_NULL(info->cpu_dev)) > > cpu_dev can never be error here. ok, I will drop this. > > > + dev_pm_opp_unregister_notifier(info->cpu_dev, &info- > > >opp_nb); > > } > > > > static int mtk_cpufreq_init(struct cpufreq_policy *policy) > > I also asked you last time to stack things in a order so they are > easier for me to apply. Bugfixes, followed by simple cleanups, which > don't make behavioral changes, followed by real patches. > > Now you have sent this patch at an early stage, which blocks me from > applying anything after this. > > I can see the earlier comments weren't all considered, and it doesn't > look nice. > Sorry for inconvenience. I will move "cpufreq: mediatek: Move voltage limits to platform data" before this patch. The order will be: //cleanup and bug fix new patch for add "platform_device_unregister(cpufreq_pdev);" cpufreq: mediatek: Move voltage limits to platform data //driver refinement cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking() //new feature cpufreq: mediatek: Add opp notification support cpufreq: mediatek: Link CCI device to CPU //support new soc cpufreq: mediatek: Add support for MT8186 //dts arm64: dts: mediatek: Add opp table and clock property for MT8183 cpufreq arm64: dts: mediatek: Add MediaTek CCI node for MT8183 arm64: dts: mediatek: Add mediatek, cci property for MT8183 cpufreq BRs, Rex _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-05-05 9:54 UTC|newest] Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-04 13:05 [PATCH v5 0/9] cpufreq: mediatek: Cleanup and support MT8183 and MT8186 Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` [PATCH v5 1/9] dt-bindings: cpufreq: mediatek: Add MediaTek CCI property Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-05 8:41 ` AngeloGioacchino Del Regno 2022-05-05 8:41 ` AngeloGioacchino Del Regno 2022-05-05 8:41 ` AngeloGioacchino Del Regno 2022-05-04 13:05 ` [PATCH v5 2/9] cpufreq: mediatek: Add opp notification support Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-05 8:43 ` Viresh Kumar 2022-05-05 8:43 ` Viresh Kumar 2022-05-05 8:43 ` Viresh Kumar 2022-05-05 9:44 ` Rex-BC Chen [this message] 2022-05-05 9:44 ` Rex-BC Chen 2022-05-04 13:05 ` [PATCH v5 3/9] cpufreq: mediatek: Move voltage limits to platform data Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-05 8:52 ` Viresh Kumar 2022-05-05 8:52 ` Viresh Kumar 2022-05-05 8:52 ` Viresh Kumar 2022-05-05 10:29 ` Rex-BC Chen 2022-05-05 10:29 ` Rex-BC Chen 2022-05-05 10:29 ` Rex-BC Chen 2022-05-04 13:05 ` [PATCH v5 4/9] cpufreq: mediatek: Refine mtk_cpufreq_voltage_tracking() Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` [PATCH v5 5/9] cpufreq: mediatek: Link CCI device to CPU Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` [PATCH v5 6/9] cpufreq: mediatek: Add support for MT8186 Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` [PATCH v5 7/9] arm64: dts: mediatek: Add opp table and clock property for MT8183 cpufreq Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` [PATCH v5 8/9] arm64: dts: mediatek: Add MediaTek CCI node for MT8183 Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-04 13:05 ` [PATCH v5 9/9] arm64: dts: mediatek: Add mediatek,cci property for MT8183 cpufreq Rex-BC Chen 2022-05-04 13:05 ` [PATCH v5 9/9] arm64: dts: mediatek: Add mediatek, cci " Rex-BC Chen 2022-05-04 13:05 ` Rex-BC Chen 2022-05-05 8:53 ` [PATCH v5 0/9] cpufreq: mediatek: Cleanup and support MT8183 and MT8186 Viresh Kumar 2022-05-05 8:53 ` Viresh Kumar 2022-05-05 8:53 ` Viresh Kumar 2022-05-05 9:47 ` Rex-BC Chen 2022-05-05 9:47 ` Rex-BC Chen 2022-05-05 9:47 ` Rex-BC Chen
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=b2dabd5e33e39fed2efcf458c26670f29ab83233.camel@mediatek.com \ --to=rex-bc.chen@mediatek.com \ --cc=Project_Global_Chrome_Upstream_Group@mediatek.com \ --cc=andrew-sh.cheng@mediatek.com \ --cc=angelogioacchino.delregno@collabora.com \ --cc=devicetree@vger.kernel.org \ --cc=hsinyi@google.com \ --cc=jia-wei.chang@mediatek.com \ --cc=khilman@baylibre.com \ --cc=krzk+dt@kernel.org \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mediatek@lists.infradead.org \ --cc=linux-pm@vger.kernel.org \ --cc=matthias.bgg@gmail.com \ --cc=rafael@kernel.org \ --cc=robh+dt@kernel.org \ --cc=roger.lu@mediatek.com \ --cc=viresh.kumar@linaro.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.